Skip to contentSkip to conversation

rtc: bq4802: add sparc dependency

PATCH Superseded Arnd Bergmann 2 participants 2 messages Jul 19, 2023 Real time clock (RTC)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: bq4802: add sparc dependency

From: Arnd Bergmann <[email protected]>

The added HAS_IOPORT dependency might not actually be necessary as Geert points out, but the driver is also only used on one architecture. Sparc is also a special case here since it converts port numbers into virtual addresses rather than having them mapped into a particular part of the __iomem address space, so the difference is actually not important here.

Add a dependency on sparc, but allow compile-testing otherwise, to make this clearer without anyone having to spend much time modernizing the driver beyond that.

---
 drivers/rtc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/rtc/Kconfig +1 -1
index 05f4b2d66290d..99e674d34823b 100644
@@ -1195,7 +1195,7 @@ config RTC_DRV_MSM6242
 
 config RTC_DRV_BQ4802
 	tristate "TI BQ4802"
-	depends on HAS_IOMEM && HAS_IOPORT
+	depends on SPARC || (HAS_IOMEM && HAS_IOPORT && COMPILE_TEST)
 	help
 	  If you say Y here you will get support for the TI
 	  BQ4802 RTC chip.
Signature · 1 line
2.39.2
#1 lore raw

Hi Arnd,

Quoted 8 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The added HAS_IOPORT dependency might not actually be necessary as Geert points out, but the driver is also only used on one architecture. Sparc is also a special case here since it converts port numbers into virtual addresses rather than having them mapped into a particular part of the __iomem address space, so the difference is actually not important here.

Quoted 8 lines

Add a dependency on sparc, but allow compile-testing otherwise, to make this clearer without anyone having to spend much time modernizing the driver beyond that.

Thanks for your patch!

drivers/rtc/Kconfig config RTC_DRV_MSM6242 · line 1198

Quoted 8 lines
drivers/rtc/Kconfig +1 -1
@@ -1195,7 +1195,7 @@ config RTC_DRV_MSM6242
 
 config RTC_DRV_BQ4802
        tristate "TI BQ4802"
-       depends on HAS_IOMEM && HAS_IOPORT
+       depends on SPARC || (HAS_IOMEM && HAS_IOPORT && COMPILE_TEST)

I'd rather just add a line "depends on SPARC || COMPILE_TEST", which is easier to parse.

drivers/rtc/Kconfig config RTC_DRV_MSM6242 · line 1201

Quoted 3 lines
drivers/rtc/Kconfig +0 -0
        help
          If you say Y here you will get support for the TI
          BQ4802 RTC chip.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds