RE: [PATCH v2 1/4] ASoC: rt5660: Add ACPI support
From: Bard Liao
Date: Thu Jan 12 2017 - 21:54:40 EST
> -----Original Message-----
> From: Shrirang Bagul [mailto:shrirang.bagul@xxxxxxxxxxxxx]
> Sent: Thursday, January 12, 2017 8:01 PM
> To: alsa-devel@xxxxxxxxxxxxxxxx
> Cc: linux-kernel@xxxxxxxxxxxxxxx; Bard Liao; Oder Chiou; Liam Girdwood; Mark
> Brown; Jaroslav Kysela; Takashi Iwai
> Subject: [PATCH v2 1/4] ASoC: rt5660: Add ACPI support
>
> On Dell IoT Gateways, RT5660 codec is available with ACPI ID 10EC3277.
> Also, GPIO's are only available by index, so we register mappings to allow
> machine drivers to access them by name.
>
> Signed-off-by: Shrirang Bagul <shrirang.bagul@xxxxxxxxxxxxx>
> ---
> +static const struct acpi_gpio_params audio_wake_intr_gpio =
> { RT5660_GPIO_WAKE_INTR, 0, false };
> +static const struct acpi_gpio_params lineout_mute_gpio =
> { RT5660_GPIO_LINEOUT_MUTE, 0, true };
> +
> +static const struct acpi_gpio_mapping byt_rt5660_gpios[] = {
> + { "audio-wake-intr-gpios", &audio_wake_intr_gpio, 1 },
> + { "lineout-mute-gpios", &lineout_mute_gpio, 1 },
> + { NULL },
> +};
> +
I am thinking if it is more suitable to move the gpio params to
machine driver? They are not codec's gpios and are only used
by machine driver.
> --
> 2.9.3