lkml.org 
[lkml]   [2013]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [NEW DRIVER V4 5/7] DA9058 GPIO driver
From
On Fri, Apr 12, 2013 at 3:05 PM, Anthony Olech
<anthony.olech.opensource@diasemi.com> wrote:

> This is the GPIO component driver of the Dialog DA9058 PMIC.
> This driver is just one component of the whole DA9058 PMIC driver.
> It depends on the CORE component driver of the DA9058 MFD.
> The meaning of the PMIC register 21 bits 1 and 5 has been documented
> in the driver source.
>
> Signed-off-by: Anthony Olech <anthony.olech.opensource@diasemi.com>
> Signed-off-by: David Dajun Chen <david.chen@diasemi.com>

Looks OK to me.
Acked-by: Linus Walleij <linus.walleij@linaro.org>

> + /*
> + * INP configured pins:
> + * 9 == DebounceOn+ActiceLowPullUp
> + *
> + * OUT configured pins:
> + * 7 == PushPull+ExternalPullUpToVDDIO
> + * 3 == PushPull+InternalPullUpToVDDIO
> + * 2 == OpenDrain+InternalPullUpToVDDIO
> + */
> +
> + gpio->inp_config = 0x99;
> + gpio->out_config = 0x77;

Looks pretty hardcoded, and should be - if you want to make this
runtime or DT/platforms configurable you need to migrate the driver
to pinctrl, which is the place where we do things like this.

Yours,
Linus Walleij


\
 
 \ /
  Last update: 2013-04-13 00:41    [W:0.439 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site