LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH -mm] apanel: fix kconfig dependencies
@ 2008-02-07  0:27 Randy Dunlap
  2008-02-07 16:42 ` Jean Delvare
  0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2008-02-07  0:27 UTC (permalink / raw)
  To: lkml; +Cc: khali, shemminger, akpm

From: Randy Dunlap <randy.dunlap@oracle.com>

Add I2C to config since the driver makes several i2c*() calls.

Add PCI to config because the config selects I2C_I801, which depends
on PCI, but currently config* does not follow dependency chains,
so randconfig can enable INPUT_APANEL even when PCI is not enabled,
which leads to these warnings:
linux-2.6.24-mm1/drivers/i2c/busses/i2c-i801.c:641: error: implicit declaration of function 'pci_request_region'
/linux-2.6.24-mm1/drivers/i2c/busses/i2c-i801.c:681: error: implicit declaration of function 'pci_release_region'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/input/misc/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.24-mm1.orig/drivers/input/misc/Kconfig
+++ linux-2.6.24-mm1/drivers/input/misc/Kconfig
@@ -42,7 +42,7 @@ config INPUT_M68K_BEEP
 
 config INPUT_APANEL
 	tristate "Fujitsu Lifebook Application Panel buttons"
-	depends on X86
+	depends on X86 && I2C && PCI
 	select I2C_I801
 	select INPUT_POLLDEV
 	select CHECK_SIGNATURE

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

* Re: [PATCH -mm] apanel: fix kconfig dependencies
  2008-02-07  0:27 [PATCH -mm] apanel: fix kconfig dependencies Randy Dunlap
@ 2008-02-07 16:42 ` Jean Delvare
  2008-02-07 19:04   ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2008-02-07 16:42 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: lkml, shemminger, akpm

Hi Randy,

On Wed, 6 Feb 2008 16:27:54 -0800, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Add I2C to config since the driver makes several i2c*() calls.

Correct.

> 
> Add PCI to config because the config selects I2C_I801, which depends
> on PCI, but currently config* does not follow dependency chains,
> so randconfig can enable INPUT_APANEL even when PCI is not enabled,
> which leads to these warnings:
> linux-2.6.24-mm1/drivers/i2c/busses/i2c-i801.c:641: error: implicit declaration of function 'pci_request_region'
> /linux-2.6.24-mm1/drivers/i2c/busses/i2c-i801.c:681: error: implicit declaration of function 'pci_release_region'

I'd rather drop the "select I2C_I801" if the config system can't handle
it properly. It's not strictly needed (not a build-time dependency), an
addition to the help text would work as well. Adding dependencies to
make our selections happy is a bit confusing and likely to cause
trouble in the future (as dependencies can change...)

> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
>  drivers/input/misc/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- linux-2.6.24-mm1.orig/drivers/input/misc/Kconfig
> +++ linux-2.6.24-mm1/drivers/input/misc/Kconfig
> @@ -42,7 +42,7 @@ config INPUT_M68K_BEEP
>  
>  config INPUT_APANEL
>  	tristate "Fujitsu Lifebook Application Panel buttons"
> -	depends on X86
> +	depends on X86 && I2C && PCI
>  	select I2C_I801
>  	select INPUT_POLLDEV
>  	select CHECK_SIGNATURE


-- 
Jean Delvare

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

* Re: [PATCH -mm] apanel: fix kconfig dependencies
  2008-02-07 16:42 ` Jean Delvare
@ 2008-02-07 19:04   ` Randy Dunlap
  2008-02-07 19:12     ` Stephen Hemminger
  2008-02-07 21:46     ` Jean Delvare
  0 siblings, 2 replies; 5+ messages in thread
From: Randy Dunlap @ 2008-02-07 19:04 UTC (permalink / raw)
  To: Jean Delvare; +Cc: lkml, shemminger, akpm

On Thu, 7 Feb 2008 17:42:51 +0100 Jean Delvare wrote:

