mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-11 01:14:54 +00:00
gpio-button-hotplug: add inline function gpio_button_get_value().
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> SVN-Revision: 37641
This commit is contained in:
parent
169e184521
commit
2c19af6ac5
@ -274,6 +274,15 @@ struct gpio_keys_polled_dev {
|
||||
struct gpio_keys_button_data data[0];
|
||||
};
|
||||
|
||||
static inline int gpio_button_get_value(struct gpio_keys_button *button,
|
||||
struct gpio_keys_button_data *bdata)
|
||||
{
|
||||
if (bdata->can_sleep)
|
||||
return !!gpio_get_value_cansleep(button->gpio);
|
||||
else
|
||||
return !!gpio_get_value(button->gpio);
|
||||
}
|
||||
|
||||
static void gpio_keys_polled_check_state(struct gpio_keys_button *button,
|
||||
struct gpio_keys_button_data *bdata)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user