From: Srinivas Kandagatla <srini@kernel.org>
To: Janne Grunau <j@jannau.net>
Cc: fnkl.kernel@gmail.com, Sven Peter <sven@svenpeter.dev>,
Alyssa Rosenzweig <alyssa@rosenzweig.io>,
Neal Gompa <neal@gompa.dev>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Hector Martin <marcan@marcan.st>
Subject: Re: [PATCH 2/3] nvmem: Add spmi-nvmem driver
Date: Thu, 17 Apr 2025 15:50:23 +0100 [thread overview]
Message-ID: <20250417145023.GA34166@srini-hackbase> (raw)
In-Reply-To: <20250417143053.GD8400@robin.jannau.net>
On Thu, Apr 17, 2025 at 04:30:53PM +0200, Janne Grunau wrote:
> On Thu, Apr 17, 2025 at 02:34:37PM +0100, Srinivas Kandagatla wrote:
> >
> >
> > On 15/04/2025 22:52, Sasha Finkelstein via B4 Relay wrote:
> > > From: Hector Martin <marcan@marcan.st>
> > >
> > > This driver exposes a SPMI device as an NVMEM device.
> > > It is intended to be used with e.g. PMUs/PMICs that are used to
> > > hold power management configuration, such as used on Apple Silicon
> > > Macs.
> > >
> > > Signed-off-by: Hector Martin <marcan@marcan.st>
> > > Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
> > > ---
> > > MAINTAINERS | 1 +
> > > drivers/nvmem/Kconfig | 14 +++++++++++
> > > drivers/nvmem/Makefile | 2 ++
> > > drivers/nvmem/spmi-nvmem.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++
> > > 4 files changed, 79 insertions(+)
> > >
> > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > index e7b2d0df81b387ba5398957131971588dc7b89dc..63c12f901aed1f3e6de8227d6db34af1bd046fe6 100644
> > > --- a/MAINTAINERS
> > > +++ b/MAINTAINERS
> > > @@ -2298,6 +2298,7 @@ F: drivers/iommu/io-pgtable-dart.c
> > > F: drivers/irqchip/irq-apple-aic.c
> > > F: drivers/nvme/host/apple.c
> > > F: drivers/nvmem/apple-efuses.c
> > > +F: drivers/nvmem/spmi-nvmem.c
> > > F: drivers/pinctrl/pinctrl-apple-gpio.c
> > > F: drivers/pwm/pwm-apple.c
> > > F: drivers/soc/apple/*
> > > diff --git a/drivers/nvmem/Kconfig b/drivers/nvmem/Kconfig
> > > index 8671b7c974b933e147154bb40b5d41b5730518d2..9ec907d8aa6ef7df0ea45cc35e92d8239d2705ee 100644
> > > --- a/drivers/nvmem/Kconfig
> > > +++ b/drivers/nvmem/Kconfig
> > > @@ -310,6 +310,20 @@ config NVMEM_SNVS_LPGPR
> > > This driver can also be built as a module. If so, the module
> > > will be called nvmem-snvs-lpgpr.
> > >
> > > +config NVMEM_SPMI
> > > + tristate "Generic SPMI NVMEM"
> > > + default ARCH_APPLE
> > Why default is set to ARCH_APPLE?
> >
> > This will endup with y in arm64 defconfig, means increasing the size of
> > kernel.
> >
> > should it be:
> >
> > depends on ARCH_APPLE || COMPILE_TEST
>
> I don't think it should depend on ARCH_APPLE. There is nothing
> ARCH_APPLE specific in the driver or dt-bindings even apple platforms
> are currently only user.
irrespective of this is generic or not none of the drivers should have
default set to y.
>
> `default m if ARCH_APPLE` might an alternative but in this specific case
> the driver which will uses the nvmem cells should just select it. So I
> would remove the default.
remove the default, and let it be selected in defconfig as m as
required, like any other drivers.
--srini
>
> Janne
next prev parent reply other threads:[~2025-04-17 15:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 21:52 [PATCH 0/3] Generic SPMI NVMEM cell driver Sasha Finkelstein via B4 Relay
2025-04-15 21:52 ` [PATCH 1/3] dt-bindings: spmi: Add generic SPMI NVMEM Sasha Finkelstein via B4 Relay
2025-04-16 0:18 ` Nick Chan
2025-04-16 7:39 ` Sasha Finkelstein
2025-04-15 21:52 ` [PATCH 2/3] nvmem: Add spmi-nvmem driver Sasha Finkelstein via B4 Relay
2025-04-16 1:40 ` Neal Gompa
2025-04-16 18:09 ` Alyssa Rosenzweig
2025-04-17 13:34 ` Srinivas Kandagatla
2025-04-17 13:49 ` Alyssa Rosenzweig
2025-04-17 13:57 ` Srinivas Kandagatla
2025-04-17 13:59 ` Alyssa Rosenzweig
2025-04-17 14:27 ` Sasha Finkelstein
2025-04-17 14:30 ` Janne Grunau
2025-04-17 14:50 ` Srinivas Kandagatla [this message]
2025-04-15 21:52 ` [PATCH 3/3] arm64: dts: apple: Add PMU NVMEM Sasha Finkelstein via B4 Relay
2025-04-16 0:28 ` Nick Chan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250417145023.GA34166@srini-hackbase \
--to=srini@kernel.org \
--cc=alyssa@rosenzweig.io \
--cc=asahi@lists.linux.dev \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fnkl.kernel@gmail.com \
--cc=j@jannau.net \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcan@marcan.st \
--cc=neal@gompa.dev \
--cc=robh@kernel.org \
--cc=sven@svenpeter.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).