Allow to pass the invalid irq as -ve or zero from platform.
For this change irq type on platform data as the integer type and
handle in driver to treat -ve or zero irq as invalid irq.
bug
1502787
Change-Id: I09f77dd6ef82f7668c940d31d620a588e9f35e7c
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/401200
Reviewed-by: Mitch Luban <mluban@nvidia.com>
Tested-by: Mitch Luban <mluban@nvidia.com>
bdata->button = button;
spin_lock_init(&bdata->lock);
- if (gpio_is_valid(button->gpio) && !button->irq) {
+ if (gpio_is_valid(button->gpio) && (button->irq <= 0)) {
error = gpio_request_one(button->gpio, GPIOF_IN, desc);
if (error < 0) {
dev_err(dev, "Failed to request GPIO %d, error %d\n",
irqflags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING;
} else {
- if (!button->irq) {
+ if (button->irq <= 0) {
dev_err(dev, "No IRQ specified\n");
return -EINVAL;
}
int debounce_interval; /* debounce ticks interval in msecs */
bool can_disable;
int value; /* axis value for EV_ABS */
- unsigned int irq; /* Irq number in case of interrupt keys */
+ int irq; /* Irq number in case of interrupt keys */
};
struct gpio_keys_platform_data {