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