Re: [PATCH 1/3] pinctrl: Introduce PINCTRL_STATE_DEFAULT define, anduse it

From: Linus Walleij
Date: Fri Feb 24 2012 - 01:09:10 EST


On Fri, Feb 24, 2012 at 1:04 AM, Stephen Warren <swarren@xxxxxxxxxx> wrote:

> This provides a single centralized name for the default state.
>
> Update PIN_MAP_* macros to use this state name, instead of requiring the
> user to pass a state name in.
>
> Update documentation and mapping tables to use this.
>
> Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>

I like the direction this is taking for sure. This is however not
working because
it break U300, no hogs nor device requests work after this patch so I cannot
apply it.

I folded in this:

diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c
index 57ef1e6..ac12e08 100644
--- a/arch/arm/mach-u300/core.c
+++ b/arch/arm/mach-u300/core.c
@@ -1612,9 +1612,9 @@ static struct pinctrl_map __initdata u300_pinmux_map[] = {
PIN_MAP_SYS_HOG("pinmux-u300", "emif0"),
PIN_MAP_SYS_HOG("pinmux-u300", "emif1"),
/* per-device maps for MMC/SD, SPI and UART */
- PIN_MAP("MMCSD", "pinctrl-u300", "mmc0", "mmci"),
- PIN_MAP("SPI", "pinctrl-u300", "spi0", "pl022"),
- PIN_MAP("UART0", "pinctrl-u300", "uart0", "uart0"),
+ PIN_MAP(PINCTRL_STATE_DEFAULT, "pinctrl-u300", "mmc0", "mmci"),
+ PIN_MAP(PINCTRL_STATE_DEFAULT, "pinctrl-u300", "spi0", "pl022"),
+ PIN_MAP(PINCTRL_STATE_DEFAULT, "pinctrl-u300", "uart0", "uart0"),
};

struct u300_mux_hog {
@@ -1646,7 +1646,7 @@ static int __init u300_pinctrl_fetch(void)
struct pinctrl *p;
int ret;

- p = pinctrl_get(u300_mux_hogs[i].dev, NULL);
+ p = pinctrl_get(u300_mux_hogs[i].dev, PINCTRL_STATE_DEFAULT);
if (IS_ERR(p)) {
pr_err("u300: could not get pinmux hog %s\n",
u300_mux_hogs[i].name);


Still no luck :-(

What am I missing?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/