[RFC][PATCH] regulator: rpi-panel: Add regulator/backlight driver for RPi panel

Marek Vasut marex at denx.de
Thu Jul 30 19:37:48 UTC 2020


On 7/30/20 9:13 PM, Mark Brown wrote:
> On Thu, Jul 30, 2020 at 06:28:07PM +0200, Marek Vasut wrote:
>> On 7/30/20 5:59 PM, Sam Ravnborg wrote:
>>> On Wed, Jul 29, 2020 at 11:46:45PM +0200, Marek Vasut wrote:
> 
>>>> This regulator/backlight driver handles the ATTINY88 present on the
>>>> RPi 7" touchscreen panel and exposes the power/backlight interfaces.
> 
>>> It looks strange that the regulator and the backligth are defined in the
>>> same module like this.
> 
>> It's one chip, attiny with custom firmware, what do you want me to do
>> about it ? I can over-complicate this and split it into multiple
>> drivers, but I don't think it's worth the complexity, considering that
>> this is likely a one-off device which will never be re-used elsewhere,
>> except on this one particular display module for RPi.
> 
> Now you've written that you've pretty much guaranteed someone's going to
> use the same component elsewhere :)

How? The firmware is closed and not available, neither is documentation
for it, sadly.

> I think my main question would be that if this is going to be written
> like this shouldn't it be a backlight driver rather than a regulator
> driver?

Well no, because it enables power to the display backlight and TC358762
DSI-to-DPI bridge first, and then also controls some PWM implementation
in the attiny firmware later on. So I think it has to be regulator, as
that is the primary function. The backlight is somewhat secondary.

> I don't 100% follow how this would actually get used in a
> system (perhaps the binding would help) but for these things if there's
> only one tightly coupled user that's possible it's sometimes simpler to
> just skip APIs and do things directly.

That's what I'm trying to replace by this patch and tc358762 bridge
driver and panel driver, the combined version is already in tree:
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
but the tc358762 is clearly a generic bridge and the panel is generic
too, so combining it into one panel driver doesn't seem right.


More information about the dri-devel mailing list