2012-06-18 09:21:06

by Roland Stigge

[permalink] [raw]
Subject: [PATCH] spi: spi-pl022: Adjust probe() to of_get_named_gpio() returning -EPROBE_DEFER

The patch to gpiolib-of.c providing -EPROBE_DEFER as a hint to defer
of_get_named_gpio*() to a later probe() breaks spi-pl022.c.

This patch adjusts to this change, using -EPROBE_DEFER as indication to defer.

Signed-off-by: Roland Stigge <[email protected]>

---
Applies to 3.5-rc3

Should this patch be joined with gpiolib-of's patch to of_get_named_gpio()? Or
should they just be issued as a series?

drivers/spi/spi-pl022.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.orig/drivers/spi/spi-pl022.c
+++ linux-2.6/drivers/spi/spi-pl022.c
@@ -2075,7 +2075,7 @@ pl022_probe(struct amba_device *adev, co
for (i = 0; i < num_cs; i++) {
int cs_gpio = of_get_named_gpio(np, "cs-gpios", i);

- if (cs_gpio == -ENODEV) {
+ if (cs_gpio == -EPROBE_DEFER) {
status = -EPROBE_DEFER;
goto err_no_gpio;
}


2012-06-18 11:13:25

by Roland Stigge

[permalink] [raw]
Subject: Re: [PATCH] spi: spi-pl022: Adjust probe() to of_get_named_gpio() returning -EPROBE_DEFER

On 06/18/2012 11:20 AM, Roland Stigge wrote:
> The patch to gpiolib-of.c providing -EPROBE_DEFER as a hint to defer
> of_get_named_gpio*() to a later probe() breaks spi-pl022.c.
>
> This patch adjusts to this change, using -EPROBE_DEFER as indication to defer.
>
> Signed-off-by: Roland Stigge <[email protected]>
>
> ---
> Applies to 3.5-rc3
>
> Should this patch be joined with gpiolib-of's patch to of_get_named_gpio()? Or
> should they just be issued as a series?
>
> drivers/spi/spi-pl022.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> --- linux-2.6.orig/drivers/spi/spi-pl022.c
> +++ linux-2.6/drivers/spi/spi-pl022.c
> @@ -2075,7 +2075,7 @@ pl022_probe(struct amba_device *adev, co
> for (i = 0; i < num_cs; i++) {
> int cs_gpio = of_get_named_gpio(np, "cs-gpios", i);
>
> - if (cs_gpio == -ENODEV) {
> + if (cs_gpio == -EPROBE_DEFER) {
> status = -EPROBE_DEFER;
> goto err_no_gpio;
> }

You can ignore this patch, Alexandre will merge this into his
yet-unapplied patch to support dt in spi-pl022.

Sorry for the noise,

Roland

2012-06-18 11:47:35

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH] spi: spi-pl022: Adjust probe() to of_get_named_gpio() returning -EPROBE_DEFER

On Mon, Jun 18, 2012 at 11:20 AM, Roland Stigge <[email protected]> wrote:

> The patch to gpiolib-of.c providing -EPROBE_DEFER as a hint to defer
> of_get_named_gpio*() to a later probe() breaks spi-pl022.c.
>
> This patch adjusts to this change, using -EPROBE_DEFER as indication to defer.
>
> Signed-off-by: Roland Stigge <[email protected]>

Acked-by: Linus Walleij <[email protected]>

> Should this patch be joined with gpiolib-of's patch to of_get_named_gpio()? Or
> should they just be issued as a series?

If it's not bisectable unless you change this in the same patch then join
them. Else I'd put them in a series and try to figure out a good tree for
merging them.

Yours,
Linus Walleij

Subject: Re: [PATCH] spi: spi-pl022: Adjust probe() to of_get_named_gpio() returning -EPROBE_DEFER

On Mon, Jun 18, 2012 at 8:47 AM, Linus Walleij <[email protected]> wrote:
> On Mon, Jun 18, 2012 at 11:20 AM, Roland Stigge <[email protected]> wrote:
>
>> The patch to gpiolib-of.c providing -EPROBE_DEFER as a hint to defer
>> of_get_named_gpio*() to a later probe() breaks spi-pl022.c.
>>
>> This patch adjusts to this change, using -EPROBE_DEFER as indication to defer.
>>
>> Signed-off-by: Roland Stigge <[email protected]>
>
> Acked-by: Linus Walleij <[email protected]>

Acked-by: Alexandre Pereira da Silva <[email protected]>

>> Should this patch be joined with gpiolib-of's patch to of_get_named_gpio()? Or
>> should they just be issued as a series?
>
> If it's not bisectable unless you change this in the same patch then join
> them. Else I'd put them in a series and try to figure out a good tree for
> merging them.

Ok, so lets keep the original patch as is for now.

2012-06-18 12:56:54

by Roland Stigge

[permalink] [raw]
Subject: Re: [PATCH] spi: spi-pl022: Adjust probe() to of_get_named_gpio() returning -EPROBE_DEFER

On 06/18/2012 01:51 PM, Alexandre Pereira da Silva wrote:
> On Mon, Jun 18, 2012 at 8:47 AM, Linus Walleij <[email protected]> wrote:
>> On Mon, Jun 18, 2012 at 11:20 AM, Roland Stigge <[email protected]> wrote:
>>
>>> The patch to gpiolib-of.c providing -EPROBE_DEFER as a hint to defer
>>> of_get_named_gpio*() to a later probe() breaks spi-pl022.c.
>>>
>>> This patch adjusts to this change, using -EPROBE_DEFER as indication to defer.
>>>
>>> Signed-off-by: Roland Stigge <[email protected]>
>>
>> Acked-by: Linus Walleij <[email protected]>
>
> Acked-by: Alexandre Pereira da Silva <[email protected]>
>
>>> Should this patch be joined with gpiolib-of's patch to of_get_named_gpio()? Or
>>> should they just be issued as a series?
>>
>> If it's not bisectable unless you change this in the same patch then join
>> them. Else I'd put them in a series and try to figure out a good tree for
>> merging them.
>
> Ok, so lets keep the original patch as is for now.

When Linus Acked both patches for *spi-pl022* (dt + gpio/defer fix), and
they are not yet applied, please merge them. No need to introduce
intermediate breakage.

You can keep my Signed or Acked line for exactly this.

We'll keep the patch for *gpiolib-of* separate, of course.

Thanks,

Roland