2011-05-09 10:58:58

by Tomoya MORINAGA

[permalink] [raw]
Subject: [PATCH] pch_gpio: Support new device ML7223

Support new device OKI SEMICONDUCTOR ML7223 IOH(Input/Output Hub).
The ML7223 IOH is for MP(Media Phone) use.
The ML7223 is companion chip for Intel Atom E6xx series.
The ML7223 is completely compatible for Intel EG20T PCH.

Signed-off-by: Tomoya MORINAGA <[email protected]>
---
drivers/gpio/Kconfig | 8 +++++++-
drivers/gpio/pch_gpio.c | 2 ++
2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index d3b2953..c0326da 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -329,13 +329,19 @@ config GPIO_LANGWELL
Say Y here to support Intel Langwell/Penwell GPIO.

config GPIO_PCH
- tristate "PCH GPIO of Intel Topcliff"
+ tristate "Intel EG20T PCH / OKI SEMICONDUCTOR ML7223 IOH GPIO"
depends on PCI && X86
help
This driver is for PCH(Platform controller Hub) GPIO of Intel Topcliff
which is an IOH(Input/Output Hub) for x86 embedded processor.
This driver can access PCH GPIO device.

+ This driver also can be used for OKI SEMICONDUCTOR IOH(Input/
+ Output Hub), ML7223.
+ ML7223 IOH is for MP(Media Phone) use.
+ ML7223 is companion chip for Intel Atom E6xx series.
+ ML7223 is completely compatible for Intel EG20T PCH.
+
config GPIO_ML_IOH
tristate "OKI SEMICONDUCTOR ML7213 IOH GPIO support"
depends on PCI
diff --git a/drivers/gpio/pch_gpio.c b/drivers/gpio/pch_gpio.c
index f970a5f..36919e7 100644
--- a/drivers/gpio/pch_gpio.c
+++ b/drivers/gpio/pch_gpio.c
@@ -283,8 +283,10 @@ static int pch_gpio_resume(struct pci_dev *pdev)
#define pch_gpio_resume NULL
#endif

+#define PCI_VENDOR_ID_ROHM 0x10DB
static DEFINE_PCI_DEVICE_TABLE(pch_gpio_pcidev_id) = {
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) },
+ { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) },
{ 0, }
};
MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id);
--
1.7.4


2011-05-25 12:09:49

by Alexander Stein

[permalink] [raw]
Subject: Re: pch_gpio: Support new device ML7223

Hello Tomoya,

On Monday 09 May 2011 12:58:49 Tomoya wrote:
> diff --git a/drivers/gpio/pch_gpio.c b/drivers/gpio/pch_gpio.c
> index f970a5f..36919e7 100644
> --- a/drivers/gpio/pch_gpio.c
> +++ b/drivers/gpio/pch_gpio.c
> @@ -283,8 +283,10 @@ static int pch_gpio_resume(struct pci_dev *pdev)
> #define pch_gpio_resume NULL
> #endif
>
> +#define PCI_VENDOR_ID_ROHM 0x10DB

Should this be moved to pci_ids.h?

> static DEFINE_PCI_DEVICE_TABLE(pch_gpio_pcidev_id) = {
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) },
> + { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) },

Likewise for the product ID. While at it, the ID for EG20T could also be moved
in a separate patch.

> { 0, }
> };
> MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id);

Regards,
Alexander

2011-05-26 01:24:58

by Tomoya MORINAGA

[permalink] [raw]
Subject: RE: pch_gpio: Support new device ML7223

> From: Alexander Stein [mailto:[email protected]]
> Sent: Wednesday, May 25, 2011 9:10 PM

> > #define pch_gpio_resume NULL #endif
> >
> > +#define PCI_VENDOR_ID_ROHM 0x10DB
>
> Should this be moved to pci_ids.h?
OK.
I will move this to pci_ids.h.

>
> > static DEFINE_PCI_DEVICE_TABLE(pch_gpio_pcidev_id) = {
> > { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) },
> > + { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) },
>
> Likewise for the product ID. While at it, the ID for EG20T
> could also be moved in a separate patch.

We have already upstreamed not only GPIO but also many device drivers(GBE, USBDEV,DMA,UART,SPI,I2C,CAN).
Do you mean we must move these device definitions to pci_ids.h?

Thanks,
-----------------------------------------
Tomoya MORINAGA
OKI SEMICONDUCTOR CO., LTD.

2011-05-26 06:09:26

by Alexander Stein

[permalink] [raw]
Subject: Re: pch_gpio: Support new device ML7223

On Thursday 26 May 2011 03:24:55 Tomoya MORINAGA wrote:
> > From: Alexander Stein [mailto:[email protected]]
> > Sent: Wednesday, May 25, 2011 9:10 PM
> >
> > > #define pch_gpio_resume NULL #endif
> > >
> > > +#define PCI_VENDOR_ID_ROHM 0x10DB
> >
> > Should this be moved to pci_ids.h?
>
> OK.
> I will move this to pci_ids.h.
>
> > > static DEFINE_PCI_DEVICE_TABLE(pch_gpio_pcidev_id) = {
> > >
> > > { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) },
> > >
> > > + { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) },
> >
> > Likewise for the product ID. While at it, the ID for EG20T
> > could also be moved in a separate patch.
>
> We have already upstreamed not only GPIO but also many device drivers(GBE,
> USBDEV,DMA,UART,SPI,I2C,CAN). Do you mean we must move these device
> definitions to pci_ids.h?

I just meant to move 0x8803 from the line above into pci_ids.h. It is
unrelated to your patch.
And if this _must_ be moved to pci_ids.h I'm the wrong person to decide.

Regards,
Alexander

2011-05-26 07:41:05

by Tomoya MORINAGA

[permalink] [raw]
Subject: RE: pch_gpio: Support new device ML7223

Hi Alexander

From: Alexander Stein [mailto:[email protected]]
Sent: Thursday, May 26, 2011 3:09 PM

> I just meant to move 0x8803 from the line above into
> pci_ids.h. It is unrelated to your patch.
> And if this _must_ be moved to pci_ids.h I'm the wrong person
> to decide.

I understand.
I will move 0x8803 to pci_ids.h.
I will post 2 patches, one is patch for "8803", the other is patch for "ML7223".

Thanks,
-----------------------------------------
Tomoya MORINAGA
OKI SEMICONDUCTOR CO., LTD.


2011-05-27 06:58:27

by Grant Likely

[permalink] [raw]
Subject: Re: pch_gpio: Support new device ML7223

On Thu, May 26, 2011 at 08:09:15AM +0200, Alexander Stein wrote:
> On Thursday 26 May 2011 03:24:55 Tomoya MORINAGA wrote:
> > > From: Alexander Stein [mailto:[email protected]]
> > > Sent: Wednesday, May 25, 2011 9:10 PM
> > >
> > > > #define pch_gpio_resume NULL #endif
> > > >
> > > > +#define PCI_VENDOR_ID_ROHM 0x10DB
> > >
> > > Should this be moved to pci_ids.h?
> >
> > OK.
> > I will move this to pci_ids.h.
> >
> > > > static DEFINE_PCI_DEVICE_TABLE(pch_gpio_pcidev_id) = {
> > > >
> > > > { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) },
> > > >
> > > > + { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) },
> > >
> > > Likewise for the product ID. While at it, the ID for EG20T
> > > could also be moved in a separate patch.
> >
> > We have already upstreamed not only GPIO but also many device drivers(GBE,
> > USBDEV,DMA,UART,SPI,I2C,CAN). Do you mean we must move these device
> > definitions to pci_ids.h?
>
> I just meant to move 0x8803 from the line above into pci_ids.h. It is
> unrelated to your patch.
> And if this _must_ be moved to pci_ids.h I'm the wrong person to decide.

The top comment block in pci_ids.h says: "Do not add new entries to
this file unless the definitions are shared between multiple drivers"

g.

2011-05-27 07:09:15

by Grant Likely

[permalink] [raw]
Subject: Re: [PATCH] pch_gpio: Support new device ML7223

On Mon, May 09, 2011 at 07:58:49PM +0900, Tomoya MORINAGA wrote:
> Support new device OKI SEMICONDUCTOR ML7223 IOH(Input/Output Hub).
> The ML7223 IOH is for MP(Media Phone) use.
> The ML7223 is companion chip for Intel Atom E6xx series.
> The ML7223 is completely compatible for Intel EG20T PCH.
>
> Signed-off-by: Tomoya MORINAGA <[email protected]>

I merged this version. Since the device ids are local only to this
driver, there is no need to add them to pci_ids.h

Thanks,
g.

