lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 12 Apr 2009 21:26:10 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	Andres Salomon <dilinger@...ued.net>
CC:	akpm@...ux-foundation.org, david-b@...bell.net,
	jordan@...micpenguin.net, katzj@...hat.com, tiwai@...e.de,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: + cs553x-gpio-add-amd-cs5535-cs5536-gpio-driver-support-fix-fix.patch
 added to -mm tree

Andres Salomon wrote:
> On Fri, 10 Apr 2009 13:00:54 -0700
> Randy Dunlap <randy.dunlap@...cle.com> wrote:
> 
>> akpm@...ux-foundation.org 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 <dilinger@...ued.net>
>>>
>>> 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.
>>>
>>> Signed-off-by: Andres Salomon <dilinger@...ian.org>
>>> Cc: Takashi Iwai <tiwai@...e.de>
>>> Cc: Jeremy Katz <katzj@...hat.com>
>>> Cc: Jordan Crouse <jordan@...micpenguin.net>
>>> Cc: David Brownell <david-b@...bell.net>
>>> Cc: Randy Dunlap <randy.dunlap@...cle.com>
>>> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
>>> ---
>>>
>>>  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
>>>  	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
> [...]
>>
>> 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?
> 

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 ??

> 
> 
> Force GPIO_CS553X to select GPIOLIB, which it makes use of.
> 
> Signed-off-by: Andres Salomon <dilinger@...ian.org>
> 
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 797ff45..17d7364 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -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


-- 
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists