From: Linus Walleij <linus.walleij@linaro.org>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Hans Verkuil <hverkuil@xs4all.nl>
Cc: Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
Linux LED Subsystem <linux-leds@vger.kernel.org>,
newbytee@protonmail.com, Stephan Gerhold <stephan@gerhold.net>
Subject: Re: [PATCH 2/2] leds: rt8515: Add Richtek RT8515 LED driver
Date: Wed, 14 Oct 2020 12:52:10 +0200 [thread overview]
Message-ID: <CACRpkdYgf8OPc2EqmPu=O2dr+ns4e3kTGyVi3A2Thd9v1wQGuA@mail.gmail.com> (raw)
In-Reply-To: <c45a2758-cb43-2ccb-4056-ed25d73fa3f8@gmail.com>
Hi Jakub!
thanks for the review. I fixed all comments but I have a problem
with the below:
On Thu, Aug 13, 2020 at 11:04 PM Jacek Anaszewski
<jacek.anaszewski@gmail.com> wrote:
> On 8/12/20 11:07 AM, Linus Walleij wrote:
> > + /* Init flash intensity setting */
> > + s = &v4l2_sd_cfg->intensity;
> > + s->min = 0;
> > + s->max = rt->fled.led_cdev.max_brightness;
> > + s->step = 1;
>
> struct v4l2_flash_config's intensity property tells V4L2 flash framework
> how to convert LED class brightness levels to microamperes used by
> the V4L2 flash subdevice.
>
> See max77693_init_v4l2_flash_config() in drivers/leds/leds-max77693.c
> for a reference.
I understand, but I'm a bit of lost here, because I do not have
any datsheet for the Richtek RT8515. The outoftree code
that exists for example for Asus Zenfone:
https://github.com/ZenfoneArea/android_kernel_asus_zenfone5/blob/master/linux/modules/camera/drivers/media/i2c/rt8515.c
The intensity is set to min/max in percent
(0-100%) so the numerals 1-100 step 1 so
the same as the brightness.
Is the V4L2 API such defined that if you don't know
what microamperes that correspond to a certain setting
it is better to simply not implement it? I can certainly
remove it.
I don't quite understand why V4L2 needs to control this
in uA but I suppose they have a good reason. It however
creates a really high bar for out-of-tree code from
non-cooperative vendors. I'll try to send a mail to
Richtek and ask for the datasheet though, stranger things
have happened.
Yours,
Linus Walleij
next prev parent reply other threads:[~2020-10-14 10:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-12 9:07 [PATCH 1/2] dt-bindings: leds: Add DT binding for Richtek RT8515 Linus Walleij
2020-08-12 9:07 ` [PATCH 2/2] leds: rt8515: Add Richtek RT8515 LED driver Linus Walleij
2020-08-13 21:04 ` Jacek Anaszewski
2020-10-14 10:52 ` Linus Walleij [this message]
2020-10-15 20:39 ` Jacek Anaszewski
2020-08-13 21:06 ` [PATCH 1/2] dt-bindings: leds: Add DT binding for Richtek RT8515 Jacek Anaszewski
2020-08-19 21:05 ` Linus Walleij
2020-08-19 21:20 ` Jacek Anaszewski
2020-09-09 8:37 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACRpkdYgf8OPc2EqmPu=O2dr+ns4e3kTGyVi3A2Thd9v1wQGuA@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=dmurphy@ti.com \
--cc=hverkuil@xs4all.nl \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-leds@vger.kernel.org \
--cc=newbytee@protonmail.com \
--cc=pavel@ucw.cz \
--cc=stephan@gerhold.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).