diff mbox series

[v4,28/41] rtc: add HAS_IOPORT dependencies

Message ID 20230516110038.2413224-29-schnelle@linux.ibm.com
State New
Headers show
Series treewide: Remove I/O port accessors for HAS_IOPORT=n | expand

Commit Message

Niklas Schnelle May 16, 2023, 11 a.m. UTC
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to add HAS_IOPORT as dependency for
those drivers using them.

Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
Note: The HAS_IOPORT Kconfig option was added in v6.4-rc1 so
      per-subsystem patches may be applied independently

 drivers/rtc/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Maciej W. Rozycki May 16, 2023, 3:49 p.m. UTC | #1
On Tue, 16 May 2023, Niklas Schnelle wrote:

> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> index 753872408615..9ae082b14c44 100644
> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -956,6 +956,7 @@ comment "Platform RTC drivers"
>  config RTC_DRV_CMOS
>  	tristate "PC-style 'CMOS'"
>  	depends on X86 || ARM || PPC || MIPS || SPARC64
> +	depends on HAS_IOPORT

 NAK, this hasn't addressed my input for v2.  Arnd also followed up with 
similar observations with v3.

  Maciej
Niklas Schnelle May 17, 2023, 8:15 a.m. UTC | #2
On Tue, 2023-05-16 at 16:49 +0100, Maciej W. Rozycki wrote:
> On Tue, 16 May 2023, Niklas Schnelle wrote:
> 
> > diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> > index 753872408615..9ae082b14c44 100644
> > --- a/drivers/rtc/Kconfig
> > +++ b/drivers/rtc/Kconfig
> > @@ -956,6 +956,7 @@ comment "Platform RTC drivers"
> >  config RTC_DRV_CMOS
> >  	tristate "PC-style 'CMOS'"
> >  	depends on X86 || ARM || PPC || MIPS || SPARC64
> > +	depends on HAS_IOPORT
> 
>  NAK, this hasn't addressed my input for v2.  Arnd also followed up with 
> similar observations with v3.
> 
>   Maciej

Ah sorry about that, I had marked the mail as TODO but going over it
missed the proposed fix. Changed this to "depends on HAS_IOPORT ||
ARCH_DECSTATION" for v5.
Maciej W. Rozycki May 17, 2023, 9:53 a.m. UTC | #3
On Wed, 17 May 2023, Niklas Schnelle wrote:

> >  NAK, this hasn't addressed my input for v2.  Arnd also followed up with 
> > similar observations with v3.
> 
> Ah sorry about that, I had marked the mail as TODO but going over it
> missed the proposed fix. Changed this to "depends on HAS_IOPORT ||
> ARCH_DECSTATION" for v5.

 It has to be MACH_DECSTATION actually, cf. arch/mips/Kconfig.  Thanks.

  Maciej
diff mbox series

Patch

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 753872408615..9ae082b14c44 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -956,6 +956,7 @@  comment "Platform RTC drivers"
 config RTC_DRV_CMOS
 	tristate "PC-style 'CMOS'"
 	depends on X86 || ARM || PPC || MIPS || SPARC64
+	depends on HAS_IOPORT
 	default y if X86
 	select RTC_MC146818_LIB
 	help
@@ -976,6 +977,7 @@  config RTC_DRV_CMOS
 config RTC_DRV_ALPHA
 	bool "Alpha PC-style CMOS"
 	depends on ALPHA
+	depends on HAS_IOPORT
 	select RTC_MC146818_LIB
 	default y
 	help
@@ -1193,7 +1195,7 @@  config RTC_DRV_MSM6242
 
 config RTC_DRV_BQ4802
 	tristate "TI BQ4802"
-	depends on HAS_IOMEM
+	depends on HAS_IOMEM && HAS_IOPORT
 	help
 	  If you say Y here you will get support for the TI
 	  BQ4802 RTC chip.