From nobody Sun Sep 14 22:18:31 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C91EC32793 for ; Wed, 18 Jan 2023 13:26:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229651AbjARN00 (ORCPT ); Wed, 18 Jan 2023 08:26:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbjARNZg (ORCPT ); Wed, 18 Jan 2023 08:25:36 -0500 Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88F979AAB1 for ; Wed, 18 Jan 2023 04:52:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1674046362; x=1705582362; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=c9tQ6467axGUUkqK8Hn/WxBs1AovQDwhp7i0J3ZaltU=; b=oUTJko1HiCs47ScSwNDFuyBfNE3/2E0xF+mmifvzaRtcShJ/MXnqcHDa 29gKUadym3+U7+WVCNHoP9uvyS4348E3/lpNlI1nwRC6mNj0QDzvgTEg/ DPSu18dUf4VREGNeM9BDgNV3hwz73rG/IcU/BVJN+0qflq01JqhAcC/uf K1eu20Wa9h8CJN7GJiubj2tcQCAJl/bbNExAZOn1qYV1rU6FND0ikxNfu QUg/MHcgYuO2t+PFvzrFFyRHsz/sSrAmGNLWbv+Eoxyk60OelSrx4H6/F NOI/Jn5IkJTAf3jTbC/QzcloJxQdtv137/5qNNgBYNzsNSaCGhvt7ppvX A==; From: Astrid Rost To: Mark Brown , Liam Girdwood , Krzysztof Kozlowski , Jaroslav Kysela , Takashi Iwai CC: , , , Astrid Rost Subject: [PATCH v1 3/4] ASoC: ts3a227e: add set_jack and get_jack_supported_type Date: Wed, 18 Jan 2023 13:52:25 +0100 Message-ID: <20230118125226.333214-4-astrid.rost@axis.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230118125226.333214-1-astrid.rost@axis.com> References: <20230118125226.333214-1-astrid.rost@axis.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Add set_jack and get_jack_supported_type to allow simple-card-utils to add a jack for it. Signed-off-by: Astrid Rost --- sound/soc/codecs/ts3a227e.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/ts3a227e.c b/sound/soc/codecs/ts3a227e.c index 2305a472d132..212dfd2b60ed 100644 --- a/sound/soc/codecs/ts3a227e.c +++ b/sound/soc/codecs/ts3a227e.c @@ -258,7 +258,22 @@ int ts3a227e_enable_jack_detect(struct snd_soc_compone= nt *component, } EXPORT_SYMBOL_GPL(ts3a227e_enable_jack_detect); =20 -static struct snd_soc_component_driver ts3a227e_soc_driver; +static int ts3a227e_set_jack(struct snd_soc_component *component, + struct snd_soc_jack *jack, void *data) +{ + return ts3a227e_enable_jack_detect(component, jack); +} + +static int ts3a227e_get_supported_jack_type(struct snd_soc_component *comp= onent) +{ + return TS3A227E_JACK_MASK; +} + +static const struct snd_soc_component_driver ts3a227e_soc_driver =3D { + .name =3D "ti,ts3a227e", + .set_jack =3D ts3a227e_set_jack, + .get_jack_supported_type =3D ts3a227e_get_supported_jack_type, +}; =20 static const struct regmap_config ts3a227e_regmap_config =3D { .val_bits =3D 8, --=20 2.30.2