Re: [PATCH v2 18/19] platform/x86: lenovo-yogabook: Add keyboard backlight control to platform driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Uwe, Andy,

On 5/5/23 11:21, Uwe Kleine-König wrote:
> On Fri, May 05, 2023 at 12:07:02PM +0300, Andy Shevchenko wrote:
>> On Thu, May 4, 2023 at 7:53 PM Uwe Kleine-König
>> <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
>>> On Sun, Apr 30, 2023 at 06:58:06PM +0200, Hans de Goede wrote:
>>
>> ...
>>
>>> I don't know much about x86, but I think the table belongs to where this
>>> "80862289:00" device is created.
>>
>> Just for your information, it's in drivers/acpi/acpi_lpss.c.
> 
> Compared to drivers/platform/x86/lenovo-yogabook-wmi.c this file is
> never compiled as a module and so patch #1 would become unnecessary.
> 
> That file also already has a pwm_lookup table.

Right, the Cherry Trail SoCs in question have 2 PWM controllers
the first controller is pretty much always used to control
the brightness of the LCD screen. So we have a fixed pwm_lookup
table for it there using the SoC's builtin display controller's
device_name() as consumer-device-name.

The second PWM controller however is different it is mostly unused
I'm aware of 2 cases where it is used and in both cases it is used
to control the brightness of a backlight for fixed (etched into the
glass) touch controls.

The problem is that in these cases there will be 2 totally different
consumer devices. Looking at the lookup tabel checks in pwm_get()
I see that it is possible to add a lookup which matches only by
dev_id. So I could use this here and this would then also be in
place for when I get around to writing a driver for the second
case (that I'm ware of) which needs access to the second PWM controller.

So this then just leaves the question of what to name the con-id,
since we won't be specifying a consumer-device-name I think it is
best to keep the con_id quite generic, e.g.:

"pwm_soc_lpss_2"

to match with the existing:

"pwm_soc_backlight"

for the first PWM controller.

Uwe, Andy, is using a pwm_lookup with only a con_id match on
"pwm_soc_lpss_2" ok with you ?

Regards,
Hans





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux