Camera LED on Librem 5 was Re: [PATCH] backlight: add led-backlight driver

Pavel Machek pavel at ucw.cz
Sun Aug 23 17:22:42 EDT 2020


Hi!

> > > > This patch adds a led-backlight driver (led_bl), which is similar to
> > > > pwm_bl except the driver uses a LED class driver to adjust the
> > > > brightness in the HW. Multiple LEDs can be used for a single backlight.
> > > 
> > > Tested-by: Guido Günther <agx at sigxcpu.org>
> > 
> > Thanks for testing!
> > 
> > I noticed blog post about using Librem 5 torch. Unfortunately, it used
> > very strange/non-standard interface, first using LED as a GPIO to
> > enable LED controller, then direct i2c access. That is not acceptable
> > interface for mainline, and it would be better not to advertise such
> > code, as it will likely become broken in future.
> 
> I agree, there's a driver for the lm3560 in media/ but how would one
> expose the torch part as a LED? It seems you hit something similar in
> 
>     https://lkml.org/lkml/2018/5/6/30

(Actually, I might have been wrong in that comment).

> I also couldn't find an in tree driver that registers a flashlight
> as a v4l subdev. Did i miss that?

You should get interface similar to this:

https://wiki.postmarketos.org/wiki/PINE64_PinePhone_(pine64-pinephone)

and the driver to enable that should already be in the mainline:

drivers/leds/leds-sgm3140.c

Best regards and good luck,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200823/912dec4c/attachment.sig>


More information about the linux-arm-kernel mailing list