All of lore.kernel.org
 help / color / mirror / Atom feed
From: H Hartley Sweeten <hartleys@visionengravers.com>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	"kernel@savoirfairelinux.com" <kernel@savoirfairelinux.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH] gpio: (gpio-pca953x) move header to linux/platform_data/
Date: Fri, 16 Aug 2013 14:06:24 -0500	[thread overview]
Message-ID: <ADE657CA350FB648AAC2C43247A983F0021DAC7DA184@AUSP01VMBX24.collaborationhost.net> (raw)
In-Reply-To: <82440653.410050.1376665340121.JavaMail.root@mail>

On Friday, August 16, 2013 8:02 AM, Vivien Didelot wrote:
> Hi Linus,
>
> You wrote:
> > But:
>>
>>>  drivers/gpio/gpio-pca953x.c                 |  2 +-
>> (...)
>>> diff --git a/drivers/gpio/gpio-pca953x.c
>>> b/drivers/gpio/gpio-pca953x.c
>>> index 426c51d..8804aec 100644
>>> --- a/drivers/gpio/gpio-pca953x.c
>>> +++ b/drivers/gpio/gpio-pca953x.c
>>> @@ -18,7 +18,7 @@
>>>  #include <linux/irq.h>
>>>  #include <linux/irqdomain.h>
>>>  #include <linux/i2c.h>
>>> -#include <linux/i2c/pca953x.h>
>>> +#include <linux/platform_data/pca953x.h>
>> 
>> Why does the GPIO driver need platform data from the
>> I2C driver???
>> 
>> Can't this just be made to go away?
>
> I didn't dig that much in the driver, but I cannot imagine
> another way to pass, for instance, the setup callback.
>
> What would be a good alternative for you?

I think the confusion here is because the pca953x.h header was initially
placed in linux/i2c.

This device is an I2C connected GPIO expander. The pca953x.h header has
the information needed for the platform to hook up to the device. It doesn't
really expose the fact that it's an I2C driver.

Just by 2 cents...
Hartley

WARNING: multiple messages have this Message-ID (diff)
From: hartleys@visionengravers.com (H Hartley Sweeten)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] gpio: (gpio-pca953x) move header to linux/platform_data/
Date: Fri, 16 Aug 2013 14:06:24 -0500	[thread overview]
Message-ID: <ADE657CA350FB648AAC2C43247A983F0021DAC7DA184@AUSP01VMBX24.collaborationhost.net> (raw)
In-Reply-To: <82440653.410050.1376665340121.JavaMail.root@mail>

On Friday, August 16, 2013 8:02 AM, Vivien Didelot wrote:
> Hi Linus,
>
> You wrote:
> > But:
>>
>>>  drivers/gpio/gpio-pca953x.c                 |  2 +-
>> (...)
>>> diff --git a/drivers/gpio/gpio-pca953x.c
>>> b/drivers/gpio/gpio-pca953x.c
>>> index 426c51d..8804aec 100644
>>> --- a/drivers/gpio/gpio-pca953x.c
>>> +++ b/drivers/gpio/gpio-pca953x.c
>>> @@ -18,7 +18,7 @@
>>>  #include <linux/irq.h>
>>>  #include <linux/irqdomain.h>
>>>  #include <linux/i2c.h>
>>> -#include <linux/i2c/pca953x.h>
>>> +#include <linux/platform_data/pca953x.h>
>> 
>> Why does the GPIO driver need platform data from the
>> I2C driver???
>> 
>> Can't this just be made to go away?
>
> I didn't dig that much in the driver, but I cannot imagine
> another way to pass, for instance, the setup callback.
>
> What would be a good alternative for you?

I think the confusion here is because the pca953x.h header was initially
placed in linux/i2c.

This device is an I2C connected GPIO expander. The pca953x.h header has
the information needed for the platform to hook up to the device. It doesn't
really expose the fact that it's an I2C driver.

Just by 2 cents...
Hartley

  parent reply	other threads:[~2013-08-16 19:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-31 20:57 [PATCH] gpio: (gpio-pca953x) move header to linux/platform_data/ Vivien Didelot
2013-07-31 20:57 ` Vivien Didelot
2013-07-31 21:03 ` H Hartley Sweeten
2013-07-31 21:03   ` H Hartley Sweeten
2013-08-16 13:34 ` Linus Walleij
2013-08-16 13:34   ` Linus Walleij
2013-08-16 13:34   ` Linus Walleij
2013-08-16 15:02   ` Vivien Didelot
2013-08-16 15:02     ` Vivien Didelot
2013-08-16 15:42     ` Linus Walleij
2013-08-16 15:42       ` Linus Walleij
2013-08-16 15:42       ` Linus Walleij
2013-08-16 19:06     ` H Hartley Sweeten [this message]
2013-08-16 19:06       ` H Hartley Sweeten
2013-08-16 19:06       ` H Hartley Sweeten
2013-08-29 17:52       ` Vivien Didelot
2013-08-29 17:52         ` Vivien Didelot
2013-08-29 18:00         ` Olof Johansson
2013-08-29 18:00           ` Olof Johansson
2013-08-29 18:46           ` Linus Walleij
2013-08-29 18:46             ` Linus Walleij
2013-08-29 18:46             ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ADE657CA350FB648AAC2C43247A983F0021DAC7DA184@AUSP01VMBX24.collaborationhost.net \
    --to=hartleys@visionengravers.com \
    --cc=kernel@savoirfairelinux.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.