Re: [PATCH] Input: gpio_decoder - fix bit order reversal introduced by bitmap conversion

Andy Shevchenko <[email protected]>
Newsgroups org.kernel.vger.linux-input,org.kernel.vger.linux-kernel,org.kernel.vger.stable
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Mon, Aug 17, 2026 at 01:50:27PM +0200, Esben Haabendal wrote:
> The switch from a manual loop to gpiod_get_array_value_cansleep() +
> bitmap_read() inadvertently reversed the bit order of the decoded value.
> The original loop treated GPIO[0] as MSB by shifting left on each
> iteration, but bitmap_read() returns GPIO[0] at bit 0 (LSB).
> 
> The previous bit order was correct according to device-tree bindings, and
> the change broke existing users.

Oops, thanks for catching this!
Reviewed-by: Andy Shevchenko <[email protected]>

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.