[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OS0PR01MB5922D3163524299B94166B178638A@OS0PR01MB5922.jpnprd01.prod.outlook.com>
Date: Tue, 18 Jul 2023 11:26:28 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: Randy Dunlap <rd.dunlab@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-pwm@...r.kernel.org" <linux-pwm@...r.kernel.org>
CC: Thierry Reding <thierry.reding@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
"lee.jones@...aro.org" <lee.jones@...aro.org>,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: RE: [PATCH v2] pwm: fix pwm-rz-mtu3.c build errors
Hi Randy,
> -----Original Message-----
> From: Randy Dunlap <rd.dunlab@...il.com>
> Sent: Tuesday, July 18, 2023 7:41 AM
> To: linux-kernel@...r.kernel.org; linux-pwm@...r.kernel.org
> Cc: Biju Das <biju.das.jz@...renesas.com>; Thierry Reding
> <thierry.reding@...il.com>; Uwe Kleine-König <u.kleine-
> koenig@...gutronix.de>
> Subject: [PATCH v2] pwm: fix pwm-rz-mtu3.c build errors
>
> From: Randy Dunlap <rd.dunlab@...il.com>
>
> When (MFD) RZ_MTU3=m and PWM_RZ_MTU3=y, there are numerous build errors:
>
> ld: vmlinux.o: in function `rz_mtu3_pwm_config':
> drivers/pwm/pwm-rz-mtu3.c:374: undefined reference to `rz_mtu3_disable'
> ld: drivers/pwm/pwm-rz-mtu3.c:377: undefined reference to
> `rz_mtu3_8bit_ch_write'
> ld: vmlinux.o: in function `rz_mtu3_pwm_write_tgr_registers':
> drivers/pwm/pwm-rz-mtu3.c:110: undefined reference to
> `rz_mtu3_16bit_ch_write'
> ld: vmlinux.o: in function `rz_mtu3_pwm_config':
> drivers/pwm/pwm-rz-mtu3.c:382: undefined reference to
> `rz_mtu3_8bit_ch_write'
> ld: vmlinux.o: in function `rz_mtu3_pwm_write_tgr_registers':
> drivers/pwm/pwm-rz-mtu3.c:110: undefined reference to
> `rz_mtu3_16bit_ch_write'
> ld: drivers/pwm/pwm-rz-mtu3.c:111: undefined reference to
> `rz_mtu3_16bit_ch_write'
> ld: vmlinux.o: in function `rz_mtu3_pwm_config':
> drivers/pwm/pwm-rz-mtu3.c:397: undefined reference to `rz_mtu3_enable'
> ld: vmlinux.o: in function `rz_mtu3_pwm_disable':
> drivers/pwm/pwm-rz-mtu3.c:259: undefined reference to
> `rz_mtu3_8bit_ch_write'
> ld: drivers/pwm/pwm-rz-mtu3.c:264: undefined reference to
> `rz_mtu3_disable'
> ld: vmlinux.o: in function `rz_mtu3_pwm_enable':
> drivers/pwm/pwm-rz-mtu3.c:230: undefined reference to
> `rz_mtu3_8bit_ch_write'
> ld: drivers/pwm/pwm-rz-mtu3.c:234: undefined reference to
> `rz_mtu3_8bit_ch_write'
> ld: drivers/pwm/pwm-rz-mtu3.c:238: undefined reference to `rz_mtu3_enable'
> ld: vmlinux.o: in function `rz_mtu3_pwm_is_ch_enabled':
> drivers/pwm/pwm-rz-mtu3.c:155: undefined reference to `rz_mtu3_is_enabled'
> ld: drivers/pwm/pwm-rz-mtu3.c:162: undefined reference to
> `rz_mtu3_8bit_ch_read'
> ld: vmlinux.o: in function `rz_mtu3_pwm_read_tgr_registers':
> drivers/pwm/pwm-rz-mtu3.c:102: undefined reference to
> `rz_mtu3_16bit_ch_read'
> ld: drivers/pwm/pwm-rz-mtu3.c:102: undefined reference to
> `rz_mtu3_16bit_ch_read'
> ld: drivers/pwm/pwm-rz-mtu3.c:103: undefined reference to
> `rz_mtu3_16bit_ch_read'
> ld: vmlinux.o: in function `rz_mtu3_pwm_get_state':
> drivers/pwm/pwm-rz-mtu3.c:296: undefined reference to
> `rz_mtu3_8bit_ch_read'
>
> Modify the dependencies of PWM_RZ_MTU3 so that COMPILE_TEST is still
> allowed but PWM_RZ_MTU3 depends on RZ_MTU3 if it is being built but also
> allow the latter not to be built.
>
> Fixes: 254d3a727421 ("pwm: Add Renesas RZ/G2L MTU3a PWM driver")
> Signed-off-by: Randy Dunlap <rd.dunlab@...il.com
> Cc: Biju Das <biju.das.jz@...renesas.com>
> Cc: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> Cc: Thierry Reding <thierry.reding@...il.com>
> Cc: linux-pwm@...r.kernel.org
> ---
> v2: fix typo in Subject;
> correct my email address while infradead.org is down;
>
> drivers/pwm/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff -- a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
> --- a/drivers/pwm/Kconfig
> +++ b/drivers/pwm/Kconfig
> @@ -505,7 +505,8 @@ config PWM_ROCKCHIP
>
> config PWM_RZ_MTU3
> tristate "Renesas RZ/G2L MTU3a PWM Timer support"
> - depends on RZ_MTU3 || COMPILE_TEST
> + depends on COMPILE_TEST
> + depends on RZ_MTU3 || RZ_MTU3=n
> depends on HAS_IOMEM
> help
> This driver exposes the MTU3a PWM Timer controller found in
The below patch also works fine,
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 1c8dbb064ee5..56ab2f4b91fe 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -505,7 +505,7 @@ config PWM_ROCKCHIP
config PWM_RZ_MTU3
tristate "Renesas RZ/G2L MTU3a PWM Timer support"
- depends on RZ_MTU3 || COMPILE_TEST
+ depends on RZ_MTU3 || (COMPILE_TEST && RZ_MTU3)
depends on HAS_IOMEM
help
This driver exposes the MTU3a PWM Timer controller found in Renesas
So shall I send this fix instead.
Cheers,
Biju
Powered by blists - more mailing lists