summaryrefslogtreecommitdiffstats
path: root/Documentation/sound
diff options
context:
space:
mode:
authorKenneth Chan <kenneth.t.chan@gmail.com>2020-08-22 02:14:33 +0800
committerHans de Goede <hdegoede@redhat.com>2020-11-10 14:49:50 +0100
commit25dd390c6206c3e0f9e0551fca030a5f909564eb (patch)
tree2ca05dd84ac89324ae7c61b8c4ff4bce8b1ffa2d /Documentation/sound
parent468f96bfa3a045450f54c96e63db786b0b5fcab2 (diff)
downloadlinux-stable-25dd390c6206c3e0f9e0551fca030a5f909564eb.tar.gz
linux-stable-25dd390c6206c3e0f9e0551fca030a5f909564eb.tar.bz2
linux-stable-25dd390c6206c3e0f9e0551fca030a5f909564eb.zip
platform/x86: panasonic-laptop: Add sysfs attributes for firmware brightness registers
Panasonic laptops (at least from CF-W4 onwards) have dedicated firmware registers for saving ac/dc and current brightness. They are a bit confusing so here's some explanations: AC_MIN_BRIGHT, AC_MAX_BRIGHT, DC_MIN_BRIGHT, DC_MAX_BRIGHT: Read-only. Values: 0x01 and 0x15 respectively. AC_CUR_BRIGHT, DC_CUR_BRIGHT: Read-Write. 0x00-0xFF. Store user-defined AC/DC brightness. However, they do not represent current brightness so they should be named AC_BRIGHT and DC_BRIGHT instead. CUR_BRIGHT (present since CF-W4): Read-Write. 0x00-0xFF. It sets the current brightness. It won't update itself if brightness is changed via other means, e.g. acpi_video0. Another CUR_BRIGHT (added since CF-W5): Read-Write. 0x01-0x15. Its value always synchronizes with current brightness. Not implemented in this version. Currently the backlight API interacts with AC_CUR_BRIGHT (probably because it's the only bl register available in earlier models?). This patch adds sysfs attributes for AC_CUR_BRIGHT, DC_CUR_BRIGHT and CUR_BRIGHT. It also fixes the error of https://lkml.org/lkml/2020/8/19/1264. PS: I think the backlight API should interact with CUR_BRIGHT instead of AC_CUR_BRIGHT. But it involves complications like mapping between 0x01-0x15 or 0x00-0x14 (the backlight API) and 0x00-0xFF (CUR_BRIGHT). I'll leave the discussion for a later version. Signed-off-by: Kenneth Chan <kenneth.t.chan@gmail.com> Link: https://lore.kernel.org/r/20200821181433.17653-10-kenneth.t.chan@gmail.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'Documentation/sound')
0 files changed, 0 insertions, 0 deletions