> ---
> drivers/gpio/Kconfig | 8 +++++++-
> drivers/gpio/pch_gpio.c | 2 ++
> 2 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index d3b2953..c0326da 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -329,13 +329,19 @@ config GPIO_LANGWELL
> Say Y here to support Intel Langwell/Penwell GPIO.
>
> config GPIO_PCH
> - tristate "PCH GPIO of Intel Topcliff"
> + tristate "Intel EG20T PCH / OKI SEMICONDUCTOR ML7223 IOH GPIO"
> depends on PCI && X86
> help
> This driver is for PCH(Platform controller Hub) GPIO of Intel Topcliff
> which is an IOH(Input/Output Hub) for x86 embedded processor.
> This driver can access PCH GPIO device.
>
> + This driver also can be used for OKI SEMICONDUCTOR IOH(Input/
> + Output Hub), ML7223.
> + ML7223 IOH is for MP(Media Phone) use.
> + ML7223 is companion chip for Intel Atom E6xx series.
> + ML7223 is completely compatible for Intel EG20T PCH.
> +
> config GPIO_ML_IOH
> tristate "OKI SEMICONDUCTOR ML7213 IOH GPIO support"
> depends on PCI
> diff --git a/drivers/gpio/pch_gpio.c b/drivers/gpio/pch_gpio.c
> index f970a5f..36919e7 100644
> --- a/drivers/gpio/pch_gpio.c
> +++ b/drivers/gpio/pch_gpio.c
> @@ -283,8 +283,10 @@ static int pch_gpio_resume(struct pci_dev *pdev)
> #define pch_gpio_resume NULL
> #endif
>
> +#define PCI_VENDOR_ID_ROHM 0x10DB
> static DEFINE_PCI_DEVICE_TABLE(pch_gpio_pcidev_id) = {
> { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) },
> + { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) },
> { 0, }
> };
> MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id);
> --
> 1.7.4
>

2011-05-27 08:07:54

by Tomoya MORINAGA

[permalink] [raw]
Subject: RE: [PATCH] pch_gpio: Support new device ML7223

Hi Grant,

Thanks.

BTW, could you review our spi_topcliff_pch I sent before?
Or I post it again ?

[PATCH v4 1/2] spi_topcliff_pch: support new device ML7213 IOH
[PATCH 2/2] spi_topcliff_pch: DMA support

With Best Regards,
-----------------------------------------
Tomoya MORINAGA
OKI SEMICONDUCTOR CO., LTD.

> -----Original Message-----
> From: Grant Likely [mailto:[email protected]] On Behalf Of
> Grant Likely
> Sent: Friday, May 27, 2011 4:09 PM
> To: Tomoya MORINAGA
> Cc: [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]
> Subject: Re: [PATCH] pch_gpio: Support new device ML7223
>
> On Mon, May 09, 2011 at 07:58:49PM +0900, Tomoya MORINAGA wrote:
> > Support new device OKI SEMICONDUCTOR ML7223 IOH(Input/Output Hub).
> > The ML7223 IOH is for MP(Media Phone) use.
> > The ML7223 is companion chip for Intel Atom E6xx series.
> > The ML7223 is completely compatible for Intel EG20T PCH.
> >
> > Signed-off-by: Tomoya MORINAGA <[email protected]>
>
> I merged this version. Since the device ids are local only
> to this driver, there is no need to add them to pci_ids.h
>
> Thanks,
> g.
>
> > ---
> > drivers/gpio/Kconfig | 8 +++++++-
> > drivers/gpio/pch_gpio.c | 2 ++
> > 2 files changed, 9 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index
> > d3b2953..c0326da 100644
> > --- a/drivers/gpio/Kconfig
> > +++ b/drivers/gpio/Kconfig
> > @@ -329,13 +329,19 @@ config GPIO_LANGWELL
> > Say Y here to support Intel Langwell/Penwell GPIO.
> >
> > config GPIO_PCH
> > - tristate "PCH GPIO of Intel Topcliff"
> > + tristate "Intel EG20T PCH / OKI SEMICONDUCTOR ML7223 IOH GPIO"
> > depends on PCI && X86
> > help
> > This driver is for PCH(Platform controller Hub) GPIO
> of Intel Topcliff
> > which is an IOH(Input/Output Hub) for x86 embedded processor.
> > This driver can access PCH GPIO device.
> >
> > + This driver also can be used for OKI SEMICONDUCTOR IOH(Input/
> > + Output Hub), ML7223.
> > + ML7223 IOH is for MP(Media Phone) use.
> > + ML7223 is companion chip for Intel Atom E6xx series.
> > + ML7223 is completely compatible for Intel EG20T PCH.
> > +
> > config GPIO_ML_IOH
> > tristate "OKI SEMICONDUCTOR ML7213 IOH GPIO support"
> > depends on PCI
> > diff --git a/drivers/gpio/pch_gpio.c
> b/drivers/gpio/pch_gpio.c index
> > f970a5f..36919e7 100644
> > --- a/drivers/gpio/pch_gpio.c
> > +++ b/drivers/gpio/pch_gpio.c
> > @@ -283,8 +283,10 @@ static int pch_gpio_resume(struct
> pci_dev *pdev)
> > #define pch_gpio_resume NULL #endif
> >
> > +#define PCI_VENDOR_ID_ROHM 0x10DB
> > static DEFINE_PCI_DEVICE_TABLE(pch_gpio_pcidev_id) = {
> > { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8803) },
> > + { PCI_DEVICE(PCI_VENDOR_ID_ROHM, 0x8014) },
> > { 0, }
> > };
> > MODULE_DEVICE_TABLE(pci, pch_gpio_pcidev_id);
> > --
> > 1.7.4
> >
>