Re: [RFC PATCH 4/5] pinctrl: Support ROHM BD79124 pinmux / GPO

From: Matti Vaittinen
Date: Thu Feb 06 2025 - 05:05:43 EST


Hi Linus,

On 06/02/2025 11:39, Linus Walleij wrote:
On Wed, Feb 5, 2025 at 2:40 PM Matti Vaittinen <mazziesaccount@xxxxxxxxx> wrote:
On 31/01/2025 15:38, Matti Vaittinen wrote:
The ROHM BD79124 is a 12-bit, 8-channel, SAR ADC. The AIN pins can be
used as ADC inputs, or as general purpose outputs.

Support changing pin function (GPO / ADC) and the gpo output control.

Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
---

NOTE: This patch is not properly tested. More thorough testing is to be
done prior v2 if this pinmux approach makes sense.

Just a note to reviewers - I dropped the pinmux from v2. No need to
review this any further.

Why? Gave up on the idea or want to pursue it later?

I took the (simpler) approach suggested by Jonathan. Eg, I just required all the ADC pins (channels) to be presented in the device-tree - and then treat rest of the pins as GPO. Hence, the pinmux driver is not really needed as the mux registers are initialized at the ADC driver probe when the DT is parsed. (I did also drop the MFD and bundled the GPO control in ADC driver).

Yours,
-- Matti