[PATCH 21/46] ARM: pxa: spitz: use gpio descriptors for audio

Arnd Bergmann arnd at arndb.de
Tue Apr 19 08:40:21 PDT 2022


On Mon, Oct 28, 2019 at 10:08 PM Robert Jarzmik <robert.jarzmik at free.fr> wrote:

> > +static struct gpiod_lookup_table akita_audio_gpio_table = {
> > +     .dev_id = "spitz-audio",
> > +     .table = {
> > +             GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_L - SPITZ_SCP_GPIO_BASE,
> > +                         "mute-l", GPIO_ACTIVE_HIGH),
> > +             GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R - SPITZ_SCP_GPIO_BASE,
> > +                         "mute-r", GPIO_ACTIVE_HIGH),
> > +             GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_MIC_BIAS - AKITA_IOEXP_GPIO_BASE,
> > +                         "mic", GPIO_ACTIVE_HIGH),
> This last one looks a bit dubious, as it looks like a gpio on a gpio expander,
> could you cross-check that "gpio-pxa" shouldn't be an I2C expander gpio please ?

I'm revisiting this older patch series now, this was clearly a mistake
in my original
version, changed it now to

@@ -982,7 +982,7 @@ static struct gpiod_lookup_table akita_audio_gpio_table = {
                            "mute-l", GPIO_ACTIVE_HIGH),
                GPIO_LOOKUP("sharp-scoop.0", SPITZ_GPIO_MUTE_R -
SPITZ_SCP_GPIO_BASE,
                            "mute-r", GPIO_ACTIVE_HIGH),
-               GPIO_LOOKUP("gpio-pxa", AKITA_GPIO_MIC_BIAS -
AKITA_IOEXP_GPIO_BASE,
+               GPIO_LOOKUP("i2c-max7310", AKITA_GPIO_MIC_BIAS -
AKITA_IOEXP_GPIO_BASE,
                            "mic", GPIO_ACTIVE_HIGH),
                { },
        },

I'm not 100% sure this is the correct name, as I don't fully
understand how i2c device
names are constructed. I see that Linus added a device name in commit
32d1544880aa ("ARM: pxa: Add gpio descriptor lookup tables for MMC CD/WP"),
and I guess I could do the same here, but I think that was only needed
to disambiguate
two instances of the same device in zylonite, which is not needed for spitz.

       Arnd



More information about the linux-arm-kernel mailing list