libpayload: configs: Add new config.featuretest to broaden CI
[coreboot.git] / src / soc / intel / common / block / gpio / gpio_dev.c
blobbea0363eb0b32653ceb52090604719a99959cea9
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 #include <assert.h>
4 #include <device/device.h>
5 #include <device/gpio.h>
6 #include <gpio.h>
7 #include <intelblocks/gpio.h>
9 static struct gpio_operations gpio_ops = {
10 .get = gpio_get,
11 .set = gpio_set,
12 .input_pulldown = gpio_input_pulldown,
13 .input_pullup = gpio_input_pullup,
14 .input = gpio_input,
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;