Linux-GPIO Archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: max732x: Add missing dev reference to gpiochip
@ 2015-06-30 18:04 Marek Vasut
  2015-07-16 11:43 ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2015-06-30 18:04 UTC (permalink / raw
  To: linux-gpio
  Cc: Marek Vasut, Alexandre Courbot, Linus Walleij, Mans Rullgard,
	Olaf Mandel, Semen Protsenko

In case the gpiochip doesn't have the .dev field set, as is the case
in here, it is not possible to reference this device in DT as a GPIO
controller. A good example of this problem is that gpio-leds can not
be used when connected to this chip, the gpio-leds driver bails out
with -EPROBE_DEFER.

Fix this problem by setting the .dev field of the gpio_chip to the
parent i2c device.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mans Rullgard <mans@mansr.com>
Cc: Olaf Mandel <o.mandel@menlosystems.com>
Cc: Semen Protsenko <semen.protsenko@globallogic.com>
---
 drivers/gpio/gpio-max732x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-max732x.c b/drivers/gpio/gpio-max732x.c
index 0fa4543..aba8337 100644
--- a/drivers/gpio/gpio-max732x.c
+++ b/drivers/gpio/gpio-max732x.c
@@ -596,6 +596,7 @@ static int max732x_setup_gpio(struct max732x_chip *chip,
 	gc->base = gpio_start;
 	gc->ngpio = port;
 	gc->label = chip->client->name;
+	gc->dev = &chip->client->dev;
 	gc->owner = THIS_MODULE;
 
 	return port;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: max732x: Add missing dev reference to gpiochip
  2015-06-30 18:04 [PATCH] gpio: max732x: Add missing dev reference to gpiochip Marek Vasut
@ 2015-07-16 11:43 ` Linus Walleij
  2015-08-14 21:10   ` Marek Vasut
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2015-07-16 11:43 UTC (permalink / raw
  To: Marek Vasut
  Cc: linux-gpio@vger.kernel.org, Alexandre Courbot, Mans Rullgard,
	Olaf Mandel, Semen Protsenko

On Tue, Jun 30, 2015 at 8:04 PM, Marek Vasut <marex@denx.de> wrote:

> In case the gpiochip doesn't have the .dev field set, as is the case
> in here, it is not possible to reference this device in DT as a GPIO
> controller. A good example of this problem is that gpio-leds can not
> be used when connected to this chip, the gpio-leds driver bails out
> with -EPROBE_DEFER.
>
> Fix this problem by setting the .dev field of the gpio_chip to the
> parent i2c device.
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Alexandre Courbot <gnurou@gmail.com>
> Cc: Linus Walleij <linus.walleij@linaro.org>
> Cc: Mans Rullgard <mans@mansr.com>
> Cc: Olaf Mandel <o.mandel@menlosystems.com>
> Cc: Semen Protsenko <semen.protsenko@globallogic.com>

Patch applied for fixes.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: max732x: Add missing dev reference to gpiochip
  2015-07-16 11:43 ` Linus Walleij
@ 2015-08-14 21:10   ` Marek Vasut
  2015-08-20  8:23     ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Marek Vasut @ 2015-08-14 21:10 UTC (permalink / raw
  To: Linus Walleij
  Cc: linux-gpio@vger.kernel.org, Alexandre Courbot, Mans Rullgard,
	Olaf Mandel, Semen Protsenko

On Thursday, July 16, 2015 at 01:43:13 PM, Linus Walleij wrote:
> On Tue, Jun 30, 2015 at 8:04 PM, Marek Vasut <marex@denx.de> wrote:
> > In case the gpiochip doesn't have the .dev field set, as is the case
> > in here, it is not possible to reference this device in DT as a GPIO
> > controller. A good example of this problem is that gpio-leds can not
> > be used when connected to this chip, the gpio-leds driver bails out
> > with -EPROBE_DEFER.
> > 
> > Fix this problem by setting the .dev field of the gpio_chip to the
> > parent i2c device.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Cc: Alexandre Courbot <gnurou@gmail.com>
> > Cc: Linus Walleij <linus.walleij@linaro.org>
> > Cc: Mans Rullgard <mans@mansr.com>
> > Cc: Olaf Mandel <o.mandel@menlosystems.com>
> > Cc: Semen Protsenko <semen.protsenko@globallogic.com>
> 
> Patch applied for fixes.

Hi,

I don't see this one in -next , did it get lost or something please ?

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: max732x: Add missing dev reference to gpiochip
  2015-08-14 21:10   ` Marek Vasut
@ 2015-08-20  8:23     ` Linus Walleij
  2015-08-20  9:03       ` Marek Vasut
  0 siblings, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2015-08-20  8:23 UTC (permalink / raw
  To: Marek Vasut
  Cc: linux-gpio@vger.kernel.org, Alexandre Courbot, Mans Rullgard,
	Olaf Mandel, Semen Protsenko

On Fri, Aug 14, 2015 at 11:10 PM, Marek Vasut <marex@denx.de> wrote:
> On Thursday, July 16, 2015 at 01:43:13 PM, Linus Walleij wrote:
>> On Tue, Jun 30, 2015 at 8:04 PM, Marek Vasut <marex@denx.de> wrote:
>> > In case the gpiochip doesn't have the .dev field set, as is the case
>> > in here, it is not possible to reference this device in DT as a GPIO
>> > controller. A good example of this problem is that gpio-leds can not
>> > be used when connected to this chip, the gpio-leds driver bails out
>> > with -EPROBE_DEFER.
>> >
>> > Fix this problem by setting the .dev field of the gpio_chip to the
>> > parent i2c device.
>> >
>> > Signed-off-by: Marek Vasut <marex@denx.de>
>> > Cc: Alexandre Courbot <gnurou@gmail.com>
>> > Cc: Linus Walleij <linus.walleij@linaro.org>
>> > Cc: Mans Rullgard <mans@mansr.com>
>> > Cc: Olaf Mandel <o.mandel@menlosystems.com>
>> > Cc: Semen Protsenko <semen.protsenko@globallogic.com>
>>
>> Patch applied for fixes.
>
> Hi,
>
> I don't see this one in -next , did it get lost or something please ?

I have no clue what you're looking at, its
commit 34ab54edbef902f31842b428dce9530f3283847c
In Torvald's tree and will be in v4.2.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] gpio: max732x: Add missing dev reference to gpiochip
  2015-08-20  8:23     ` Linus Walleij
@ 2015-08-20  9:03       ` Marek Vasut
  0 siblings, 0 replies; 5+ messages in thread
From: Marek Vasut @ 2015-08-20  9:03 UTC (permalink / raw
  To: Linus Walleij
  Cc: linux-gpio@vger.kernel.org, Alexandre Courbot, Mans Rullgard,
	Olaf Mandel, Semen Protsenko

On Thursday, August 20, 2015 at 10:23:36 AM, Linus Walleij wrote:
> On Fri, Aug 14, 2015 at 11:10 PM, Marek Vasut <marex@denx.de> wrote:
> > On Thursday, July 16, 2015 at 01:43:13 PM, Linus Walleij wrote:
> >> On Tue, Jun 30, 2015 at 8:04 PM, Marek Vasut <marex@denx.de> wrote:
> >> > In case the gpiochip doesn't have the .dev field set, as is the case
> >> > in here, it is not possible to reference this device in DT as a GPIO
> >> > controller. A good example of this problem is that gpio-leds can not
> >> > be used when connected to this chip, the gpio-leds driver bails out
> >> > with -EPROBE_DEFER.
> >> > 
> >> > Fix this problem by setting the .dev field of the gpio_chip to the
> >> > parent i2c device.
> >> > 
> >> > Signed-off-by: Marek Vasut <marex@denx.de>
> >> > Cc: Alexandre Courbot <gnurou@gmail.com>
> >> > Cc: Linus Walleij <linus.walleij@linaro.org>
> >> > Cc: Mans Rullgard <mans@mansr.com>
> >> > Cc: Olaf Mandel <o.mandel@menlosystems.com>
> >> > Cc: Semen Protsenko <semen.protsenko@globallogic.com>
> >> 
> >> Patch applied for fixes.
> > 
> > Hi,
> > 
> > I don't see this one in -next , did it get lost or something please ?
> 
> I have no clue what you're looking at, its
> commit 34ab54edbef902f31842b428dce9530f3283847c
> In Torvald's tree and will be in v4.2.

Odd, I see it there now too though. Thanks and sorry for the noise.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-08-20  9:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-30 18:04 [PATCH] gpio: max732x: Add missing dev reference to gpiochip Marek Vasut
2015-07-16 11:43 ` Linus Walleij
2015-08-14 21:10   ` Marek Vasut
2015-08-20  8:23     ` Linus Walleij
2015-08-20  9:03       ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).