31 #define GPIO_CFG_ACTIVE_LOW 0x01 34 #define GPIO_CFG_OUTPUT 0x0100 197 unsigned int location );
struct gpios * alloc_gpios(unsigned int count, size_t priv_len)
Allocate GPIO controller.
struct gpios * gpios
GPIO controller.
static void gpios_put(struct gpios *gpios)
Drop reference to GPIO controller.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
unsigned int index
Pin index.
struct device * dev
Generic device.
void gpios_unregister(struct gpios *gpios)
Unregister GPIO controller.
struct gpio_operations * op
GPIO operations.
A doubly-linked list entry (or list head)
pseudo_bit_t gpio[0x00001]
static void gpio_out(struct gpio *gpio, int active)
Set current GPIO output value.
int(* in)(struct gpios *gpios, struct gpio *gpio)
Get current GPIO input value.
int gpios_register(struct gpios *gpios)
Register GPIO controller.
static unsigned int count
Number of entries.
struct gpios * gpios_find(unsigned int bus_type, unsigned int location)
Find GPIO controller.
unsigned int config
Configuration.
#define ref_get(refcnt)
Get additional reference to object.
struct list_head list
List of GPIO controllers.
static struct gpio * gpio_get(struct gpio *gpio)
Get reference to GPIO pin.
struct refcnt refcnt
Reference count.
static void gpios_init(struct gpios *gpios, struct gpio_operations *op)
Initialise a GPIO controller.
static uint16_t struct vmbus_xfer_pages_operations * op
static void gpios_nullify(struct gpios *gpios)
Stop using a GPIO controller.
static int gpio_config(struct gpio *gpio, unsigned int config)
Configure GPIO pin.
static int gpio_in(struct gpio *gpio)
Get current GPIO input value.
struct gpio_operations null_gpio_operations
Null GPIO operations.
int(* config)(struct gpios *gpios, struct gpio *gpio, unsigned int config)
Configure GPIO pin.
unsigned int count
Number of GPIOs.
static void gpio_put(struct gpio *gpio)
Drop reference to GPIO ping.
static struct gpios * gpios_get(struct gpios *gpios)
Get reference to GPIO controller.
void(* out)(struct gpios *gpios, struct gpio *gpio, int active)
Set current GPIO output value.
struct gpio * gpio
Individual GPIOs.
#define ref_put(refcnt)
Drop reference to object.
void * priv
Driver-private data.