Re: [PATCH] gpio: spacemit-k1: Use PDR for pin direction, not SDR/CDR
From: Bartosz Golaszewski
Date: Wed Jan 28 2026 - 04:41:58 EST
On Tue, 27 Jan 2026 10:58:49 +0800, Vivian Wang wrote:
> On the SpacemiT GPIO controller, the direction control register PDR is
> readable and writable [1]. Therefore, implement direction control by
> using PDR as dirout, and don't mark it as unreadable.
>
> The original implementation, using SDR as dirout and CDR as dirin, is
> not actually a supported configuration by gpio-mmio. The hardware
> supports changing the direction of some pins atomically by writing a
> value with the corresponding bits set to SDR (set as output) or to CDR
> (set as input). However, gpio-mmio does not actually handle this.
>
> [...]
Applied, thanks!
[1/1] gpio: spacemit-k1: Use PDR for pin direction, not SDR/CDR
https://git.kernel.org/brgl/c/aa7e37fd770bafaaf856ab77735296955b93e377
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>