Re: [PATCH v3 09/10] gpio: bd73800: Support ROHM BD73800 PMIC GPIOs
From: Matti Vaittinen
Date: Thu Sep 03 2026 - 01:03:31 EST
On 02/09/2026 15:39, Linus Walleij wrote:
Hi Matti,
thanks for your patch!
On Wed, Sep 2, 2026 at 1:07 PM Matti Vaittinen
<matti.vaittinen@xxxxxxxxx> wrote:
From: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
The ROHM BD73800 PMIC has 4 pins (named GPIO1, CLKOUT, FAULT_B and
EXTEN_OUT) which might have been set to operate as a GPI or GPO when OTP
(One Time Programmable memory) is written at device manufacturing.
Support the GPI/GPO use-case via GPIO framework.
The default OTP for these pins is to not use any of them as GPI or GPO.
(The GPIO1 defaults as an ADC input regardless the naming). Hence the
driver assumes none of these pins is a GPI/GPO unless explicitly pointed
as GPI or GPO via device tree.
Furthermore, pin's direction can't be changed after OTP configuration is
done. Also the default drive type for a GPO (CMOS / Open Drain) is set
by the OTP configuration. The BD73800 has a set of undocumented test
registers which should allow changing the drive type. Access to the test
register area or the test registers aren't documented and so this driver
does not support configuring the drive type even though it might be
doable.
Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
Pretty neat with gpio-regmap isn't it? :)
Yep. I like the added flexibility now that it has got those callbacks a driver can register... ;)
Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
Thanks!
Yours,
-- Matti
--
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~