Re: [PATCH RESEND] gpio: pcf857x: implement get_direction()

Bartosz Golaszewski <[email protected]>
Newsgroups org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, 25 Aug 2026 04:15:57 +0000, Tapio Reijonen wrote:
> The GPIO core warns (and taints the kernel) when a gpiochip lacks
> .get_direction() and a consumer queries a line's direction, for example
> via /sys/kernel/debug/gpio. pcf857x provided direction_input/output but
> no get_direction.
> 
> These quasi-bidirectional expanders cannot report direction in hardware,
> and the 'out' software latch alone is ambiguous - a released (input)
> line and an output driven high both read back as a set bit. Track the
> direction explicitly in a 'dir' latch updated by the direction_input(),
> direction_output() and set_multiple() paths, and return it from
> get_direction(). Initialise it from the same reset state as 'out':
> released lines are inputs, lines flagged in the power-on latch are
> driven-low outputs.
> 
> [...]

Applied, thanks!

[1/1] gpio: pcf857x: implement get_direction()
      https://git.kernel.org/brgl/c/ed14364ae8c310cc3f3f649ffcbc7f82befe1579

Best regards,
-- 
Bartosz Golaszewski <[email protected]>
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.