53 len = (
sizeof ( *gpios ) + (
count *
sizeof ( *gpio ) ) + priv_len );
63 for ( i = 0 ; i <
count ; i++ ) {
83 DBGC (
gpios,
"GPIO %s registered with %d GPIOs\n",
#define NULL
NULL pointer (VOID *)
int gpios_register(struct gpios *gpios)
Register GPIO controller.
struct gpios * alloc_gpios(unsigned int count, size_t priv_len)
Allocate GPIO controller.
struct gpios * gpios_find(unsigned int bus_type, unsigned int location)
Find GPIO controller.
static int null_gpio_config(struct gpios *gpios __unused, struct gpio *gpio __unused, unsigned int config __unused)
Configure null GPIO pin.
static int null_gpio_in(struct gpios *gpios __unused, struct gpio *gpio __unused)
Get null GPIO input value.
static void null_gpio_out(struct gpios *gpios __unused, struct gpio *gpio __unused, int active __unused)
Set null GPIO output value.
struct gpio_operations null_gpio_operations
Null GPIO operations.
void gpios_unregister(struct gpios *gpios)
Unregister GPIO controller.
static struct gpios * gpios_get(struct gpios *gpios)
Get reference to GPIO controller.
static void gpios_put(struct gpios *gpios)
Drop reference to GPIO controller.
#define __unused
Declare a variable or data structure as unused.
static unsigned int count
Number of entries.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define ENODEV
No such device.
#define list_add_tail(new, head)
Add a new entry to the tail of a list.
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
#define list_del(list)
Delete an entry from a list.
#define LIST_HEAD(list)
Declare a static list head.
void * zalloc(size_t size)
Allocate cleared memory.
unsigned int bus_type
Bus type.
unsigned int location
Location.
struct device_description desc
Device description.
struct gpios * gpios
GPIO controller.
unsigned int index
Pin index.
void * priv
Driver-private data.
unsigned int count
Number of GPIOs.
struct device * dev
Generic device.
struct list_head list
List of GPIO controllers.
struct gpio * gpio
Individual GPIOs.