Linux USB
 help / color / mirror / Atom feed
* [PATCH -next] usb: typec: anx7411: Fix build error without CONFIG_POWER_SUPPLY
@ 2022-09-20  8:44 Ren Zhijie
  2022-09-22  9:24 ` Heikki Krogerus
  2022-09-22 10:00 ` Xin Ji
  0 siblings, 2 replies; 3+ messages in thread
From: Ren Zhijie @ 2022-09-20  8:44 UTC (permalink / raw)
  To: heikki.krogerus, gregkh, xji; +Cc: linux-usb, linux-kernel, Ren Zhijie

Building without CONFIG_POWER_SUPPLY will fail:

drivers/usb/typec/anx7411.o: In function `anx7411_detect_power_mode':
anx7411.c:(.text+0x527): undefined reference to `power_supply_changed'
drivers/usb/typec/anx7411.o: In function `anx7411_psy_set_prop':
anx7411.c:(.text+0x90d): undefined reference to `power_supply_get_drvdata'
anx7411.c:(.text+0x930): undefined reference to `power_supply_changed'
drivers/usb/typec/anx7411.o: In function `anx7411_psy_get_prop':
anx7411.c:(.text+0x94d): undefined reference to `power_supply_get_drvdata'
drivers/usb/typec/anx7411.o: In function `anx7411_i2c_probe':
anx7411.c:(.text+0x111d): undefined reference to
`devm_power_supply_register'
drivers/usb/typec/anx7411.o: In function `anx7411_work_func':
anx7411.c:(.text+0x167c): undefined reference to `power_supply_changed'
anx7411.c:(.text+0x1b55): undefined reference to `power_supply_changed'

Add POWER_SUPPLY dependency to Kconfig.

Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support")
Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
---
 drivers/usb/typec/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig
index 5defdfead653..831e7049977d 100644
--- a/drivers/usb/typec/Kconfig
+++ b/drivers/usb/typec/Kconfig
@@ -56,6 +56,7 @@ config TYPEC_ANX7411
 	tristate "Analogix ANX7411 Type-C DRP Port controller driver"
 	depends on I2C
 	depends on USB_ROLE_SWITCH
+	depends on POWER_SUPPLY
 	help
 	  Say Y or M here if your system has Analogix ANX7411 Type-C DRP Port
 	  controller driver.
-- 
2.17.1


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

* Re: [PATCH -next] usb: typec: anx7411: Fix build error without CONFIG_POWER_SUPPLY
  2022-09-20  8:44 [PATCH -next] usb: typec: anx7411: Fix build error without CONFIG_POWER_SUPPLY Ren Zhijie
@ 2022-09-22  9:24 ` Heikki Krogerus
  2022-09-22 10:00 ` Xin Ji
  1 sibling, 0 replies; 3+ messages in thread
From: Heikki Krogerus @ 2022-09-22  9:24 UTC (permalink / raw)
  To: Ren Zhijie; +Cc: gregkh, xji, linux-usb, linux-kernel

On Tue, Sep 20, 2022 at 04:44:31PM +0800, Ren Zhijie wrote:
> Building without CONFIG_POWER_SUPPLY will fail:
> 
> drivers/usb/typec/anx7411.o: In function `anx7411_detect_power_mode':
> anx7411.c:(.text+0x527): undefined reference to `power_supply_changed'
> drivers/usb/typec/anx7411.o: In function `anx7411_psy_set_prop':
> anx7411.c:(.text+0x90d): undefined reference to `power_supply_get_drvdata'
> anx7411.c:(.text+0x930): undefined reference to `power_supply_changed'
> drivers/usb/typec/anx7411.o: In function `anx7411_psy_get_prop':
> anx7411.c:(.text+0x94d): undefined reference to `power_supply_get_drvdata'
> drivers/usb/typec/anx7411.o: In function `anx7411_i2c_probe':
> anx7411.c:(.text+0x111d): undefined reference to
> `devm_power_supply_register'
> drivers/usb/typec/anx7411.o: In function `anx7411_work_func':
> anx7411.c:(.text+0x167c): undefined reference to `power_supply_changed'
> anx7411.c:(.text+0x1b55): undefined reference to `power_supply_changed'
> 
> Add POWER_SUPPLY dependency to Kconfig.
> 
> Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support")
> Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig
> index 5defdfead653..831e7049977d 100644
> --- a/drivers/usb/typec/Kconfig
> +++ b/drivers/usb/typec/Kconfig
> @@ -56,6 +56,7 @@ config TYPEC_ANX7411
>  	tristate "Analogix ANX7411 Type-C DRP Port controller driver"
>  	depends on I2C
>  	depends on USB_ROLE_SWITCH
> +	depends on POWER_SUPPLY
>  	help
>  	  Say Y or M here if your system has Analogix ANX7411 Type-C DRP Port
>  	  controller driver.
> -- 
> 2.17.1

