Re: [PATCH 5/6] gpio: ad7768: Add AD7768 GPIO auxiliary driver
Linus Walleij <[email protected]>
| Newsgroups | org.kernel.vger.linux-gpio,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-doc,org.kernel.vger.linux-iio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAD++jLnwV7ib82c1cvf8V6xWYjUpqJb+6w2We+NXhU05+B3RxQ@mail.gmail.com> |
On Tue, Jul 14, 2026 at 1:03 PM Janani Sunil <[email protected]> wrote: > gpio-regmap does not naturally model the AD7768's direction dependent readback behavior. > On this device, GPIO Write data (0x0F) holds the latched output values and the GPIO > Read Data (0x10) reads the logic input level only when the pins are configured as inputs. > Using the generic gpio-regmap would always read 0x10 including output GPIOs. > The custom implementation preserves the device specific behavior. The memory-mapped gpio-generic has this flag: #define GPIO_GENERIC_READ_OUTPUT_REG_SET BIT(4) /* reg_set stores output value */ Just implement the same logic flag for gpio-regmap and the problem is solved? It's such a minor improvement to gpio-regmap that I don't think it's much to ask. Yours, Linus Walleij