Skip to contentSkip to conversation

+ cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix.patch added to -mm tree

PATCH In review [email protected] 3 participants 7 messages Apr 7, 2009 – Apr 20, 2009

Subsystems (2)
lore
Share & tools
lore

[email protected]

author tree notice
#0 lore raw

The patch titled

     cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix
has been added to the -mm tree.  Its filename is
     cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix
From: Andres Salomon <[email protected]>

force GPIO_CS553X to be defined when OLPC is selected

We've begun using the generic GPIO stuff for geodes, so OLPC implicitly depends upon this. This patch forces selection of it.

Cc Takashi Iwai <[email protected]>
Cc Jeremy Katz <[email protected]>
Cc Jordan Crouse <[email protected]>
Cc David Brownell <[email protected]>
Cc Randy Dunlap <[email protected]>

---

 arch/x86/Kconfig         |    1 +
 pci/cs5535audio/Makefile |    0 
 2 files changed, 1 insertion(+)
arch/x86/Kconfig renamed from arch/x86/Kconfig~cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix +1 -0
diff -puN arch/x86/Kconfig~cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix arch/x86/Kconfig
@@ -1972,6 +1972,7 @@ config GEODE_MFGPT_TIMER
 
 config OLPC
 	bool "One Laptop Per Child support"
+	select GPIO_CS553X
 	default n
 	---help---
 	  Add support for detecting the unique features of the OLPC

diff -puN sound/pci/cs5535audio/Makefile~cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix sound/pci/cs5535audio/Makefile _

Patches currently in -mm which might be from [email protected] are

origin.patch cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support.patch cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix.patch alsa-cs5535audio-free-olpc-quirks-from-reliance-on-mgeode_lx-cpu-optimization.patch

#1 lore raw
Quoted 44 lines · [email protected] wrote:

The patch titled

     cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix
has been added to the -mm tree.  Its filename is
     cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject: cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix
From: Andres Salomon <[email protected]>

force GPIO_CS553X to be defined when OLPC is selected

We've begun using the generic GPIO stuff for geodes, so OLPC implicitly depends upon this. This patch forces selection of it.

Cc Takashi Iwai <[email protected]>
Cc Jeremy Katz <[email protected]>
Cc Jordan Crouse <[email protected]>
Cc David Brownell <[email protected]>
Cc Randy Dunlap <[email protected]>

---

 arch/x86/Kconfig         |    1 +
 pci/cs5535audio/Makefile |    0 
 2 files changed, 1 insertion(+)

diff -puN arch/x86/Kconfig~cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix arch/x86/Kconfig

arch/x86/Kconfig config GEODE_MFGPT_TIMER · line 1978

Quoted 7 lines
arch/x86/Kconfig renamed from arch/x86/Kconfig~cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix +1 -0
@@ -1972,6 +1972,7 @@ config GEODE_MFGPT_TIMER
 
 config OLPC
 	bool "One Laptop Per Child support"
+	select GPIO_CS553X
 	default n
 	---help---
 	  Add support for detecting the unique features of the OLPC

In mmotm-2009-0410, this patch causes build errors when GPIOLIB is not enabled since GPIO_CS553X uses gpiolib functions & struct fields:

drivers/gpio/cs553x-gpio.c:23: error: field 'chip' has incomplete type drivers/gpio/cs553x-gpio.c:150: error: field name not in record or union initializer drivers/gpio/cs553x-gpio.c:150: error: (near initialization for 'cs553x_gpio_chip.chip') drivers/gpio/cs553x-gpio.c:151: error: field name not in record or union initializer drivers/gpio/cs553x-gpio.c:151: error: (near initialization for 'cs553x_gpio_chip.chip') drivers/gpio/cs553x-gpio.c:153: error: field name not in record or union initializer drivers/gpio/cs553x-gpio.c:153: error: (near initialization for 'cs553x_gpio_chip.chip') drivers/gpio/cs553x-gpio.c:154: error: field name not in record or union initializer drivers/gpio/cs553x-gpio.c:154: error: (near initialization for 'cs553x_gpio_chip.chip') drivers/gpio/cs553x-gpio.c:156: error: field name not in record or union initializer drivers/gpio/cs553x-gpio.c:156: error: (near initialization for 'cs553x_gpio_chip.chip') drivers/gpio/cs553x-gpio.c:157: error: field name not in record or union initializer drivers/gpio/cs553x-gpio.c:157: error: (near initialization for 'cs553x_gpio_chip.chip') drivers/gpio/cs553x-gpio.c:159: error: field name not in record or union initializer drivers/gpio/cs553x-gpio.c:159: error: (near initialization for 'cs553x_gpio_chip.chip') drivers/gpio/cs553x-gpio.c:160: error: field name not in record or union initializer drivers/gpio/cs553x-gpio.c:160: error: (near initialization for 'cs553x_gpio_chip.chip') drivers/gpio/cs553x-gpio.c:197: error: implicit declaration of function 'gpiochip_add' drivers/gpio/cs553x-gpio.c:216: error: implicit declaration of function 'gpiochip_remove'

