Re: [PATCH v4 2/3] backlight: dwi_bl: Add Apple DWI backlight driver

From: Daniel Thompson
Date: Thu Jan 09 2025 - 12:15:37 EST


On Thu, Jan 09, 2025 at 11:52:56PM +0800, Nick Chan wrote:
>
> Daniel Thompson 於 2025/1/8 下晝6:52 寫道:
> > On Wed, Dec 11, 2024 at 07:34:38PM +0800, Nick Chan wrote:
> >> Add driver for backlight controllers attached via Apple DWI 2-wire
> >> interface, which is found on some Apple iPhones, iPads and iPod touches
> >> with a LCD display.
> >>
> >> Although there is an existing apple_bl driver, it is for backlight
> >> controllers on Intel Macs attached via PCI, which is completely different
> >> from the Samsung-derived DWI block.
> >>
> >> Signed-off-by: Nick Chan <towinchenmi@xxxxxxxxx>
> >> ---
> >> drivers/video/backlight/Kconfig | 12 +++
> >> drivers/video/backlight/Makefile | 1 +
> >> drivers/video/backlight/dwi_bl.c | 122 +++++++++++++++++++++++++++++++
> > I'd rather this was called apple_dwi_bl.c to match that config options,
> > etc.
> Still trying to determine the type of the backlight control, I think
> it is linear however and I will send a new version when I am more
> certain.

If you've got an physicalinstance of the backlight then you can get a
general idea by comparing levels: 512, 1024, 1536 and 2047.

A linear backlight will feel make the gaps feel uneven (e.g. the
difference between 1536 and 2047 will look very different to the
difference difference between 512 and 1024). A logarithmic backligt
will make the perceived brightness intervals between the above all
feel pretty similar.


Daniel.