mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@avionic-design.de>
To: "Kim, Milo" <Milo.Kim@ti.com>
Cc: Richard Purdie <rpurdie@rpsys.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH v2 2/2] backlight: add new lp8788 backlight driver
Date: Thu, 3 Jan 2013 10:05:39 +0100	[thread overview]
Message-ID: <20130103090538.GB1845@avionic-0098.adnet.avionic-design.de> (raw)
In-Reply-To: <A874F61F95741C4A9BA573A70FE3998F69E11090@DQHE02.ent.ti.com>

[-- Attachment #1: Type: text/plain, Size: 1804 bytes --]

On Thu, Jan 03, 2013 at 08:54:27AM +0000, Kim, Milo wrote:
> Hi Thierry,
> 
> > > (Platform data)
> > > Configurable data can be defined in the platform side.
> > >  name                  : backlight driver name. (default: "lcd-
> > backlight")
> > >  initial_brightness    : initial value of backlight brightness
> > >  bl_mode               : brightness control by PWM or lp8788 register
> > >  dim_mode              : dimming mode selection
> > >  full_scale            : full scale current setting
> > >  rise_time             : brightness ramp up step time
> > >  fall_time             : brightness ramp down step time
> > >  pwm_pol               : PWM polarity setting when bl_mode is PWM
> > based
> > 
> > You might want to consider using enum pwm_polarity from linux/pwm.h
> > instead and convert to the driver representation internally.
> > 
> > I'm saying this because I'm thinking about extending the PWM framework
> > to allow PWM polarity and period to be specified in the PWM lookup
> > table
> > so that they can be treated transparently, independent of whether they
> > are obtained from DT or the lookup table.
> > 
> > That would allow the polarity and period to be retrieved with accessors
> > like pwm_get_polarity() and pwm_get_period().
> 
> OK, pwm_pol will be replaced with pwm_get_polarity() in the next patch.

No, you can't do that yet because it will only work if you get the PWM
from DT. I meant that once the pieces in the PWM framework are there we
could encode the polarity in the PWM lookup table and *then* use
pwm_get_polarity() to obtain it instead of via platform data.

For now, I think you should only convert it to enum pwm_polarity so that
at least the data type is the same as the one used in the PWM framework.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2013-01-03  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21  7:55 Kim, Milo
2012-12-21 22:28 ` Andrew Morton
2013-01-03  8:08 ` Thierry Reding
2013-01-03  8:54   ` Kim, Milo
2013-01-03  9:05     ` Thierry Reding [this message]
2013-01-22  0:32 ` Samuel Ortiz

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=20130103090538.GB1845@avionic-0098.adnet.avionic-design.de \
    --to=thierry.reding@avionic-design.de \
    --cc=Milo.Kim@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpurdie@rpsys.net \
    --cc=sameo@linux.intel.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

Powered by JetHome