One possible patch is also to select GPIOLIB above in the OLPC config block.

Signature · 1 line
~Randy
#2 lore raw
Quoted 61 lines · On Fri, 10 Apr 2009 13:00:54 -0700 Randy Dunlap <[email protected]> wrote:
Quoted 49 lines · [email protected] wrote:

The patch titled

     cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix
has been added to the -mm tree.  Its filename is
     cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this

The current -mm tree may be found at
http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject:
cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix From:
Andres Salomon <[email protected]>

force GPIO_CS553X to be defined when OLPC is selected

We've begun using the generic GPIO stuff for geodes, so OLPC implicitly depends upon this. This patch forces selection of it.

Cc Takashi Iwai <[email protected]>
Cc Jeremy Katz <[email protected]>
Cc Jordan Crouse <[email protected]>
Cc David Brownell <[email protected]>
Cc Randy Dunlap <[email protected]>

---

 arch/x86/Kconfig         |    1 +
 pci/cs5535audio/Makefile |    0 
 2 files changed, 1 insertion(+)

diff -puN arch/x86/Kconfig~cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix arch/x86/Kconfig --- a/arch/x86/Kconfig~cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix +++ a/arch/x86/Kconfig @@ -1972,6 +1972,7 @@ config GEODE_MFGPT_TIMER config OLPC

Review

Quoted 5 lines
(quoted diff) +1 -0
 	bool "One Laptop Per Child support"
+	select GPIO_CS553X
 	default n
 	---help---
 	  Add support for detecting the unique features of the OLPC

In mmotm-2009-0410, this patch causes build errors when GPIOLIB is not enabled since GPIO_CS553X uses gpiolib functions & struct fields:

drivers/gpio/cs553x-gpio.c:23: error: field 'chip' has incomplete type

[...]

Quoted 5 lines

One possible patch is also to select GPIOLIB above in the OLPC config block.

Does the following help? I think this is what we want (gpio-cs553x uses gpiolib). I'm a bit unclear how the other gpio drivers get away with including linux/gpio.h and using gpio_chip without requiring GPIOLIB. Maybe they implicitly are built on architectures which select CONFIG_ARCH_REQUIRE_GPIOLIB?

Force GPIO_CS553X to select GPIOLIB, which it makes use of.

drivers/gpio/Kconfig +1 -0
index 797ff45..17d7364 100644
@@ -148,6 +148,7 @@ comment "PCI GPIO expanders:"
 config GPIO_CS553X
 	tristate "AMD cs5535/cs5536 GPIO support"
 	depends on PCI && !CS5535_GPIO && !MGEODE_LX
+	select GPIOLIB
 	help
 	  The AMD cs5535 and cs5536 southbridges support 28 GPIO pins that
 	  can be used for quite a number of things.  The cs553x is found on
#3 lore raw
Quoted 69 lines · Andres Salomon
Quoted 60 lines · On Fri, 10 Apr 2009 13:00:54 -0700 Randy Dunlap <[email protected]> wrote:
Quoted 49 lines · [email protected] wrote:

The patch titled

     cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix
has been added to the -mm tree.  Its filename is
     cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this

The current -mm tree may be found at
http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
Subject:
cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix From:
Andres Salomon <[email protected]>

force GPIO_CS553X to be defined when OLPC is selected

We've begun using the generic GPIO stuff for geodes, so OLPC implicitly depends upon this. This patch forces selection of it.

Cc Takashi Iwai <[email protected]>
Cc Jeremy Katz <[email protected]>
Cc Jordan Crouse <[email protected]>
Cc David Brownell <[email protected]>
Cc Randy Dunlap <[email protected]>

---

 arch/x86/Kconfig         |    1 +
 pci/cs5535audio/Makefile |    0 
 2 files changed, 1 insertion(+)

diff -puN arch/x86/Kconfig~cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix arch/x86/Kconfig --- a/arch/x86/Kconfig~cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix +++ a/arch/x86/Kconfig @@ -1972,6 +1972,7 @@ config GEODE_MFGPT_TIMER config OLPC

Review

Quoted 5 lines
(quoted diff) +1 -0
 	bool "One Laptop Per Child support"
+	select GPIO_CS553X
 	default n
 	---help---
 	  Add support for detecting the unique features of the OLPC

