X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Fasm-generic%2Fgpio.h;h=4f3d75e1ad391a669d842c7c58e65b46bfd9cbd4;hb=3b03117c5cfbb04175b688c79ea4155b8ef812d3;hp=979c6a57f2f1b48690d46171b21edb5c954f083b;hpb=80a186074e72e2cd61f6716d90cf32ce54981a56;p=karo-tx-linux.git diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 979c6a57f2f1..4f3d75e1ad39 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -60,7 +60,9 @@ struct module; * @names: if set, must be an array of strings to use as alternative * names for the GPIOs in this chip. Any entry in the array * may be NULL if there is no alias for the GPIO, however the - * array must be @ngpio entries long. + * array must be @ngpio entries long. A name can include a single printk + * format specifier for an unsigned int. It is substituted by the actual + * number of the gpio. * * A gpio_chip can help platforms abstract various sources of GPIOs so * they can all be accessed through a common programing interface. @@ -88,6 +90,9 @@ struct gpio_chip { unsigned offset); int (*direction_output)(struct gpio_chip *chip, unsigned offset, int value); + int (*set_debounce)(struct gpio_chip *chip, + unsigned offset, unsigned debounce); + void (*set)(struct gpio_chip *chip, unsigned offset, int value); @@ -98,7 +103,7 @@ struct gpio_chip { struct gpio_chip *chip); int base; u16 ngpio; - char **names; + const char *const *names; unsigned can_sleep:1; unsigned exported:1; }; @@ -121,6 +126,8 @@ extern void gpio_free(unsigned gpio); extern int gpio_direction_input(unsigned gpio); extern int gpio_direction_output(unsigned gpio, int value); +extern int gpio_set_debounce(unsigned gpio, unsigned debounce); + extern int gpio_get_value_cansleep(unsigned gpio); extern void gpio_set_value_cansleep(unsigned gpio, int value);