From: Guenter Roeck <linux@roeck-us.net>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Saravanan Sekar <saravanan@linumiz.com>,
sravanhome@gmail.com, lgirdwood@gmail.com, broonie@kernel.org,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
conor+dt@kernel.org, jdelvare@suse.com,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-hwmon@vger.kernel.org
Subject: Re: [PATCH v3 2/3] regulator: dt-bindings: Add mps,mpq2286 power-management IC
Date: Sun, 8 Oct 2023 06:52:14 -0700 [thread overview]
Message-ID: <154920ff-ad72-43fe-9631-e65ed918a9bb@roeck-us.net> (raw)
In-Reply-To: <1ce9d59e-0938-4448-8279-b8c6e522b26a@linaro.org>
On Sun, Oct 08, 2023 at 12:40:29PM +0200, Krzysztof Kozlowski wrote:
> On 08/10/2023 03:20, Guenter Roeck wrote:
> > On Sat, Oct 07, 2023 at 10:28:02PM +0530, Saravanan Sekar wrote:
> >> Document mpq2286 power-management IC. Instead of simple 'buck', 'buck0' is
> >> used to keep the driver common which handles multiple regulators.
> >
> > Sorry for the maybe dumb question, but where can I find the driver
> > depencency on buck naming ?
>
> I guess it is because:
> PMBUS_REGULATOR_STEP("buck", 0, MPQ7932_N_VOLTAGES,
> creates regulator name as buck+id (so buck0).
>
Ah, good point. Problem here is that this is already kind of common,
even though the use of "buckX" isn't. Look for "vout0", or
'PMBUS_REGULATOR("vout", 0)'. Apparently so far no one took offence
if a regulator was named "vout0" even if "vout1" didn't exist.
I don't really have a good solution right now, but I guess we'll need
a second set of macros for the single-regulator case, or maybe generate
struct regulator_desc arrays using a function. I'll have to explore
options.
Please let me know how you want the subsystem to handle existing
single-channel regulators with numbered regulator name.
Saravanan - for this driver please just declare a local driver-specific
variant of the PMBUS_REGULATOR_STEP() macro which doesn't use indexing,
use it to initialise a second regulators_desc array, and use that second
array for mpq2286. That is a bit messy, but acceptable for now until
there is a more generic solution (unless of course you have an idea for
one and want to implement it, but that is not a requirement).
Thanks,
Guenter
next prev parent reply other threads:[~2023-10-08 13:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 16:58 [PATCH v3 0/3] Add support for mpq2286 PMIC IC Saravanan Sekar
2023-10-07 16:58 ` [PATCH v3 1/3] hwmon: (pmbus/mpq7932) Get page count based on chip info Saravanan Sekar
2023-10-07 16:58 ` [PATCH v3 2/3] regulator: dt-bindings: Add mps,mpq2286 power-management IC Saravanan Sekar
2023-10-08 1:20 ` Guenter Roeck
2023-10-08 10:40 ` Krzysztof Kozlowski
2023-10-08 13:52 ` Guenter Roeck [this message]
2023-10-11 6:32 ` Saravanan Sekar
2023-10-11 14:50 ` Guenter Roeck
2023-10-07 16:58 ` [PATCH v3 3/3] hwmon: (pmbus/mpq2286) Add a support for mpq2286 Power Management IC Saravanan Sekar
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=154920ff-ad72-43fe-9631-e65ed918a9bb@roeck-us.net \
--to=linux@roeck-us.net \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=saravanan@linumiz.com \
--cc=sravanhome@gmail.com \
/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
all inboxes | Powered by JetHome®