-- 
heikki

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

* Re: [PATCH -next] usb: typec: anx7411: Fix build error without CONFIG_POWER_SUPPLY
  2022-09-20  8:44 [PATCH -next] usb: typec: anx7411: Fix build error without CONFIG_POWER_SUPPLY Ren Zhijie
  2022-09-22  9:24 ` Heikki Krogerus
@ 2022-09-22 10:00 ` Xin Ji
  1 sibling, 0 replies; 3+ messages in thread
From: Xin Ji @ 2022-09-22 10:00 UTC (permalink / raw)
  To: Ren Zhijie; +Cc: heikki.krogerus, gregkh, linux-usb, linux-kernel

On Tue, Sep 20, 2022 at 04:44:31PM +0800, Ren Zhijie wrote:
> Building without CONFIG_POWER_SUPPLY will fail:
> 
> drivers/usb/typec/anx7411.o: In function `anx7411_detect_power_mode':
> anx7411.c:(.text+0x527): undefined reference to `power_supply_changed'
> drivers/usb/typec/anx7411.o: In function `anx7411_psy_set_prop':
> anx7411.c:(.text+0x90d): undefined reference to `power_supply_get_drvdata'
> anx7411.c:(.text+0x930): undefined reference to `power_supply_changed'
> drivers/usb/typec/anx7411.o: In function `anx7411_psy_get_prop':
> anx7411.c:(.text+0x94d): undefined reference to `power_supply_get_drvdata'
> drivers/usb/typec/anx7411.o: In function `anx7411_i2c_probe':
> anx7411.c:(.text+0x111d): undefined reference to
> `devm_power_supply_register'
> drivers/usb/typec/anx7411.o: In function `anx7411_work_func':
> anx7411.c:(.text+0x167c): undefined reference to `power_supply_changed'
> anx7411.c:(.text+0x1b55): undefined reference to `power_supply_changed'
> 
> Add POWER_SUPPLY dependency to Kconfig.
Hi Ren Zhijie, thanks for your patch.

Reviewed-by: Xin Ji <xji@analogixsemi.com>
> 
> Fixes: fe6d8a9c8e64 ("usb: typec: anx7411: Add Analogix PD ANX7411 support")
> Signed-off-by: Ren Zhijie <renzhijie2@huawei.com>
> ---
>  drivers/usb/typec/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig
> index 5defdfead653..831e7049977d 100644
> --- a/drivers/usb/typec/Kconfig
> +++ b/drivers/usb/typec/Kconfig
> @@ -56,6 +56,7 @@ config TYPEC_ANX7411
>  	tristate "Analogix ANX7411 Type-C DRP Port controller driver"
>  	depends on I2C
>  	depends on USB_ROLE_SWITCH
> +	depends on POWER_SUPPLY
>  	help
>  	  Say Y or M here if your system has Analogix ANX7411 Type-C DRP Port
>  	  controller driver.
> -- 
> 2.17.1

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

end of thread, other threads:[~2022-09-22 10:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-20  8:44 [PATCH -next] usb: typec: anx7411: Fix build error without CONFIG_POWER_SUPPLY Ren Zhijie
2022-09-22  9:24 ` Heikki Krogerus
2022-09-22 10:00 ` Xin Ji

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox