From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: linux-pwm@vger.kernel.org,
Thierry Reding <thierry.reding@gmail.com>,
linux-leds@vger.kernel.org,
Jacek Anaszewski <j.anaszewski@samsung.com>,
Bryan Wu <cooloney@gmail.com>
Subject: Re: [RFC PATCH] pwm: add TLC59108/TLC59116 PWM driver
Date: Tue, 18 Aug 2015 17:58:15 +0300 [thread overview]
Message-ID: <55D34807.2020609@ti.com> (raw)
In-Reply-To: <20150818141959.GF4381@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 1816 bytes --]
On 18/08/15 17:19, Andrew Lunn wrote:
>> +Required properties:
>> + - compatible: "ti,tlc59108-pwm" or "ti,tlc59116-pwm"
>> + - #pwm-cells: should be 2. See pwm.txt in this directory for a description of
>> + the cells format.
>> + - reg: physical base address and size of the registers map.
>
> Cut and paste error. Reg is the i2c address.
Oh, right. Thanks.
>> +static int tlc591xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
>> + int duty_ns, int period_ns)
>> +{
>> + struct tlc591xx_priv *priv = to_tlc591xx_priv(chip);
>> + unsigned val;
>> + int r;
>> +
>> + if (period_ns != TLC591XX_CLK_PERIOD) {
>> + dev_err(chip->dev, "only period of 10309 ns is supported\n");
>> + return -EINVAL;
>> + }
>
> The hardware does allow you to change the period, but there is only
> one clock generator for all the channels. If you are going to make the
Hmm... How does that work?
The per-led output is fixed 97-kHz. Then there's the group dimming
signal, which can be superimposed on all the individual outputs, with
fixed 190-Hz. Neither frequency can be tuned. And when using group
dimming, the output isn't exactly PWM anymore, but two PWM signals combined.
Is there some other setting I'm missing?
These group dimming features don't quite fit into PWM model, I guess.
Then again, I don't think LED framework offers any ways to utilize them
either.
> effort to try to model the hardware as a PWM, you should try to
> actually implement the PWM API. Let the first channel which calls
> config set the period, and return an error for any other channel which
> picks a different period.
If there is a way to set the period, I think it may be better to define
it in the TLC's DT data than by "whoever gets there first".
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-08-18 14:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 13:52 [RFC PATCH] pwm: TLC591xx PWM driver Tomi Valkeinen
2015-08-18 13:52 ` [RFC PATCH] pwm: add TLC59108/TLC59116 " Tomi Valkeinen
2015-08-18 14:19 ` Andrew Lunn
2015-08-18 14:58 ` Tomi Valkeinen [this message]
2015-08-18 15:14 ` Andrew Lunn
2015-08-18 15:09 ` [RFC PATCH] pwm: TLC591xx " Andrew Lunn
2015-08-19 10:24 ` Thierry Reding
2015-08-19 10:52 ` Tomi Valkeinen
2015-08-19 13:31 ` Andrew Lunn
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=55D34807.2020609@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=andrew@lunn.ch \
--cc=cooloney@gmail.com \
--cc=j.anaszewski@samsung.com \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/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