1 /* SPDX-License-Identifier: GPL-2.0-or-later */
4 #include <device/device.h>
5 #include <device/gpio.h>
7 #include <intelblocks/gpio.h>
9 static struct gpio_operations gpio_ops
= {
12 .input_pulldown
= gpio_input_pulldown
,
13 .input_pullup
= gpio_input_pullup
,
15 .output
= gpio_output
,
18 struct device_operations block_gpio_ops
= {
19 .read_resources
= noop_read_resources
,
20 .set_resources
= noop_set_resources
,
21 .ops_gpio
= &gpio_ops
,
24 void block_gpio_enable(struct device
*dev
)
26 assert(dev
->path
.type
== DEVICE_PATH_GPIO
);
27 dev
->ops
= &block_gpio_ops
;