[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGsJ_4yeudp+5J-D6RQ4G4HP9fKjfqLrPuu-OQezQcqBF=ycXw@mail.gmail.com>
Date: Thu, 1 Sep 2011 19:35:47 +0800
From: Barry Song <21cnbao@...il.com>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Barry Song <Baohua.Song@....com>,
Stephen Warren <swarren@...dia.com>,
linus.walleij@...ricsson.com, linux-kernel@...r.kernel.org,
workgroup.linux@....com, Rongjun Ying <rongjun.ying@....com>,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2] pinmux: add a driver for the CSR SiRFprimaII pinmux
2011/9/1 Linus Walleij <linus.walleij@...aro.org>
>
> On Thu, Sep 1, 2011 at 4:22 AM, Barry Song <Baohua.Song@....com> wrote:
>
> > -v2:
> > rebase to Linus W's v5 patch(v5 is still in discussion);
> > add complete pinmux list table;
> > add gpio ranges;
> > replace mask magic number by bitops;
> > rename upmx to spmx
>
> No further comments on this, but now I went in and rewrote
> pinmuxing a bit so that pin groups are a separate concept from
> pinmux (which just refers to a group). Please have a look at
> the U300 driver and see if you can accomodate the changes.
>
> Sorry for the flow of respins but I'm really liking the stuff that
> has come out as a result of Stephen's feedback. Having
> separate groups and functions may look a bit crufty on
> simple pinmuxes but I'm pretty convinced it'll be a win
> for the subsystem when moving to more complex drivers.
>
never mind. it is not too difficult for me to rebase the patch. and
i'm happy to see the great job of you and Stephen.
> > +static const struct sirfsoc_pinmux_func sirfsoc_pinmux_funcs[] = {
> > + {
> > + .name = "lcd_16bits",
> > + .pins = lcd_16bits_pins,
> > + .num_pins = ARRAY_SIZE(lcd_16bits_pins),
> > + .padmux = &lcd_16bits_padmux,
> > + }, {
> > + .name = "lcd_18bits",
> > + .pins = lcd_18bits_pins,
> > + .num_pins = ARRAY_SIZE(lcd_18bits_pins),
> > + .padmux = &lcd_18bits_padmux,
> > + }, {
>
> You can probably simplify this and other things with
> preprocessor macros if you want to, like:
>
> #define SIRF_FUNC_ENTRY(a) \
> { .name = "##a##", .pins = ##a##_pins, .num_pins =
> ARRAY_SIZE(##a##_pins), .padmux = &##a##_padmux }
>
> Then just:
>
> static const struct sirfsoc_pinmux_func sirfsoc_pinmux_funcs[] = {
> SIRF_FUNC_ENTRY(lcd_16bits),
>
>
> The macro syntax is probably wrong, the preprocessor always
> craze me out, but you get the idea.
i think it is a good idea.
>
> Thanks,
> Linus Walleij
>
Thanks
barry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists