RE: [PATCH v7 5/9] gpio: regmap: Add gpio_regmap_operation to extend reg_mask_xlate callback
From: Yu-Chun Lin [林祐君]
Date: Fri Jul 24 2026 - 01:48:31 EST
> Hi,
>
> On Thu Jul 23, 2026 at 1:14 PM CEST, Yu-Chun Lin [林祐君] wrote:
>> Regarding the hardware, this controller indeed has dedicated and
>> separate bits for IN, OUT, and DIR. If configured as an output,
>> reading the IN bit does not reflect the actual state, so we must check
>> the DIR bit first to know which bit to read.
>
> Just out of curiosity, the out bit is also the control bit which
> will set the gpio line state, correct? IOW, you are reading just the
> bit you've set before and there is no way to read the real line state.
>
> -michael
In our current implementation, when configured as an output, we only read
back the state we set.
Best Regards,
Yu-Chun