[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdac8dGKSEmc-HpgooJefrDtiKK+_A1Mv7AJM8yQV9UY-w@mail.gmail.com>
Date: Sun, 1 May 2022 23:41:04 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Arnd Bergmann <arnd@...nel.org>
Cc: robert.jarzmik@...e.fr, linux-arm-kernel@...ts.infradead.org,
Arnd Bergmann <arnd@...db.de>, Daniel Mack <daniel@...que.org>,
Haojian Zhuang <haojian.zhuang@...il.com>,
Marek Vasut <marek.vasut@...il.com>,
Philipp Zabel <philipp.zabel@...il.com>,
Lubomir Rintel <lkundrak@...sk>,
Paul Parsons <lost.distance@...oo.com>,
Tomas Cech <sleep_walker@...e.com>,
Sergey Lapin <slapin@...fans.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Viresh Kumar <viresh.kumar@...aro.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
Dominik Brodowski <linux@...inikbrodowski.net>,
Helge Deller <deller@....de>, Mark Brown <broonie@...nel.org>,
linux-kernel@...r.kernel.org, linux-mips@...r.kernel.org,
linux-ide@...r.kernel.org, linux-clk@...r.kernel.org,
linux-pm@...r.kernel.org, linux-input@...r.kernel.org,
patches@...nsource.cirrus.com, linux-leds@...r.kernel.org,
linux-mmc@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-rtc@...r.kernel.org, linux-usb@...r.kernel.org,
linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
alsa-devel@...a-project.org
Subject: Re: [PATCH 18/48] ARM: pxa: hx4700: use gpio descriptors for audio
On Tue, Apr 19, 2022 at 6:41 PM Arnd Bergmann <arnd@...nel.org> wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> The audio driver should not use a hardwired gpio number
> from the header. Change it to use a lookup table.
>
> Cc: Philipp Zabel <philipp.zabel@...il.com>
> Cc: Paul Parsons <lost.distance@...oo.com>
> Acked-by: Mark Brown <broonie@...nel.org>
> Acked-by: Robert Jarzmik <robert.jarzmik@...e.fr>
> Cc: alsa-devel@...a-project.org
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
(...)
> +static struct gpiod_lookup_table hx4700_audio_gpio_table = {
> + .dev_id = "hx4700-audio",
> + .table = {
> + GPIO_LOOKUP("gpio-pxa", GPIO75_HX4700_EARPHONE_nDET,
> + "earphone-ndet", GPIO_ACTIVE_HIGH),
This looks wrong. The n in nDET in the end of the name of the GPIO line
means active low does it not?
What I usually do when I see this is to properly set it to
GPIO_ACTIVE_LOW in the descriptor table, then invert the logic
where it's getting used.
Also rename to earphone-det instead of -ndet
> + GPIO_LOOKUP("gpio-pxa", GPIO92_HX4700_HP_DRIVER,
> + "hp-driver", GPIO_ACTIVE_HIGH),
> + GPIO_LOOKUP("gpio-pxa", GPIO107_HX4700_SPK_nSD,
> + "spk-nsd", GPIO_ACTIVE_HIGH),
Same here. Rename spk-sd
Yours,
Linus Walleij
Powered by blists - more mailing lists