linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] regmap: Add eplicit dependencies to catch "select" misuse
@ 2014-08-17 10:08 Geert Uytterhoeven
       [not found] ` <1408270138-29811-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-08-17 10:08 UTC (permalink / raw)
  To: Mark Brown, Greg Kroah-Hartman, MyungJoo Ham, Chanwoo Choi
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

Add explicit dependencies for the various regmap modules, so Kconfig
will print a warning message when another module selects a regmap module
without fulfilling its dependencies.

Without this, it's much more difficult to find out which module did the
offending select.

Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
---
 drivers/base/regmap/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig
index 4251570610c9..8a3f51f7b1b9 100644
--- a/drivers/base/regmap/Kconfig
+++ b/drivers/base/regmap/Kconfig
@@ -11,12 +11,15 @@ config REGMAP
 
 config REGMAP_I2C
 	tristate
+	depends on I2C
 
 config REGMAP_SPI
 	tristate
+	depends on SPI
 
 config REGMAP_SPMI
 	tristate
+	depends on SPMI
 
 config REGMAP_MMIO
 	tristate
-- 
1.9.1

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

* [PATCH 2/2] extcon: sm5502: EXTCON_SM5502 should depend on I2C
       [not found] ` <1408270138-29811-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-08-17 10:08   ` Geert Uytterhoeven
       [not found]     ` <1408270138-29811-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  2014-08-17 12:31   ` [PATCH 1/2] regmap: Add eplicit dependencies to catch "select" misuse Wolfram Sang
  2014-08-17 13:54   ` Mark Brown
  2 siblings, 1 reply; 5+ messages in thread
From: Geert Uytterhoeven @ 2014-08-17 10:08 UTC (permalink / raw)
  To: Mark Brown, Greg Kroah-Hartman, MyungJoo Ham, Chanwoo Choi
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA, Geert Uytterhoeven

EXTCON_SM5502 selects REGMAP_I2C, but if I2C=n:

drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_read’:
drivers/base/regmap/regmap-i2c.c:28: error: implicit declaration of function ‘i2c_smbus_read_byte_data’
drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_write’:
drivers/base/regmap/regmap-i2c.c:46: error: implicit declaration of function ‘i2c_smbus_write_byte_data’
drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_reg_read’:
drivers/base/regmap/regmap-i2c.c:64: error: implicit declaration of function ‘i2c_smbus_read_word_data’
drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_reg_write’:
drivers/base/regmap/regmap-i2c.c:82: error: implicit declaration of function ‘i2c_smbus_write_word_data’
drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_write’:
drivers/base/regmap/regmap-i2c.c:96: error: implicit declaration of function ‘i2c_master_send’
drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_gather_write’:
drivers/base/regmap/regmap-i2c.c:117: error: implicit declaration of function ‘i2c_check_functionality’
drivers/base/regmap/regmap-i2c.c:130: error: implicit declaration of function ‘i2c_transfer’

Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
---
 drivers/extcon/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig
index 6f2f4727de2c..764f3a113e0a 100644
--- a/drivers/extcon/Kconfig
+++ b/drivers/extcon/Kconfig
@@ -72,6 +72,7 @@ config EXTCON_PALMAS
 
 config EXTCON_SM5502
 	tristate "SM5502 EXTCON support"
+	depends on I2C
 	select IRQ_DOMAIN
 	select REGMAP_I2C
 	select REGMAP_IRQ
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] regmap: Add eplicit dependencies to catch "select" misuse
       [not found] ` <1408270138-29811-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  2014-08-17 10:08   ` [PATCH 2/2] extcon: sm5502: EXTCON_SM5502 should depend on I2C Geert Uytterhoeven
@ 2014-08-17 12:31   ` Wolfram Sang
  2014-08-17 13:54   ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2014-08-17 12:31 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mark Brown, Greg Kroah-Hartman, MyungJoo Ham, Chanwoo Choi,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

On Sun, Aug 17, 2014 at 12:08:57PM +0200, Geert Uytterhoeven wrote:
> Add explicit dependencies for the various regmap modules, so Kconfig
> will print a warning message when another module selects a regmap module
> without fulfilling its dependencies.
> 
> Without this, it's much more difficult to find out which module did the
> offending select.
> 
> Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>

Acked-by: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 1/2] regmap: Add eplicit dependencies to catch "select" misuse
       [not found] ` <1408270138-29811-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
  2014-08-17 10:08   ` [PATCH 2/2] extcon: sm5502: EXTCON_SM5502 should depend on I2C Geert Uytterhoeven
  2014-08-17 12:31   ` [PATCH 1/2] regmap: Add eplicit dependencies to catch "select" misuse Wolfram Sang
@ 2014-08-17 13:54   ` Mark Brown
  2 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2014-08-17 13:54 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Greg Kroah-Hartman, MyungJoo Ham, Chanwoo Choi,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

On Sun, Aug 17, 2014 at 12:08:57PM +0200, Geert Uytterhoeven wrote:
> Add explicit dependencies for the various regmap modules, so Kconfig
> will print a warning message when another module selects a regmap module
> without fulfilling its dependencies.

Applied, thanks.  The second patch is a bug fix independent of this one.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 2/2] extcon: sm5502: EXTCON_SM5502 should depend on I2C
       [not found]     ` <1408270138-29811-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
@ 2014-08-21  2:18       ` Chanwoo Choi
  0 siblings, 0 replies; 5+ messages in thread
From: Chanwoo Choi @ 2014-08-21  2:18 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mark Brown, Greg Kroah-Hartman, MyungJoo Ham,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-i2c-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

Hi Geert

Thanks for your report. I already sent a patch[1] to fix this build break
and I'll send pull request to includec this patch in 3.17-rc2.

[1] https://lkml.org/lkml/2014/8/13/761

Best Regards,
Chanwoo Choi


On 08/17/2014 07:08 PM, Geert Uytterhoeven wrote:
> EXTCON_SM5502 selects REGMAP_I2C, but if I2C=n:
> 
> drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_read’:
> drivers/base/regmap/regmap-i2c.c:28: error: implicit declaration of function ‘i2c_smbus_read_byte_data’
> drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_write’:
> drivers/base/regmap/regmap-i2c.c:46: error: implicit declaration of function ‘i2c_smbus_write_byte_data’
> drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_reg_read’:
> drivers/base/regmap/regmap-i2c.c:64: error: implicit declaration of function ‘i2c_smbus_read_word_data’
> drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_reg_write’:
> drivers/base/regmap/regmap-i2c.c:82: error: implicit declaration of function ‘i2c_smbus_write_word_data’
> drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_write’:
> drivers/base/regmap/regmap-i2c.c:96: error: implicit declaration of function ‘i2c_master_send’
> drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_gather_write’:
> drivers/base/regmap/regmap-i2c.c:117: error: implicit declaration of function ‘i2c_check_functionality’
> drivers/base/regmap/regmap-i2c.c:130: error: implicit declaration of function ‘i2c_transfer’
> 
> Signed-off-by: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
> ---
>  drivers/extcon/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/extcon/Kconfig b/drivers/extcon/Kconfig
> index 6f2f4727de2c..764f3a113e0a 100644
> --- a/drivers/extcon/Kconfig
> +++ b/drivers/extcon/Kconfig
> @@ -72,6 +72,7 @@ config EXTCON_PALMAS
>  
>  config EXTCON_SM5502
>  	tristate "SM5502 EXTCON support"
> +	depends on I2C
>  	select IRQ_DOMAIN
>  	select REGMAP_I2C
>  	select REGMAP_IRQ
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2014-08-21  2:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-17 10:08 [PATCH 1/2] regmap: Add eplicit dependencies to catch "select" misuse Geert Uytterhoeven
     [not found] ` <1408270138-29811-1-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-08-17 10:08   ` [PATCH 2/2] extcon: sm5502: EXTCON_SM5502 should depend on I2C Geert Uytterhoeven
     [not found]     ` <1408270138-29811-2-git-send-email-geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
2014-08-21  2:18       ` Chanwoo Choi
2014-08-17 12:31   ` [PATCH 1/2] regmap: Add eplicit dependencies to catch "select" misuse Wolfram Sang
2014-08-17 13:54   ` Mark Brown

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).