mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Maurizio Casciano <mauriziocasciano7@gmail.com>
Cc: Hans de Goede <hansg@kernel.org>,
	 Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>,
	platform-driver-x86@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] platform/x86: x86-android-tablets: Add Yoga Book audio GPIOs
Date: Sat, 29 Aug 2026 06:06:10 -0700	[thread overview]
Message-ID: <apLZF6b3F39z6bUc@google.com> (raw)
In-Reply-To: <ed99294bd4ac7cd40fa0b2053795aa24b27a632b.1787872237.git.mauriziocasciano7@gmail.com>

Hi Maurizio,

On Fri, Aug 28, 2026 at 01:17:00AM +0200, Maurizio Casciano wrote:
> The Yoga Book YB1-X91F/L uses two GPIOs provided by the RT5677 codec
> itself. GPIO2 enables the second speaker amplifier and GPIO4 enables the
> headphone path, but ACPI does not map either signal.
> 
> Add lookup entries for the codec device so the Yoga Book ASoC machine
> driver can request both controls by function name. Register and remove
> the table with the tablet description lifetime.
> 
> Signed-off-by: Maurizio Casciano <mauriziocasciano7@gmail.com>
> Assisted-by: LLM sparse
> ---
>  drivers/platform/x86/x86-android-tablets/lenovo.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/platform/x86/x86-android-tablets/lenovo.c b/drivers/platform/x86/x86-android-tablets/lenovo.c
> index 88693b9a1b01..8a69194a724e 100644
> --- a/drivers/platform/x86/x86-android-tablets/lenovo.c
> +++ b/drivers/platform/x86/x86-android-tablets/lenovo.c
> @@ -345,6 +345,16 @@ static const struct x86_i2c_client_info lenovo_yogabook_x91_i2c_clients[] __init
>  	},
>  };
>  
> +static struct gpiod_lookup_table lenovo_yb1_x91_rt5677_gpios = {
> +	.dev_id = "i2c-10EC5677:00",
> +	.table = {
> +		/* GPIO2 drives the second speaker amp; GPIO4 drives headphones. */
> +		GPIO_LOOKUP("rt5677", 2, "speaker-enable2", GPIO_ACTIVE_HIGH),
> +		GPIO_LOOKUP("rt5677", 4, "headphone-enable", GPIO_ACTIVE_HIGH),
> +		{ }
> +	},
> +};
> +

It would be better if we used software nodes here instead of lookup
tables.

Thanks.

-- 
Dmitry

  reply	other threads:[~2026-08-29 13:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27 23:16 [PATCH v2 0/3] platform/x86: Describe Yoga Book haptics and audio resources Maurizio Casciano
2026-08-27 23:16 ` [PATCH v2 1/3] platform/x86: x86-android-tablets: Describe Yoga Book haptics Maurizio Casciano
2026-08-27 23:16 ` [PATCH v2 2/3] platform/x86: x86-android-tablets: Add Yoga Book TS3A227E Maurizio Casciano
2026-08-27 23:17 ` [PATCH v2 3/3] platform/x86: x86-android-tablets: Add Yoga Book audio GPIOs Maurizio Casciano
2026-08-29 13:06   ` Dmitry Torokhov [this message]
2026-08-29 22:57     ` [PATCH v3 0/3] platform/x86: Describe Yoga Book haptics and audio resources Maurizio Casciano
2026-08-29 22:57       ` [PATCH v3 1/3] platform/x86: x86-android-tablets: Describe Yoga Book haptics Maurizio Casciano
2026-08-29 22:57       ` [PATCH v3 2/3] platform/x86: x86-android-tablets: Add Yoga Book TS3A227E Maurizio Casciano
2026-08-29 22:57       ` [PATCH v3 3/3] platform/x86: x86-android-tablets: Add Yoga Book audio GPIOs Maurizio Casciano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=apLZF6b3F39z6bUc@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mauriziocasciano7@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®