[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a383dbc8-5d14-4654-933d-5dfa73a23b12@riscstar.com>
Date: Sun, 11 Jan 2026 13:55:59 -0600
From: Alex Elder <elder@...cstar.com>
To: Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: Troy Mitchell <troy.mitchell@...ux.spacemit.com>,
Lee Jones <lee@...nel.org>, Yixun Lan <dlan@...too.org>,
Andi Shyti <andi.shyti@...nel.org>, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
linux-riscv@...ts.infradead.org, spacemit@...ts.linux.dev,
linux-i2c@...r.kernel.org, linux-rtc@...r.kernel.org
Subject: Re: [PATCH v4 3/3] rtc: spacemit: default module when MFD_SPACEMIT_P1
is enabled
On 1/9/26 4:36 PM, Alexandre Belloni wrote:
>> The purpose is to make the driver a module (not built-in)
>> when "defconfig" is used (without the need for any Kconfig
>> fragments to unselect things).
>>
>>
>> In arch/riscv/configs/defconfig, we have this:
>> CONFIG_ARCH_SPACEMIT=y
>>
>> In drivers/mfd/Kconfig b/drivers/mfd/Kconfig, we have this
>> (added by patch 2 in this series):
>> config MFD_SPACEMIT_P1
>> default m if ARCH_SPACEMIT
>>
>> So when using defconfig (alone), MFD_SPACEMIT_P1 is set to m,
>> to benefit non-SpacemiT RISC-V platforms.
>>
>> This patch is trying to do the same thing for the RTC,
>> i.e. having RTC_DRV_SPACEMIT_P1 be defined as a module
>> by default.
>>
>> I think you understand.
> I'm sorry, I must be dumb but I don't understand. The current behaviour
I think I'm the dumb one. I think I finally understand your
point.
> is that when MFD_SPACEMIT_P1 is m, then the default value for
> RTC_DRV_SPACEMIT_P1 will be m. Since patch 2 makes it exactly that way
> (MFD_SPACEMIT_P set to m), I don't get why it is necessary to mess with
> the default of RTC_DRV_SPACEMIT_P1.
Your point is that patch has no real effect, at least not
on the scenario I was talking about.
I.e., I was saying this mattered for using defconfig alone.
But, as you point out, using defconfig alone gives us:
ARCH_SPACMIT=y (in defconfig)
MFD_SPACEMIT_P1=m (from patch 2)
And then, *without* this patch:
RTC_DRV_SPACEMIT_P1=MFD_SPACEMIT_P1
meaning
RTC_DRV_SPACEMIT_P1=m
And therefore there's no need for this patch to set the
default to m rather than MFD_SPACEMIT_P1.
> The current default behaviour of RTC_DRV_SPACEMIT_P1 seems to be the
> correct one and the proper fix is then patch 2.
Yes, now I understand. I'm sorry about my confusion.
-Alex
Powered by blists - more mailing lists