Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Stephen Warren
On 09/12/2012 12:54 AM, Thomas Petazzoni wrote: > Le Tue, 11 Sep 2012 16:17:13 -0600, > Stephen Warren a écrit : > >> >> +static struct mvebu_mpp_mode dove_mpp_modes[] = { >> +MPP_MODE(0, >> +MPP_FUNCTION(0x00, "gpio", NULL), >> +MPP_FUNCTION(0x02, "uart2", "rts"), >>

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Linus Walleij
On Wed, Sep 12, 2012 at 6:01 PM, Thomas Petazzoni wrote: > See for example > http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf, > which is the hardware datasheet for the 88F6281 Marvell SoC (Kirkwood > family). Table 26 on page 53 of the PDF is a good example.

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Thomas Petazzoni
Le Wed, 12 Sep 2012 17:50:48 +0200, Linus Walleij a écrit : > This is a valid reason to keep it as is in my book. > Readability along with a datasheet is important, most important > is that it has a good structure for those maintaining the driver. > > Is this datasheet available so I can get

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Linus Walleij
On Wed, Sep 12, 2012 at 8:54 AM, Thomas Petazzoni wrote: > This data structure really reflects what the datasheet says. Typically, > for SoCs where each pin is independently muxable (AT91, i.MX23/28, > Marvell, and probably many more), the datasheet has a big array, with > one line per pin, and

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Thomas Petazzoni
Le Tue, 11 Sep 2012 16:17:13 -0600, Stephen Warren a écrit : > > +static struct mvebu_mpp_mode dove_mpp_modes[] = { > + MPP_MODE(0, > + MPP_FUNCTION(0x00, "gpio", NULL), > + MPP_FUNCTION(0x02, "uart2", "rts"), > + MPP_FUNCTION(0x03, "sdio0", "cd"), > +

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Linus Walleij
On Wed, Sep 12, 2012 at 12:17 AM, Stephen Warren wrote: > the drivers in this patch seem to invert the data-structures a > little - in other words, instead of defining a global list of functions, > they define a list of groups, and for each group, list the functions > that can be selected on to

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Linus Walleij
On Wed, Sep 12, 2012 at 12:17 AM, Stephen Warren swar...@wwwdotorg.org wrote: the drivers in this patch seem to invert the data-structures a little - in other words, instead of defining a global list of functions, they define a list of groups, and for each group, list the functions that can

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Thomas Petazzoni
Le Tue, 11 Sep 2012 16:17:13 -0600, Stephen Warren swar...@wwwdotorg.org a écrit : +static struct mvebu_mpp_mode dove_mpp_modes[] = { + MPP_MODE(0, + MPP_FUNCTION(0x00, gpio, NULL), + MPP_FUNCTION(0x02, uart2, rts), + MPP_FUNCTION(0x03, sdio0, cd),

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Linus Walleij
On Wed, Sep 12, 2012 at 8:54 AM, Thomas Petazzoni thomas.petazz...@free-electrons.com wrote: This data structure really reflects what the datasheet says. Typically, for SoCs where each pin is independently muxable (AT91, i.MX23/28, Marvell, and probably many more), the datasheet has a big

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Thomas Petazzoni
Le Wed, 12 Sep 2012 17:50:48 +0200, Linus Walleij linus.wall...@linaro.org a écrit : This is a valid reason to keep it as is in my book. Readability along with a datasheet is important, most important is that it has a good structure for those maintaining the driver. Is this datasheet

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Linus Walleij
On Wed, Sep 12, 2012 at 6:01 PM, Thomas Petazzoni thomas.petazz...@free-electrons.com wrote: See for example http://www.marvell.com/embedded-processors/kirkwood/assets/HW_88F6281_OpenSource.pdf, which is the hardware datasheet for the 88F6281 Marvell SoC (Kirkwood family). Table 26 on page 53

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-12 Thread Stephen Warren
On 09/12/2012 12:54 AM, Thomas Petazzoni wrote: Le Tue, 11 Sep 2012 16:17:13 -0600, Stephen Warren swar...@wwwdotorg.org a écrit : +static struct mvebu_mpp_mode dove_mpp_modes[] = { +MPP_MODE(0, +MPP_FUNCTION(0x00, gpio, NULL), +MPP_FUNCTION(0x02, uart2, rts),

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-11 Thread Stephen Warren
On 09/11/2012 08:44 AM, Thomas Petazzoni wrote: > Hello Sebastian, > > Sorry for getting back to you so late about this patch set. I have been > very busy with other things. > > Le Mon, 10 Sep 2012 10:39:38 +0200, > Sebastian Hesselbarth a écrit : > >> v3: >> - list of functions is now built

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-11 Thread Thomas Petazzoni
Hello Sebastian, Sorry for getting back to you so late about this patch set. I have been very busy with other things. Le Mon, 10 Sep 2012 10:39:38 +0200, Sebastian Hesselbarth a écrit : > v3: > - list of functions is now built out of pin groups passed to core driver > instead of parsing DT

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-11 Thread Thomas Petazzoni
Hello Sebastian, Sorry for getting back to you so late about this patch set. I have been very busy with other things. Le Mon, 10 Sep 2012 10:39:38 +0200, Sebastian Hesselbarth sebastian.hesselba...@gmail.com a écrit : v3: - list of functions is now built out of pin groups passed to core

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-11 Thread Stephen Warren
On 09/11/2012 08:44 AM, Thomas Petazzoni wrote: Hello Sebastian, Sorry for getting back to you so late about this patch set. I have been very busy with other things. Le Mon, 10 Sep 2012 10:39:38 +0200, Sebastian Hesselbarth sebastian.hesselba...@gmail.com a écrit : v3: - list of

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-10 Thread Linus Walleij
On Mon, Sep 10, 2012 at 1:39 AM, Sebastian Hesselbarth wrote: > This patch adds a pinctrl driver core for Marvell SoCs plus DT > binding documentation. This core driver will be used by SoC family > specific drivers, i.e. Armada XP, Armada 370, Dove, Kirkwood, aso. > > Signed-off-by: Sebastian

[PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-10 Thread Sebastian Hesselbarth
This patch adds a pinctrl driver core for Marvell SoCs plus DT binding documentation. This core driver will be used by SoC family specific drivers, i.e. Armada XP, Armada 370, Dove, Kirkwood, aso. Signed-off-by: Sebastian Hesselbarth Signed-off-by: Thomas Petazzoni --- v2: - restructured

[PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-10 Thread Sebastian Hesselbarth
This patch adds a pinctrl driver core for Marvell SoCs plus DT binding documentation. This core driver will be used by SoC family specific drivers, i.e. Armada XP, Armada 370, Dove, Kirkwood, aso. Signed-off-by: Sebastian Hesselbarth sebastian.hesselba...@gmail.com Signed-off-by: Thomas Petazzoni

Re: [PATCH v3 1/9] pinctrl: mvebu: pinctrl driver core

2012-09-10 Thread Linus Walleij
On Mon, Sep 10, 2012 at 1:39 AM, Sebastian Hesselbarth sebastian.hesselba...@gmail.com wrote: This patch adds a pinctrl driver core for Marvell SoCs plus DT binding documentation. This core driver will be used by SoC family specific drivers, i.e. Armada XP, Armada 370, Dove, Kirkwood, aso.