Re: [PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-18 Thread Andy Shevchenko
On Fri, Jun 16, 2017 at 10:35 AM, Kai-Heng Feng wrote: > Dell Latitude 3160 does not have keyboard backlight, but there is a > sysfs interface for it, which does nothing at all. > > KBD_LED_OFF_TOKEN is the only token can be found. Since it doesn't have >

Re: [PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-18 Thread Andy Shevchenko
On Fri, Jun 16, 2017 at 10:35 AM, Kai-Heng Feng wrote: > Dell Latitude 3160 does not have keyboard backlight, but there is a > sysfs interface for it, which does nothing at all. > > KBD_LED_OFF_TOKEN is the only token can be found. Since it doesn't have > KBD_LED_ON_TOKEN or KBD_LED_AUTO_*_TOKEN,

Re: [PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-16 Thread Andy Shevchenko
On Fri, Jun 16, 2017 at 10:52 AM, Pali Rohár wrote: > On Friday 16 June 2017 15:35:39 Kai-Heng Feng wrote: >> - if (kbd_token_bits != 0 || ret == 0) >> + /* >> + * If KBD_LED_OFF_TOKEN is the only token, >> + * consider there is no keyboard backlight. >> +

Re: [PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-16 Thread Andy Shevchenko
On Fri, Jun 16, 2017 at 10:52 AM, Pali Rohár wrote: > On Friday 16 June 2017 15:35:39 Kai-Heng Feng wrote: >> - if (kbd_token_bits != 0 || ret == 0) >> + /* >> + * If KBD_LED_OFF_TOKEN is the only token, >> + * consider there is no keyboard backlight. >> + */ >> + if

Re: [PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-16 Thread Pali Rohár
On Friday 16 June 2017 17:46:58 Kai-Heng Feng wrote: > On Fri, Jun 16, 2017 at 3:52 PM, Pali Rohár wrote: > > Should not this check to be rather: > > > > (kbd_token_bits != 0 && (kbd_token_bits & BIT(KBD_LED_OFF_TOKEN)) != > > BIT(KBD_LED_OFF_TOKEN)) > > > > To express that

Re: [PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-16 Thread Pali Rohár
On Friday 16 June 2017 17:46:58 Kai-Heng Feng wrote: > On Fri, Jun 16, 2017 at 3:52 PM, Pali Rohár wrote: > > Should not this check to be rather: > > > > (kbd_token_bits != 0 && (kbd_token_bits & BIT(KBD_LED_OFF_TOKEN)) != > > BIT(KBD_LED_OFF_TOKEN)) > > > > To express that we have at least one

Re: [PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-16 Thread Kai-Heng Feng
On Fri, Jun 16, 2017 at 3:52 PM, Pali Rohár wrote: > Should not this check to be rather: > > (kbd_token_bits != 0 && (kbd_token_bits & BIT(KBD_LED_OFF_TOKEN)) != > BIT(KBD_LED_OFF_TOKEN)) > > To express that we have at least one token at it is different from >

Re: [PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-16 Thread Kai-Heng Feng
On Fri, Jun 16, 2017 at 3:52 PM, Pali Rohár wrote: > Should not this check to be rather: > > (kbd_token_bits != 0 && (kbd_token_bits & BIT(KBD_LED_OFF_TOKEN)) != > BIT(KBD_LED_OFF_TOKEN)) > > To express that we have at least one token at it is different from > KBD_LED_OFF_TOKEN token? Yes, this

Re: [PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-16 Thread Pali Rohár
Hi! On Friday 16 June 2017 15:35:39 Kai-Heng Feng wrote: > Dell Latitude 3160 does not have keyboard backlight, but there is a > sysfs interface for it, which does nothing at all. > > KBD_LED_OFF_TOKEN is the only token can be found. Since it doesn't have > KBD_LED_ON_TOKEN or

Re: [PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-16 Thread Pali Rohár
Hi! On Friday 16 June 2017 15:35:39 Kai-Heng Feng wrote: > Dell Latitude 3160 does not have keyboard backlight, but there is a > sysfs interface for it, which does nothing at all. > > KBD_LED_OFF_TOKEN is the only token can be found. Since it doesn't have > KBD_LED_ON_TOKEN or

[PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-16 Thread Kai-Heng Feng
Dell Latitude 3160 does not have keyboard backlight, but there is a sysfs interface for it, which does nothing at all. KBD_LED_OFF_TOKEN is the only token can be found. Since it doesn't have KBD_LED_ON_TOKEN or KBD_LED_AUTO_*_TOKEN, it should be safe to assume it does not support keyboard

[PATCH] platform/x86: dell-laptop: Fix bogus keyboard backlight sysfs interface

2017-06-16 Thread Kai-Heng Feng
Dell Latitude 3160 does not have keyboard backlight, but there is a sysfs interface for it, which does nothing at all. KBD_LED_OFF_TOKEN is the only token can be found. Since it doesn't have KBD_LED_ON_TOKEN or KBD_LED_AUTO_*_TOKEN, it should be safe to assume it does not support keyboard