public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Felipe Balbi <me@felipebalbi.com>
Cc: linux-omap@vger.kernel.org, Felipe Balbi <felipe.balbi@nokia.com>
Subject: Re: [PATCH 01/33] add lp5521 driver
Date: Sun, 31 Aug 2008 13:39:21 -0700	[thread overview]
Message-ID: <200808311339.21660.david-b@pacbell.net> (raw)
In-Reply-To: <1220116593-862-2-git-send-email-me@felipebalbi.com>

On Saturday 30 August 2008, Felipe Balbi wrote:
> +static int lp5521_configure(struct i2c_client *client)
> +{
> +       int ret = 0;
> +
> +       /* Enable chip and set light to logarithmic mode*/
> +       ret |= lp5521_write(client, LP5521_REG_ENABLE, 0xc0);
> +
> +       /* setting all color pwms to direct control mode */
> +       ret |= lp5521_write(client, LP5521_REG_OP_MODE, 0x3f);
> +
> +       /* setting current to 4.7 mA for all channels */
> +       ret |= lp5521_write(client, LP5521_REG_R_CNTRL, LP5521_CURRENT_4m7);
> +       ret |= lp5521_write(client, LP5521_REG_G_CNTRL, LP5521_CURRENT_4m7);
> +       ret |= lp5521_write(client, LP5521_REG_B_CNTRL, LP5521_CURRENT_4m7);
> +
> +       /* Enable auto-powersave, set charge pump to auto, red to battery */
> +       ret |= lp5521_write(client, LP5521_REG_MISC, 0x3c);
> +

This highlights one reason many of these drivers haven't gone
upstream: embedding non-general assumptions.  In this case it
should be simple enough to define platform data to represent
various options like these ...

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-08-31 21:19 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-30 17:16 [PATCH 00/34] omap drivers going upstream Felipe Balbi
2008-08-30 17:16 ` [PATCH 01/33] add lp5521 driver Felipe Balbi
     [not found]   ` <1220116593-862-3-git-send-email-me@felipebalbi.com>
2008-08-30 17:16     ` [PATCH 03/33] add omap-sha1 driver Felipe Balbi
2008-08-30 17:16       ` [PATCH 04/33] add omap gpio expander driver Felipe Balbi
2008-08-30 17:16         ` [PATCH 05/33] add tlv320aic23 driver Felipe Balbi
2008-08-30 17:16           ` [PATCH 06/33] add tsl2563 driver Felipe Balbi
     [not found]             ` <1220116593-862-8-git-send-email-me@felipebalbi.com>
2008-08-30 17:16               ` [PATCH 08/33] add innovator ps2 keypad driver Felipe Balbi
2008-08-30 17:16                 ` [PATCH 09/33] add lm8323 " Felipe Balbi
2008-08-30 17:16                   ` [PATCH 10/33] Add twl4030 " Felipe Balbi
2008-08-30 17:16                     ` [PATCH 11/33] add tsc2301 " Felipe Balbi
2008-08-30 17:16                       ` [PATCH 12/33] Add tsc2005 touchscreen driver Felipe Balbi
2008-08-30 17:16                         ` [PATCH 13/33] Add omap " Felipe Balbi
2008-08-30 17:16                           ` [PATCH 14/33] add tsc210x " Felipe Balbi
2008-08-30 17:16                             ` [PATCH 15/33] add tsc2301 " Felipe Balbi
2008-08-30 17:16                               ` [PATCH 16/33] add omap led drivers Felipe Balbi
2008-08-30 17:16                                 ` [PATCH 17/33] add tea5761 radio driver Felipe Balbi
2008-08-30 17:16                                   ` [PATCH 18/33] add ov9640 sensor driver Felipe Balbi
     [not found]                                     ` <1220116593-862-20-git-send-email-me@felipebalbi.com>
2008-08-30 17:16                                       ` [PATCH 20/33] add omap Serial Trace Interface driver Felipe Balbi
2008-08-30 17:16                                         ` [PATCH 21/33] add OMAP HighSpeed mmc controller driver Felipe Balbi
2008-08-30 17:16                                           ` [PATCH 22/33] add omap nand drivers Felipe Balbi
2008-08-30 17:16                                             ` [PATCH 23/33] add omap irda driver Felipe Balbi
2008-08-30 17:16                                               ` [PATCH 24/33] add bq27x00 battery driver Felipe Balbi
2008-08-30 17:16                                                 ` [PATCH 25/33] add TWL4030 Battery Charger Interface driver Felipe Balbi
2008-08-30 17:16                                                   ` [PATCH 26/33] add TWL4030 RealTime Clock driver Felipe Balbi
2008-08-30 17:16                                                     ` [PATCH 27/33] add tsc210x driver Felipe Balbi
2008-08-30 17:16                                                       ` [PATCH 28/33] add tsc2301 driver Felipe Balbi
2008-08-30 17:16                                                         ` [PATCH 29/33] add omap ehci bus glue Felipe Balbi
2008-08-30 17:16                                                           ` [PATCH 30/33] add omap backlight support Felipe Balbi
2008-08-30 17:16                                                             ` [PATCH 31/33] add several omap lcd drivers Felipe Balbi
2008-08-30 17:16                                                               ` [PATCH 32/33] add omap 1-wire interface driver Felipe Balbi
2008-08-30 17:16                                                                 ` [PATCH 33/33] add bq27000 1-wire slave driver Felipe Balbi
2008-09-01 13:16                                                                 ` [PATCH 32/33] add omap 1-wire interface driver Madhusudhan Chikkature
2008-09-05 17:59                                                                   ` Tony Lindgren
2008-09-08 12:15                                                                     ` Madhusudhan Chikkature
2008-09-08 18:05                                                                       ` Tony Lindgren
2008-09-08 20:07                                                                         ` Russell King - ARM Linux
2008-09-09 13:38                                                                         ` Madhusudhan Chikkature
2008-08-31 21:12                                                             ` [PATCH 30/33] add omap backlight support David Brownell
2008-08-31 21:23                                                               ` Felipe Balbi
2008-08-31 21:44                                                                 ` Felipe Balbi
2008-08-31 21:09                                                           ` [PATCH 29/33] add omap ehci bus glue David Brownell
2008-08-31 21:25                                                             ` Felipe Balbi
2008-09-01  5:55                                                           ` Gadiyar, Anand
2008-09-01  7:56                                                             ` Felipe Balbi
2008-09-01  8:29                                                               ` Gadiyar, Anand
2008-09-01  7:35                                                         ` [PATCH 28/33] add tsc2301 driver Jarkko Nikula
2008-09-01  7:58                                                           ` Felipe Balbi
2008-09-01  8:11                                                             ` Jarkko Nikula
2008-09-01  8:37                                                               ` Felipe Balbi
2008-08-31 21:08                                             ` [PATCH 22/33] add omap nand drivers David Brownell
2008-08-31 21:28                                               ` Felipe Balbi
2008-09-05 18:07                                                 ` Tony Lindgren
2008-08-31 21:06                                           ` [PATCH 21/33] add OMAP HighSpeed mmc controller driver David Brownell
2008-08-31 21:31                                             ` Felipe Balbi
2008-08-31 21:51                                               ` David Brownell
2008-08-31 22:02                                                 ` Felipe Balbi
2008-09-04  1:02                                                   ` Tony Lindgren
2008-09-04 13:26                                             ` Madhusudhan Chikkature
2008-09-05  8:16                                               ` David Brownell
2008-09-02 22:05                                           ` Russell King - ARM Linux
2008-09-01  7:24                                   ` [PATCH 17/33] add tea5761 radio driver Jarkko Nikula
2008-09-01  7:59                                     ` Felipe Balbi
2008-09-03 15:01                                       ` Eduardo Valentin
2008-08-31 21:01                                 ` [PATCH 16/33] add omap led drivers David Brownell
2008-08-31 21:33                                   ` Felipe Balbi
2008-08-31 20:53                         ` [PATCH 12/33] Add tsc2005 touchscreen driver David Brownell
2008-08-31 21:35                           ` Felipe Balbi
2008-09-01  1:01                         ` andrzej zaborowski
2008-09-01  7:34                           ` Daniel Stone
2008-09-02 21:33                         ` Russell King - ARM Linux
2008-09-07 18:47                           ` David Brownell
2008-09-01  7:22           ` [PATCH 05/33] add tlv320aic23 driver Jarkko Nikula
2008-09-01  8:01             ` Felipe Balbi
2008-09-01  8:13               ` Jarkko Nikula
     [not found]                 ` <65e025470809010802m4c12a6eeh9cf5d3a3643ff5b8@mail.gmail.com>
2008-09-01 15:03                   ` Yuri Jaeger Monti
2008-09-01 15:19                   ` Felipe Balbi
2008-09-04  1:40                     ` Tony Lindgren
2008-08-31 20:51         ` [PATCH 04/33] add omap gpio expander driver David Brownell
2008-08-31 21:36           ` Felipe Balbi
2008-08-31 20:39   ` David Brownell [this message]
2008-08-31 21:41     ` [PATCH 01/33] add lp5521 driver Felipe Balbi
2008-08-31 22:37 ` [PATCH 00/34] omap drivers going upstream Felipe Balbi
2008-08-31 22:40   ` Felipe Balbi
2008-09-01  1:22   ` andrzej zaborowski
2008-09-01  8:04     ` Felipe Balbi
2008-09-01  1:46 ` andrzej zaborowski

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=200808311339.21660.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=felipe.balbi@nokia.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=me@felipebalbi.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