Message ID | 20211022124612.19780-1-peter@korsgaard.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | platform/x86: barco-p50-gpio: use KEY_VENDOR for button insted of KEY_RESTART | expand |
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes: Ups, s/insted/instead/ in the subject. Do you want me to send a v2 for that? > From: Peter Korsgaard <peter.korsgaard@barco.com> > It turns out that systemd-logind by default listens for KEY_RESTART input > events and reboots the machine, which isn't great - So use KEY_VENDOR for > the vendor specific identify button instead to not conflict. > Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com> > --- > drivers/platform/x86/barco-p50-gpio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > diff --git a/drivers/platform/x86/barco-p50-gpio.c b/drivers/platform/x86/barco-p50-gpio.c > index ca0b2564c407..f5c72e33f9ae 100644 > --- a/drivers/platform/x86/barco-p50-gpio.c > +++ b/drivers/platform/x86/barco-p50-gpio.c > @@ -101,7 +101,7 @@ static struct gpio_led_platform_data leds_pdata = { > /* GPIO keyboard */ > static struct gpio_keys_button buttons[] = { > { > - .code = KEY_RESTART, > + .code = KEY_VENDOR, > .gpio = P50_GPIO_LINE_BTN, > .active_low = 1, > .type = EV_KEY, > -- > 2.20.1
Hi, On 10/22/21 17:40, Peter Korsgaard wrote: >>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes: > > Ups, s/insted/instead/ in the subject. Do you want me to send a v2 for that? No need for a v2, I'll fix this up when applying. Regards, Hans > > > From: Peter Korsgaard <peter.korsgaard@barco.com> > > It turns out that systemd-logind by default listens for KEY_RESTART input > > events and reboots the machine, which isn't great - So use KEY_VENDOR for > > the vendor specific identify button instead to not conflict. > > > Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com> > > --- > > drivers/platform/x86/barco-p50-gpio.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > diff --git a/drivers/platform/x86/barco-p50-gpio.c b/drivers/platform/x86/barco-p50-gpio.c > > index ca0b2564c407..f5c72e33f9ae 100644 > > --- a/drivers/platform/x86/barco-p50-gpio.c > > +++ b/drivers/platform/x86/barco-p50-gpio.c > > @@ -101,7 +101,7 @@ static struct gpio_led_platform_data leds_pdata = { > > /* GPIO keyboard */ > > static struct gpio_keys_button buttons[] = { > > { > > - .code = KEY_RESTART, > > + .code = KEY_VENDOR, > > .gpio = P50_GPIO_LINE_BTN, > > .active_low = 1, > > .type = EV_KEY, > > -- > > 2.20.1 > >
Hi, On 10/22/21 14:46, Peter Korsgaard wrote: > From: Peter Korsgaard <peter.korsgaard@barco.com> > > It turns out that systemd-logind by default listens for KEY_RESTART input > events and reboots the machine, which isn't great - So use KEY_VENDOR for > the vendor specific identify button instead to not conflict. > > Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com> Thank you for your patch, I've applied this patch to my review-hans branch: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while. Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window. Regards, Hans > --- > drivers/platform/x86/barco-p50-gpio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/platform/x86/barco-p50-gpio.c b/drivers/platform/x86/barco-p50-gpio.c > index ca0b2564c407..f5c72e33f9ae 100644 > --- a/drivers/platform/x86/barco-p50-gpio.c > +++ b/drivers/platform/x86/barco-p50-gpio.c > @@ -101,7 +101,7 @@ static struct gpio_led_platform_data leds_pdata = { > /* GPIO keyboard */ > static struct gpio_keys_button buttons[] = { > { > - .code = KEY_RESTART, > + .code = KEY_VENDOR, > .gpio = P50_GPIO_LINE_BTN, > .active_low = 1, > .type = EV_KEY, >
diff --git a/drivers/platform/x86/barco-p50-gpio.c b/drivers/platform/x86/barco-p50-gpio.c index ca0b2564c407..f5c72e33f9ae 100644 --- a/drivers/platform/x86/barco-p50-gpio.c +++ b/drivers/platform/x86/barco-p50-gpio.c @@ -101,7 +101,7 @@ static struct gpio_led_platform_data leds_pdata = { /* GPIO keyboard */ static struct gpio_keys_button buttons[] = { { - .code = KEY_RESTART, + .code = KEY_VENDOR, .gpio = P50_GPIO_LINE_BTN, .active_low = 1, .type = EV_KEY,