gb_gpio_set_value_operation(ggc, (u8)offset, !!value);
}
- static int gb_gpio_set_config(struct gpio_chip *chip, unsigned offset,
-static int gb_gpio_set_debounce(struct gpio_chip *chip, unsigned int offset,
- unsigned int debounce)
++static int gb_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
+ unsigned long config)
{
struct gb_gpio_controller *ggc = gpio_chip_to_gb_gpio_controller(chip);
- u16 usec;
+ u32 debounce;
+ if (pinconf_to_config_param(config) != PIN_CONFIG_INPUT_DEBOUNCE)
+ return -ENOTSUPP;
+
+ debounce = pinconf_to_config_argument(config);
if (debounce > U16_MAX)
return -EINVAL;
- usec = (u16)debounce;
- return gb_gpio_set_debounce_operation(ggc, (u8)offset, usec);
+ return gb_gpio_set_debounce_operation(ggc, (u8)offset, (u16)debounce);
}
static int gb_gpio_controller_setup(struct gb_gpio_controller *ggc)