--- zzzz-none-000/linux-2.6.39.4/include/asm-generic/gpio.h 2011-08-03 19:43:28.000000000 +0000 +++ puma6-atom-6490-729/linux-2.6.39.4/include/asm-generic/gpio.h 2021-11-10 13:38:17.000000000 +0000 @@ -101,6 +101,10 @@ unsigned offset); int (*get)(struct gpio_chip *chip, unsigned offset); +#ifdef CONFIG_ARCH_GEN3 + int (*get_multi_function)(struct gpio_chip *chip, unsigned offset); +#endif + int (*direction_output)(struct gpio_chip *chip, unsigned offset, int value); int (*set_debounce)(struct gpio_chip *chip, @@ -108,6 +112,9 @@ void (*set)(struct gpio_chip *chip, unsigned offset, int value); +#ifdef CONFIG_ARCH_GEN3 + int (*set_multi_function)(struct gpio_chip *chip, unsigned offset, int fn_num); +#endif int (*to_irq)(struct gpio_chip *chip, unsigned offset); @@ -158,6 +165,14 @@ extern int gpio_get_value_cansleep(unsigned gpio); extern void gpio_set_value_cansleep(unsigned gpio, int value); +#ifdef CONFIG_ARCH_GEN3 +extern int gpio_get_multi_function(unsigned gpio); +extern int gpio_set_multi_function(unsigned gpio, int value); + +typedef void *gpio_irq_handle; +extern gpio_irq_handle gpio_request_irq(unsigned gpio, void (*func)(void *data), unsigned long flags, const char *name, void *data); +extern int gpio_free_irq(gpio_irq_handle handle, void *data); +#endif /* A platform's code may want to inline the I/O calls when * the GPIO is constant and refers to some always-present controller,