platform/x86: x86-android-tablets: Add backlight ctrl for Lenovo Yoga Tab 3 Pro YT3...
authorHans de Goede <hdegoede@redhat.com>
Wed, 22 Feb 2023 21:42:26 +0000 (22:42 +0100)
committerHans de Goede <hdegoede@redhat.com>
Tue, 7 Mar 2023 11:08:31 +0000 (12:08 +0100)
commit607fbac0fccba506b4f9e47994504121db776956
treea1117086f32ec9d6d82633db417a13ed9e2824e2
parent9b1d2662b8c586eb10cb939c7ae2c25bb36d2b61
platform/x86: x86-android-tablets: Add backlight ctrl for Lenovo Yoga Tab 3 Pro YT3-X90F

The YT3 uses an TI LP8557 LED backlight controller, the LP8557's PWM input
is connected to a PWM output coming from the LCD panel's controller.

The Android kernel has a hack in the i915 driver to write the non-standard
DSI reg 0x51 with the desired level to set the duty-cycle of the LCD's PWM.

To avoid having to have a similar hack in the mainline kernel program
instantiate an i2c-client for the LP8557 with platform-data to have
the LP8557 to directly set the level (ignoring its PWM input), this allows
backlight brightness control through a backlight device registered by
the lp855x_bl driver.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20230301092331.7038-13-hdegoede@redhat.com
drivers/platform/x86/x86-android-tablets/lenovo.c