linux-stable/drivers/counter
Arnd Bergmann 10d3340441 mfd: rz-mtu3: Link time dependencies
The new set of drivers for RZ/G2L MTU3a tries to enable compile-testing the
individual client drivers even when the MFD portion is disabled but gets it
wrong, causing a link failure when the core is in a loadable module but the
other drivers are built-in:

x86_64-linux-ld: drivers/pwm/pwm-rz-mtu3.o: in function `rz_mtu3_pwm_apply':
pwm-rz-mtu3.c:(.text+0x4bf): undefined reference to `rz_mtu3_8bit_ch_write'
x86_64-linux-ld: pwm-rz-mtu3.c:(.text+0x509): undefined reference to `rz_mtu3_disable'

arm-linux-gnueabi-ld: drivers/counter/rz-mtu3-cnt.o: in function `rz_mtu3_cascade_counts_enable_get':
rz-mtu3-cnt.c:(.text+0xbec): undefined reference to `rz_mtu3_shared_reg_read'

It seems better not to add the extra complexity here but instead just use
a normal hard dependency, so remove the #else portion in the header along
with the "|| COMPILE_TEST". This could also be fixed by having slightly more
elaborate Kconfig dependencies or using the cursed 'IS_REACHABLE()' helper,
but in practice it's already possible to compile-test all these drivers
by enabling the mtd portion.

Fixes: 254d3a7274 ("pwm: Add Renesas RZ/G2L MTU3a PWM driver")
Fixes: 0be8907359 ("counter: Add Renesas RZ/G2L MTU3a counter driver")
Fixes: 654c293e16 ("mfd: Add Renesas RZ/G2L MTU3a core driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230719090430.1925182-1-arnd@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
2023-08-18 21:48:04 +01:00
..
104-quad-8.c counter: 104-quad-8: Migrate to the regmap API 2023-05-18 20:39:46 -04:00
counter-chrdev.c counter: Introduce the COUNTER_COMP_ARRAY component type 2022-09-30 14:32:35 +02:00
counter-chrdev.h counter: Add character device interface 2021-10-17 10:53:52 +01:00
counter-core.c counter: Move symbols into COUNTER namespace 2022-09-30 14:32:35 +02:00
counter-sysfs.c counter: i8254: Introduce the Intel 8254 interface library module 2023-06-08 10:11:17 -04:00
counter-sysfs.h counter: Internalize sysfs interface code 2021-10-17 10:52:58 +01:00
ftm-quaddec.c counter: Move symbols into COUNTER namespace 2022-09-30 14:32:35 +02:00
i8254.c counter: i8254: Introduce the Intel 8254 interface library module 2023-06-08 10:11:17 -04:00
intel-qep.c counter: Move symbols into COUNTER namespace 2022-09-30 14:32:35 +02:00
interrupt-cnt.c counter: interrupt-cnt: Implement watch_validate callback 2022-09-30 14:32:35 +02:00
Kconfig mfd: rz-mtu3: Link time dependencies 2023-08-18 21:48:04 +01:00
Makefile counter: i8254: Introduce the Intel 8254 interface library module 2023-06-08 10:11:17 -04:00
microchip-tcb-capture.c counter: microchip-tcb-capture: Handle Signal1 read and Synapse 2022-10-23 20:38:49 -04:00
rz-mtu3-cnt.c counter: rz-mtu3-cnt: Unlock on error in rz_mtu3_count_ceiling_write() 2023-04-26 11:40:35 +01:00
stm32-lptimer-cnt.c counter: stm32-lptimer-cnt: fix the check on arr and cmp registers update 2022-11-26 16:49:28 -05:00
stm32-timer-cnt.c counter: stm32-timer-cnt: Reset TIM_TISEL to its default value in probe 2023-05-09 19:17:17 -04:00
ti-ecap-capture.c counter: ti-ecap-capture: fix IS_ERR() vs NULL check 2022-10-17 09:51:29 -04:00
ti-eqep.c counter: Move symbols into COUNTER namespace 2022-09-30 14:32:35 +02:00