mbox series

[0/3] ARM: Modernize the PXA Spitz a bit

Message ID 20240430-gpio-leds-miscarm-v1-0-9c94d7711f6c@linaro.org
Headers show
Series ARM: Modernize the PXA Spitz a bit | expand

Message

Linus Walleij April 30, 2024, 7:03 a.m. UTC
A few ARM machines still use global GPIO numbers to define
GPIOs, convert them all to use GPIO descriptors instead.

This machine uses some input devices so we go the extra mile
to use software nodes as desired by the input maintainer.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
Linus Walleij (3):
      ARM: spitz: Convert Spitz board to GPIO descriptors for LEDs
      dt-bindings: ads7846: Add hsync-gpios
      ARM: spitz: Use software nodes for the ADS7846 touchscreen

 .../bindings/input/touchscreen/ads7846.txt         |  1 +
 arch/arm/mach-pxa/devices.c                        | 16 ++++
 arch/arm/mach-pxa/spitz.c                          | 89 ++++++++++++----------
 drivers/input/touchscreen/ads7846.c                | 31 +++++---
 include/linux/spi/ads7846.h                        |  1 -
 include/linux/spi/pxa2xx_spi.h                     |  2 +
 6 files changed, 91 insertions(+), 49 deletions(-)
---
base-commit: 4cece764965020c22cff7665b18a012006359095
change-id: 20240424-gpio-leds-miscarm-d983c739001d

Best regards,

Comments

Linus Walleij May 2, 2024, 8:13 a.m. UTC | #1
On Tue, Apr 30, 2024 at 9:04 AM Linus Walleij <linus.walleij@linaro.org> wrote:

> Convert the Spitz to use software nodes for SPI CS and the
> ADS7846 touchscreen following the pattern used in the TI
> platforms.
>
> The Spitz is the only user of the wait_for_sync() callback in
> the platform data, so define that this is a separate GPIO
> in the device tree bindings (previous patch) and handle this
> directly inside the ADS7846 driver instead.
>
> Add some infrastructure to the PXA boardfile common code to
> handle software nodes attached to the SPI bus instead of
> platform data.
>
> The SPI core will investigate the numner of GPIO handles to
> figure out the number of chipselects used on the platform, so
> no explicit encoding of the number of the number of chipselects
> is needed.
>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Andy's patch series makes the Spitz SPI much cleaner to begin
with so I will hold this off and rebase on top of Andy's stuff once
that is in.

Yours,
Linus Walleij
Dmitry Torokhov June 21, 2024, 10:26 p.m. UTC | #2
On Thu, May 02, 2024 at 10:13:44AM +0200, Linus Walleij wrote:
> On Tue, Apr 30, 2024 at 9:04 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> 
> > Convert the Spitz to use software nodes for SPI CS and the
> > ADS7846 touchscreen following the pattern used in the TI
> > platforms.
> >
> > The Spitz is the only user of the wait_for_sync() callback in
> > the platform data, so define that this is a separate GPIO
> > in the device tree bindings (previous patch) and handle this
> > directly inside the ADS7846 driver instead.
> >
> > Add some infrastructure to the PXA boardfile common code to
> > handle software nodes attached to the SPI bus instead of
> > platform data.
> >
> > The SPI core will investigate the numner of GPIO handles to
> > figure out the number of chipselects used on the platform, so
> > no explicit encoding of the number of the number of chipselects
> > is needed.
> >
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> 
> Andy's patch series makes the Spitz SPI much cleaner to begin
> with so I will hold this off and rebase on top of Andy's stuff once
> that is in.

I dropped spitz parts from the patch leaving only the new hsync gpio
handling (and keeping the old legacy way of doing hsync) and applied.

There's an immutable branch ib/ads6746-hsync in my tree to help us
iterate on spitz changes.

Thanks.