From: Alexander Kurz <akurz@blala.de>
To: Jacek Anaszewski <j.anaszewski@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
Alexander Shiyan <shc_work@mail.ru>,
Bryan Wu <cooloney@gmail.com>,
linux-leds@vger.kernel.org
Subject: Re: [PATCH] leds: leds-mc13783: Fix MC13892 keypad led access
Date: Mon, 10 Oct 2016 15:24:33 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.00.1610101516430.24427@blala.de> (raw)
In-Reply-To: <1d761a99-75d4-0092-3aa4-e878d5103908@samsung.com>
On Mon, 10 Oct 2016, Jacek Anaszewski wrote:
> Hi Alexander,
> > > It should write value << 3 to the register 52.
> > >
> > > According to the documentation [0] LEDKP0, LEDKP1 and LEDKP2
> > > are driven by bits 9,10 and 11 respectively. The calculations
> > > don't seem to be in line with that. Could you point what I
> > > am missing?
LEDKP0, LEDKP1 and LEDKP2 controlles the led current setting, but ...
> > >
> > > [0] http://www.nxp.com/files/analog/doc/data_sheet/MC13892.pdf
> >
> > The numbering mentioned in the DT documentation is used as offset
> > for the device specific struct mc13xxx_led_devtype.led_min
> > > if (of_property_read_u32(child, "reg", &tmp))
> > > continue;
> > > pdata->led[i].id = leds->devtype->led_min + tmp;
> > e.g. MC13892_LED_KP = MC13892_LED_MD + 2
> >
> > Hope this clarifies your question,
>
> Thanks but not entirely - what with the second part of question related
> to the register layout?
The LED brightness is controlled via the duty cycle bits allowing
64 brightness values, setting bits/registers like
LED | reg | bits
-----+-----+------
main | 0 | 3..8
aux | 0 | 15..20
kp | 1 | 3..8
red | 2 | 3..8
green| 2 | 15..20
blue | 3 | 3..8
hope to got your question right,
cheers, Alexander
>
> --
> Best regards,
> Jacek Anaszewski
>
next prev parent reply other threads:[~2016-10-10 13:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20161009134104eucas1p17d4028424741a2b6c758b268e50e6e12@eucas1p1.samsung.com>
2016-10-09 13:37 ` [PATCH] leds: leds-mc13783: Fix MC13892 keypad led access Alexander Kurz
2016-10-09 17:41 ` Alexander Shiyan
2016-10-09 19:15 ` Alexander Kurz
2016-10-10 12:14 ` Jacek Anaszewski
2016-10-10 12:22 ` Alexander Shiyan
2016-10-10 13:06 ` Jacek Anaszewski
2016-10-10 12:52 ` Alexander Kurz
2016-10-10 13:12 ` Jacek Anaszewski
2016-10-10 13:24 ` Alexander Kurz [this message]
2016-10-10 14:32 ` Jacek Anaszewski
2016-10-10 14:52 ` Alexander Kurz
2016-10-11 8:18 ` Jacek Anaszewski
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=alpine.DEB.2.00.1610101516430.24427@blala.de \
--to=akurz@blala.de \
--cc=cooloney@gmail.com \
--cc=j.anaszewski@samsung.com \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
--cc=shc_work@mail.ru \
/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