lkml.org 
[lkml]   [2017]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] dell-laptop: Fix keyboard led max_brightness property for Dell Latitude E6410
On Sun, Oct 15, 2017 at 06:03:14PM +0200, Pali Rohár wrote:
> This machine reports number of keyboard backlight led levels, instead of
> value of the last led level index. Therefore max_brightness properly needs
> to be subtracted by 1 to match led max_brightness API.

Which field is behaving differently?

If I'm understanding this correctly:

Since the max level is something we test for once at runtime, it seems
to me a cleaner fix would be to check for this quirk in kbd_get_info()
and set kbd_info.levels accordingly. The rest of the driver logic would
then remain unchanged.

The idea being to translate what the platform firmware reports into what
the driver already understands, instead of giving the levels fields of
the structure multiple meanings.

--
Darren Hart
VMware Open Source Technology Center

\
 
 \ /
  Last update: 2017-10-16 23:49    [W:0.702 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site