linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] extcon: fix fsa9480 Kconfig warning and build errors
@ 2019-06-26  1:10 ` Randy Dunlap
  2019-06-26  8:29   ` Chanwoo Choi
  0 siblings, 1 reply; 2+ messages in thread
From: Randy Dunlap @ 2019-06-26  1:10 UTC (permalink / raw)
  To: Andrew Morton, Stephen Rothwell, linux-next, LKML
  Cc: Tomasz Figa, MyungJoo Ham, Chanwoo Choi

From: Randy Dunlap <rdunlap@infradead.org>

Fix Kconfig dependency warning and subsequent build errors caused by
the Kconfig entry for EXTCON-FSA9480.  It should not select
REGMAP_I2C unless I2C is already set/enabled.

WARNING: unmet direct dependencies detected for REGMAP_I2C
  Depends on [n]: I2C [=n]
  Selected by [y]:
  - EXTCON_FSA9480 [=y] && EXTCON [=y] && INPUT [=y]

../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_read’:
../drivers/base/regmap/regmap-i2c.c:25:2: error: implicit declaration of function ‘i2c_smbus_read_byte_data’ [-Werror=implicit-function-declaration]
  ret = i2c_smbus_read_byte_data(i2c, reg);
  ^
../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_write’:
../drivers/base/regmap/regmap-i2c.c:43:2: error: implicit declaration of function ‘i2c_smbus_write_byte_data’ [-Werror=implicit-function-declaration]
  return i2c_smbus_write_byte_data(i2c, reg, val);
../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_reg_read’:
../drivers/base/regmap/regmap-i2c.c:61:2: error: implicit declaration of function ‘i2c_smbus_read_word_data’ [-Werror=implicit-function-declaration]
  ret = i2c_smbus_read_word_data(i2c, reg);
../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_reg_write’:
../drivers/base/regmap/regmap-i2c.c:79:2: error: implicit declaration of function ‘i2c_smbus_write_word_data’ [-Werror=implicit-function-declaration]
  return i2c_smbus_write_word_data(i2c, reg, val);
../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_read_swapped’:
../drivers/base/regmap/regmap-i2c.c:97:2: error: implicit declaration of function ‘i2c_smbus_read_word_swapped’ [-Werror=implicit-function-declaration]
  ret = i2c_smbus_read_word_swapped(i2c, reg);
../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_write_swapped’:
../drivers/base/regmap/regmap-i2c.c:115:2: error: implicit declaration of function ‘i2c_smbus_write_word_swapped’ [-Werror=implicit-function-declaration]
  return i2c_smbus_write_word_swapped(i2c, reg, val);
../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_write’:
../drivers/base/regmap/regmap-i2c.c:129:2: error: implicit declaration of function ‘i2c_master_send’ [-Werror=implicit-function-declaration]
  ret = i2c_master_send(i2c, data, count);
../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_gather_write’:
../drivers/base/regmap/regmap-i2c.c:150:2: error: implicit declaration of function ‘i2c_check_functionality’ [-Werror=implicit-function-declaration]
  if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_NOSTART))
../drivers/base/regmap/regmap-i2c.c:163:2: error: implicit declaration of function ‘i2c_transfer’ [-Werror=implicit-function-declaration]
  ret = i2c_transfer(i2c->adapter, xfer, 2);
../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_smbus_i2c_write’:
../drivers/base/regmap/regmap-i2c.c:218:2: error: implicit declaration of function ‘i2c_smbus_write_i2c_block_data’ [-Werror=implicit-function-declaration]
  return i2c_smbus_write_i2c_block_data(i2c, ((u8 *)data)[0], count,
../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_smbus_i2c_read’:
../drivers/base/regmap/regmap-i2c.c:233:2: error: implicit declaration of function ‘i2c_smbus_read_i2c_block_data’ [-Werror=implicit-function-declaration]
  ret = i2c_smbus_read_i2c_block_data(i2c, ((u8 *)reg)[0], val_size, val);

../drivers/extcon/extcon-fsa9480.c: In function ‘fsa9480_module_init’:
../drivers/extcon/extcon-fsa9480.c:383:2: error: implicit declaration of function ‘i2c_add_driver’ [-Werror=implicit-function-declaration]
  return i2c_add_driver(&fsa9480_i2c_driver);
../drivers/extcon/extcon-fsa9480.c: In function ‘fsa9480_module_exit’:
../drivers/extcon/extcon-fsa9480.c:389:2: error: implicit declaration of function ‘i2c_del_driver’ [-Werror=implicit-function-declaration]
  i2c_del_driver(&fsa9480_i2c_driver);

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Tomasz Figa <tomasz.figa@gmail.com>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>
---
Found in mmotm; applies to linux-next.

To extcon maintainers:  there are a few more extcon driver Kconfig
entries that seem to have this same problem of selecting REGMAP_I2C
without checking that I2C is set/enabled.

 drivers/extcon/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- mmotm-2019-0625-1620.orig/drivers/extcon/Kconfig
+++ mmotm-2019-0625-1620/drivers/extcon/Kconfig
@@ -39,7 +39,7 @@ config EXTCON_AXP288
 
 config EXTCON_FSA9480
 	tristate "FSA9480 EXTCON Support"
-	depends on INPUT
+	depends on INPUT && I2C
 	select IRQ_DOMAIN
 	select REGMAP_I2C
 	help



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

* Re: [PATCH -next] extcon: fix fsa9480 Kconfig warning and build errors
  2019-06-26  1:10 ` [PATCH -next] extcon: fix fsa9480 Kconfig warning and build errors Randy Dunlap
@ 2019-06-26  8:29   ` Chanwoo Choi
  0 siblings, 0 replies; 2+ messages in thread
From: Chanwoo Choi @ 2019-06-26  8:29 UTC (permalink / raw)
  To: Randy Dunlap, Andrew Morton, Stephen Rothwell, linux-next, LKML
  Cc: Tomasz Figa, MyungJoo Ham

Hi,

On 19. 6. 26. 오전 10:10, Randy Dunlap wrote:
> From: Randy Dunlap <rdunlap@infradead.org>
> 
> Fix Kconfig dependency warning and subsequent build errors caused by
> the Kconfig entry for EXTCON-FSA9480.  It should not select
> REGMAP_I2C unless I2C is already set/enabled.
> 
> WARNING: unmet direct dependencies detected for REGMAP_I2C
>   Depends on [n]: I2C [=n]
>   Selected by [y]:
>   - EXTCON_FSA9480 [=y] && EXTCON [=y] && INPUT [=y]
> 
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_read’:
> ../drivers/base/regmap/regmap-i2c.c:25:2: error: implicit declaration of function ‘i2c_smbus_read_byte_data’ [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_byte_data(i2c, reg);
>   ^
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_byte_reg_write’:
> ../drivers/base/regmap/regmap-i2c.c:43:2: error: implicit declaration of function ‘i2c_smbus_write_byte_data’ [-Werror=implicit-function-declaration]
>   return i2c_smbus_write_byte_data(i2c, reg, val);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_reg_read’:
> ../drivers/base/regmap/regmap-i2c.c:61:2: error: implicit declaration of function ‘i2c_smbus_read_word_data’ [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_word_data(i2c, reg);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_reg_write’:
> ../drivers/base/regmap/regmap-i2c.c:79:2: error: implicit declaration of function ‘i2c_smbus_write_word_data’ [-Werror=implicit-function-declaration]
>   return i2c_smbus_write_word_data(i2c, reg, val);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_read_swapped’:
> ../drivers/base/regmap/regmap-i2c.c:97:2: error: implicit declaration of function ‘i2c_smbus_read_word_swapped’ [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_word_swapped(i2c, reg);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_smbus_word_write_swapped’:
> ../drivers/base/regmap/regmap-i2c.c:115:2: error: implicit declaration of function ‘i2c_smbus_write_word_swapped’ [-Werror=implicit-function-declaration]
>   return i2c_smbus_write_word_swapped(i2c, reg, val);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_write’:
> ../drivers/base/regmap/regmap-i2c.c:129:2: error: implicit declaration of function ‘i2c_master_send’ [-Werror=implicit-function-declaration]
>   ret = i2c_master_send(i2c, data, count);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_gather_write’:
> ../drivers/base/regmap/regmap-i2c.c:150:2: error: implicit declaration of function ‘i2c_check_functionality’ [-Werror=implicit-function-declaration]
>   if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_NOSTART))
> ../drivers/base/regmap/regmap-i2c.c:163:2: error: implicit declaration of function ‘i2c_transfer’ [-Werror=implicit-function-declaration]
>   ret = i2c_transfer(i2c->adapter, xfer, 2);
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_smbus_i2c_write’:
> ../drivers/base/regmap/regmap-i2c.c:218:2: error: implicit declaration of function ‘i2c_smbus_write_i2c_block_data’ [-Werror=implicit-function-declaration]
>   return i2c_smbus_write_i2c_block_data(i2c, ((u8 *)data)[0], count,
> ../drivers/base/regmap/regmap-i2c.c: In function ‘regmap_i2c_smbus_i2c_read’:
> ../drivers/base/regmap/regmap-i2c.c:233:2: error: implicit declaration of function ‘i2c_smbus_read_i2c_block_data’ [-Werror=implicit-function-declaration]
>   ret = i2c_smbus_read_i2c_block_data(i2c, ((u8 *)reg)[0], val_size, val);
> 
> ../drivers/extcon/extcon-fsa9480.c: In function ‘fsa9480_module_init’:
> ../drivers/extcon/extcon-fsa9480.c:383:2: error: implicit declaration of function ‘i2c_add_driver’ [-Werror=implicit-function-declaration]
>   return i2c_add_driver(&fsa9480_i2c_driver);
> ../drivers/extcon/extcon-fsa9480.c: In function ‘fsa9480_module_exit’:
> ../drivers/extcon/extcon-fsa9480.c:389:2: error: implicit declaration of function ‘i2c_del_driver’ [-Werror=implicit-function-declaration]
>   i2c_del_driver(&fsa9480_i2c_driver);
> 
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Tomasz Figa <tomasz.figa@gmail.com>
> Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> ---
> Found in mmotm; applies to linux-next.
> 
> To extcon maintainers:  there are a few more extcon driver Kconfig
> entries that seem to have this same problem of selecting REGMAP_I2C
> without checking that I2C is set/enabled.

Thanks for your fixup. I'll check it with more effort.
Applied it.

> 
>  drivers/extcon/Kconfig |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- mmotm-2019-0625-1620.orig/drivers/extcon/Kconfig
> +++ mmotm-2019-0625-1620/drivers/extcon/Kconfig
> @@ -39,7 +39,7 @@ config EXTCON_AXP288
>  
>  config EXTCON_FSA9480
>  	tristate "FSA9480 EXTCON Support"
> -	depends on INPUT
> +	depends on INPUT && I2C
>  	select IRQ_DOMAIN
>  	select REGMAP_I2C
>  	help
> 
> 
> 
> 


-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

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

end of thread, other threads:[~2019-06-26  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20190626011050epcas1p3793984ff29bca6e3f57861c6ee837c29@epcas1p3.samsung.com>
2019-06-26  1:10 ` [PATCH -next] extcon: fix fsa9480 Kconfig warning and build errors Randy Dunlap
2019-06-26  8:29   ` Chanwoo Choi

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