lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o8y0lgs1.fsf@belgarion.home>
Date:   Mon, 28 Oct 2019 22:08:30 +0100
From:   Robert Jarzmik <robert.jarzmik@...e.fr>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Daniel Mack <daniel@...que.org>,
        Haojian Zhuang <haojian.zhuang@...il.com>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>,
        Mark Brown <broonie@...nel.org>, alsa-devel@...a-project.org
Subject: Re: [PATCH 21/46] ARM: pxa: spitz: use gpio descriptors for audio

Arnd Bergmann <arnd@...db.de> writes:

> The audio driver should not use a hardwired gpio number
> from the header. Change it to use a lookup table.
>
> Cc: Mark Brown <broonie@...nel.org>
> Cc: alsa-devel@...a-project.org
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  arch/arm/mach-pxa/spitz.c                    | 33 ++++++++++-
>  arch/arm/mach-pxa/{include/mach => }/spitz.h |  2 +-
>  arch/arm/mach-pxa/spitz_pm.c                 |  2 +-
>  sound/soc/pxa/spitz.c                        | 58 ++++++++------------
>  4 files changed, 57 insertions(+), 38 deletions(-)
>  rename arch/arm/mach-pxa/{include/mach => }/spitz.h (99%)
>
> diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
> index a4fdc399d152..6028fd83c44d 100644
> --- a/arch/arm/mach-pxa/spitz.c
> +++ b/arch/arm/mach-pxa/spitz.c
> @@ -44,7 +44,7 @@
>  #include <linux/platform_data/mmc-pxamci.h>
>  #include <linux/platform_data/usb-ohci-pxa27x.h>
>  #include <linux/platform_data/video-pxafb.h>
> -#include <mach/spitz.h>
> +#include "spitz.h"
>  #include "sharpsl_pm.h"
>  #include <mach/smemc.h>
>  
> @@ -948,11 +948,42 @@ static void __init spitz_i2c_init(void)
>  static inline void spitz_i2c_init(void) {}
>  #endif
>  
> +static struct gpiod_lookup_table spitz_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("sharp-scoop.1", SPITZ_GPIO_MIC_BIAS - SPITZ_SCP2_GPIO_BASE,
> +			    "mic", GPIO_ACTIVE_HIGH),
> +		{ },
> +	},
> +};
> +
> +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 ?

Cheers.

--
Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