> Hi Randy,
> 
> On Wed, 6 Feb 2008 16:27:54 -0800, Randy Dunlap wrote:
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> > 
> > Add I2C to config since the driver makes several i2c*() calls.
> 
> Correct.
> 
> > 
> > Add PCI to config because the config selects I2C_I801, which depends
> > on PCI, but currently config* does not follow dependency chains,
> > so randconfig can enable INPUT_APANEL even when PCI is not enabled,
> > which leads to these warnings:
> > linux-2.6.24-mm1/drivers/i2c/busses/i2c-i801.c:641: error: implicit declaration of function 'pci_request_region'
> > /linux-2.6.24-mm1/drivers/i2c/busses/i2c-i801.c:681: error: implicit declaration of function 'pci_release_region'
> 
> I'd rather drop the "select I2C_I801" if the config system can't handle
> it properly. It's not strictly needed (not a build-time dependency), an
> addition to the help text would work as well. Adding dependencies to
> make our selections happy is a bit confusing and likely to cause
> trouble in the future (as dependencies can change...)

OK.  What did you have in mind for the help text.  I changed it
a small bit.

I also added "depends on LEDS_CLASS" since defconfig didn't have that
set, but the build failed with wanting symbols that it provides.

Updated patch:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: Randy Dunlap <randy.dunlap@oracle.com>

Add I2C to config since the driver makes several i2c*() calls.

Add to help text that the Intel I2C ICH (i801) driver is also needed
for this kernel.

