From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Linus Walleij <linusw@kernel.org>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>,
Matti Vaittinen <matti.vaittinen@linux.dev>,
Lee Jones <lee@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Brian Masney <bmasney@redhat.com>,
Bartosz Golaszewski <brgl@kernel.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
mfd@lists.linux.dev, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-rtc@vger.kernel.org
Subject: Re: [PATCH v2 09/10] gpio: bd73800: Support ROHM BD73800 PMIC GPIOs
Date: Thu, 13 Aug 2026 15:55:12 +0300 [thread overview]
Message-ID: <12f70e0f-5cef-4035-9b44-e2cb252932cf@gmail.com> (raw)
In-Reply-To: <f5c241a2-00a8-4a32-bad5-3c89fb204b25@gmail.com>
On 13/08/2026 11:34, Matti Vaittinen wrote:
> On 07/08/2026 23:29, Linus Walleij wrote:
...
>> * @fixed_direction_output:
>> * (Optional) Bitmap representing the fixed
>> direction of
>> * the GPIO lines. Useful when there are GPIO
>> lines with a
>> * fixed direction mixed together in the same
>> register.
>>
>> It seems you can set up the fixed_direction_output mask from OTP
>> and just use the library, right?
>
> The BD73800 uses different registers for 'out' and 'in'. So there aren't
> really "GPIO lines with a fixed direction mixed together in the same
> register".
...
> I think the BD73800 can indeed use the gpio-regmap, by keeping the pin
> direction information in private data and adding a custom xlate, which
> errors out if get is requested for output pin, or set is requested for
> input. I am not sure how much of an improvement it is compared to the
> patch v2, but I'll give it a shot :) I believe the new -rc1 isn't that
> far away, and hopefully the gpio-regmap -stuff from the next will be in
> it together with the regulator stuff bindings depended.
Gah. Please, ignore the erroring-out part. I don't know where I picked
the idea that the hardware would always return '0' when reading the
GPO_OUT register. I think this might have been something I have
experienced on a setup where the pin was _not_ set to GPO by OTP.
Furthermore, the xlate will never get called if user tries to set value
for a GPI pin.
Anyways, implementing xlate with op-check allows me to support this
PMIC, even though the register to read for pin status depends on OTP.
So yes, v3 should be able to use gpio-regmap. I will probably delay
sending it until v7.3-rc1 is out so I get (all?) dependencies in.
Yours,
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
next prev parent reply other threads:[~2026-08-13 12:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 10:19 [PATCH v2 00/10] Support ROHM BD73800 Matti Vaittinen
2026-08-04 10:20 ` [PATCH v2 01/10] dt-bindings: mfd: common ROHM PMIC properties Matti Vaittinen
2026-08-07 20:23 ` Linus Walleij
2026-08-10 5:41 ` Matti Vaittinen
2026-08-12 1:42 ` Rob Herring (Arm)
2026-08-04 10:20 ` [PATCH v2 02/10] dt-bindings: rohm,bd*: Ref common ROHM bindings Matti Vaittinen
2026-08-12 1:43 ` Rob Herring (Arm)
2026-08-04 10:21 ` [PATCH v2 03/10] dt-bindings: regulator: ROHM BD73800 regulators Matti Vaittinen
2026-08-04 12:31 ` Rob Herring (Arm)
2026-08-04 10:21 ` [PATCH v2 04/10] dt-bindings: mfd: ROHM BD73800 PMIC Matti Vaittinen
2026-08-04 12:31 ` Rob Herring (Arm)
2026-08-04 10:21 ` [PATCH v2 05/10] mfd: Support for ROHM BD73800 PMIC core Matti Vaittinen
2026-08-13 10:59 ` Lee Jones
2026-08-04 10:22 ` [PATCH v2 06/10] rtc: bd70528: Support RTC on ROHM BD73800 Matti Vaittinen
2026-08-04 10:22 ` [PATCH v2 07/10] regulator: bd71828: Support " Matti Vaittinen
2026-08-04 16:56 ` Mark Brown
2026-08-04 10:23 ` [PATCH v2 08/10] clk: bd718x7: " Matti Vaittinen
2026-08-04 10:23 ` [PATCH v2 09/10] gpio: bd73800: Support ROHM BD73800 PMIC GPIOs Matti Vaittinen
2026-08-07 20:29 ` Linus Walleij
2026-08-10 5:47 ` Matti Vaittinen
2026-08-13 8:34 ` Matti Vaittinen
2026-08-13 12:55 ` Matti Vaittinen [this message]
2026-08-04 10:23 ` [PATCH v2 10/10] MAINTAINERS: Add ROHM BD73800 PMIC files Matti Vaittinen
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=12f70e0f-5cef-4035-9b44-e2cb252932cf@gmail.com \
--to=mazziesaccount@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=bmasney@redhat.com \
--cc=brgl@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linusw@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=matti.vaittinen@fi.rohmeurope.com \
--cc=matti.vaittinen@linux.dev \
--cc=mfd@lists.linux.dev \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.