In mmotm-2009-0410, this patch causes build errors when GPIOLIB is not enabled since GPIO_CS553X uses gpiolib functions & struct fields:

drivers/gpio/cs553x-gpio.c:23: error: field 'chip' has incomplete type

[...]

Quoted 4 lines

One possible patch is also to select GPIOLIB above in the OLPC config block.

Quoted 6 lines

Does the following help? I think this is what we want (gpio-cs553x uses gpiolib). I'm a bit unclear how the other gpio drivers get away with including linux/gpio.h and using gpio_chip without requiring GPIOLIB. Maybe they implicitly are built on architectures which select CONFIG_ARCH_REQUIRE_GPIOLIB?

It helps some (and is needed), but there is another problem.

When PCI is not enabled:

drivers/gpio/cs553x-gpio.c: In function 'cs553x_gpio_probe':
drivers/gpio/cs553x-gpio.c:176: error: implicit declaration of function 'pci_enable_device_io' drivers/gpio/cs553x-gpio.c:182: error: implicit declaration of function 'pci_request_region' drivers/gpio/cs553x-gpio.c:207: error: implicit declaration of function 'pci_release_region'

I guess that OLPC needs an additional dependency on PCI ??

Quoted 18 lines

Force GPIO_CS553X to select GPIOLIB, which it makes use of.

drivers/gpio/Kconfig +1 -0
index 797ff45..17d7364 100644
@@ -148,6 +148,7 @@ comment "PCI GPIO expanders:"
 config GPIO_CS553X
 	tristate "AMD cs5535/cs5536 GPIO support"
 	depends on PCI && !CS5535_GPIO && !MGEODE_LX
+	select GPIOLIB
 	help
 	  The AMD cs5535 and cs5536 southbridges support 28 GPIO pins that
 	  can be used for quite a number of things.  The cs553x is found on
Signature · 1 line
~Randy
#4 lore raw

PATCH 1/1 cs553x: fix build dependency problems

Andres, how does this look to you?

It fixes the problems that I know about.

From: Randy Dunlap <[email protected]>

Fix multiple build errors due to cs553x-gpio using GPIO APIs and using PCI APIs.

---
 arch/x86/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/Kconfig +2 -1
@@ -1969,7 +1969,8 @@ config GEODE_MFGPT_TIMER
 
 config OLPC
 	bool "One Laptop Per Child support"
-	select GPIO_CS553X
+	select GPIO_CS553X if PCI
+	select GPIOLIB if PCI
 	default n
 	---help---
 	  Add support for detecting the unique features of the OLPC
#5 lore raw

Re: [PATCH] cs553x: fix build dependency problems

Quoted 6 lines · On Sat, 18 Apr 2009 18:01:18 -0700 Randy Dunlap <[email protected]> wrote:

Andres, how does this look to you?

It fixes the problems that I know about.

This may be okay as a separate patch, but doesn't really fix the problem. cs553x-gpio isn't just for OLPC, it can be used by plain Geodes. I've lost track of the state of the patches at this point, but the solution would be to simply have CONFIG_GPIO_CS553X depend upon PCI.

Quoted 22 lines

From: Randy Dunlap <[email protected]>

Fix multiple build errors due to cs553x-gpio using GPIO APIs and using PCI APIs.

---
 arch/x86/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/x86/Kconfig +2 -1
@@ -1969,7 +1969,8 @@ config GEODE_MFGPT_TIMER
 
 config OLPC
 	bool "One Laptop Per Child support"
-	select GPIO_CS553X
+	select GPIO_CS553X if PCI
+	select GPIOLIB if PCI
 	default n
 	---help---
 	  Add support for detecting the unique features of the OLPC
#6 lore raw
In reply to Andres Salomon
Quoted 9 lines · On Sun, 12 Apr 2009 21:52:03 -0400 Andres Salomon <[email protected]> wrote:

Force GPIO_CS553X to select GPIOLIB, which it makes use of.

drivers/gpio/Kconfig +0 -0
index 797ff45..17d7364 100644

drivers/gpio/Kconfig comment "PCI GPIO expanders:" · line 154

Quoted 7 lines
drivers/gpio/Kconfig +1 -0
@@ -148,6 +148,7 @@ comment "PCI GPIO expanders:"
 config GPIO_CS553X
 	tristate "AMD cs5535/cs5536 GPIO support"
 	depends on PCI && !CS5535_GPIO && !MGEODE_LX
+	select GPIOLIB
 	help
 	  The AMD cs5535 and cs5536 southbridges support 28 GPIO pins that
 	  can be used for quite a number of things.  The cs553x is found on

x86_64 allmodconfig:

drivers/gpio/Kconfig:28:error: found recursive dependency: GPIOLIB -> GPIO_CS553X -> GPIOLIB