Add LEDS_CLASS to config since the driver makes les_classdev_*() calls:
ERROR: "led_classdev_register" [drivers/input/misc/apanel.ko] undefined!
ERROR: "__led_classdev_unregister" [drivers/input/misc/apanel.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/input/misc/Kconfig |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.24-mm1.orig/drivers/input/misc/Kconfig
+++ linux-2.6.24-mm1/drivers/input/misc/Kconfig
@@ -42,14 +42,14 @@ config INPUT_M68K_BEEP
 
 config INPUT_APANEL
 	tristate "Fujitsu Lifebook Application Panel buttons"
-	depends on X86
-	select I2C_I801
+	depends on X86 && I2C && LEDS_CLASS
 	select INPUT_POLLDEV
 	select CHECK_SIGNATURE
 	help
 	 Say Y here for support of the Application Panel buttons, used on
 	 Fujitsu Lifebook. These are attached to the mainboard through
-	 an SMBus interface managed by the I2C Intel ICH (i801) driver.
+	 an SMBus interface managed by the I2C Intel ICH (i801) driver,
+	 which you should also build for this kernel.
 
 	 To compile this driver as a module, choose M here: the module will
 	 be called apanel.

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

* Re: [PATCH -mm] apanel: fix kconfig dependencies
  2008-02-07 19:04   ` Randy Dunlap
@ 2008-02-07 19:12     ` Stephen Hemminger
  2008-02-07 21:46     ` Jean Delvare
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2008-02-07 19:12 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Jean Delvare, lkml, akpm

On Thu, 7 Feb 2008 11:04:12 -0800
Randy Dunlap <randy.dunlap@oracle.com> wrote:

> On Thu, 7 Feb 2008 17:42:51 +0100 Jean Delvare wrote:
> 
> > Hi Randy,
> > 
> > On Wed, 6 Feb 2008 16:27:54 -0800, Randy Dunlap wrote:
> > > From: Randy Dunlap <randy.dunlap@oracle.com>
> > > 
> > > Add I2C to config since the driver makes several i2c*() calls.
> > 
> > Correct.
> > 
> > > 
> > > Add PCI to config because the config selects I2C_I801, which depends
> > > on PCI, but currently config* does not follow dependency chains,
> > > so randconfig can enable INPUT_APANEL even when PCI is not enabled,
> > > which leads to these warnings:
> > > linux-2.6.24-mm1/drivers/i2c/busses/i2c-i801.c:641: error: implicit declaration of function 'pci_request_region'
> > > /linux-2.6.24-mm1/drivers/i2c/busses/i2c-i801.c:681: error: implicit declaration of function 'pci_release_region'
> > 
> > I'd rather drop the "select I2C_I801" if the config system can't handle
> > it properly. It's not strictly needed (not a build-time dependency), an
> > addition to the help text would work as well. Adding dependencies to
> > make our selections happy is a bit confusing and likely to cause
> > trouble in the future (as dependencies can change...)
> 
> OK.  What did you have in mind for the help text.  I changed it
> a small bit.
> 
> I also added "depends on LEDS_CLASS" since defconfig didn't have that
> set, but the build failed with wanting symbols that it provides.
> 
> Updated patch:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Add I2C to config since the driver makes several i2c*() calls.
> 
> Add to help text that the Intel I2C ICH (i801) driver is also needed
> for this kernel.
> 
> Add LEDS_CLASS to config since the driver makes les_classdev_*() calls:
> ERROR: "led_classdev_register" [drivers/input/misc/apanel.ko] undefined!
> ERROR: "__led_classdev_unregister" [drivers/input/misc/apanel.ko] undefined!
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>


On a related note, Ubuntu puts the i2c_i801 module in /etc/modprobe.d/blacklist.
To get the apanel to work, this must be removed, but that is a distro bug.

-- 
Stephen Hemminger <stephen.hemminger@vyatta.com>

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

* Re: [PATCH -mm] apanel: fix kconfig dependencies
  2008-02-07 19:04   ` Randy Dunlap
  2008-02-07 19:12     ` Stephen Hemminger
@ 2008-02-07 21:46     ` Jean Delvare
  1 sibling, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2008-02-07 21:46 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: lkml, shemminger, akpm

Hi Randy,

On Thu, 7 Feb 2008 11:04:12 -0800, Randy Dunlap wrote:
> OK.  What did you have in mind for the help text.  I changed it
> a small bit.
> 
> I also added "depends on LEDS_CLASS" since defconfig didn't have that
> set, but the build failed with wanting symbols that it provides.
> 
> Updated patch:
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Add I2C to config since the driver makes several i2c*() calls.
> 
> Add to help text that the Intel I2C ICH (i801) driver is also needed
> for this kernel.
> 
> Add LEDS_CLASS to config since the driver makes les_classdev_*() calls:
> ERROR: "led_classdev_register" [drivers/input/misc/apanel.ko] undefined!
> ERROR: "__led_classdev_unregister" [drivers/input/misc/apanel.ko] undefined!
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
>  drivers/input/misc/Kconfig |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> --- linux-2.6.24-mm1.orig/drivers/input/misc/Kconfig
> +++ linux-2.6.24-mm1/drivers/input/misc/Kconfig
> @@ -42,14 +42,14 @@ config INPUT_M68K_BEEP
>  
>  config INPUT_APANEL
>  	tristate "Fujitsu Lifebook Application Panel buttons"
> -	depends on X86
> -	select I2C_I801
> +	depends on X86 && I2C && LEDS_CLASS
>  	select INPUT_POLLDEV
>  	select CHECK_SIGNATURE
>  	help
>  	 Say Y here for support of the Application Panel buttons, used on
>  	 Fujitsu Lifebook. These are attached to the mainboard through
> -	 an SMBus interface managed by the I2C Intel ICH (i801) driver.
> +	 an SMBus interface managed by the I2C Intel ICH (i801) driver,
> +	 which you should also build for this kernel.
>  
>  	 To compile this driver as a module, choose M here: the module will
>  	 be called apanel.

Yeah, looks OK to me.

Acked-by: Jean Delvare <khali@linux-fr.org>

-- 
Jean Delvare

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

end of thread, other threads:[~2008-02-07 21:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-07  0:27 [PATCH -mm] apanel: fix kconfig dependencies Randy Dunlap
2008-02-07 16:42 ` Jean Delvare
2008-02-07 19:04   ` Randy Dunlap
2008-02-07 19:12     ` Stephen Hemminger
2008-02-07 21:46     ` Jean Delvare

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 NNTP newsgroup(s).