From patchwork Wed Jul 27 09:59:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas tanure X-Patchwork-Id: 593754 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 45746C04A68 for ; Wed, 27 Jul 2022 10:01:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2E842161F; Wed, 27 Jul 2022 12:00:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2E842161F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658916081; bh=BLp2YDVHcxEVuNpLxWvul2XlbAJqidDahY3TVZVf0Kc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=qfB+h5tqIr4qlZY0QffZj2Cm6o3bdHBnRz+Jdv2cZkrW+wPKSzzk27W9QhH/sAitw DIpfYuJrTn+FqVkmmdBnl07rKrlcP1+slQas7y2ldvDgVNyJueSVAGJIL3110EFZnD lD9ZNlcD1arkaP11etduqMYuuTdod7kti8tRNVuc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E35D7F80171; Wed, 27 Jul 2022 11:59:45 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 209E9F80548; Wed, 27 Jul 2022 11:59:44 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8C626F8015B for ; Wed, 27 Jul 2022 11:59:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8C626F8015B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="XUp2LLOq" Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26R4SNEd032560; Wed, 27 Jul 2022 04:59:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=4GMh/xGa5TNYNqY554M0oZkoPr+GvTe1jc7k9ZTapsY=; b=XUp2LLOqcknXoF0P0iMQBihxtbaw61wYS4emhJx9mhaWQGYQW8n7hQ3h3HAxWIo2xeFP PrDZal03qNwFNgKE48Wer4kiaxMNrTfaF70k0yft5w0IH7tpmdCkRAE4LkKOmmvaQiq5 NAN6yUxiXbM1pp7rfbL7YByKExBYCAonwgUyYn044bs1WI1LNZpB4PW1dgLfvPH2ujIS Z9EnWM/15AspyGRvbhX0SJrDBQU/9ElqCE7Om+LCwFVCzimUHWcXBvpIQC2N4GKzXS27 z8ygA+nFZ/2nIgDaSTPMbWp7WZJoez7ddtezIHySwfeTizUwd/PWW5tQ5oKHVHP12Uav ig== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3hged1vtk6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Jul 2022 04:59:30 -0500 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.9; Wed, 27 Jul 2022 04:59:28 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.9 via Frontend Transport; Wed, 27 Jul 2022 04:59:28 -0500 Received: from aryzen.ad.cirrus.com (unknown [198.61.65.94]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 25CCB477; Wed, 27 Jul 2022 09:59:28 +0000 (UTC) From: Lucas Tanure To: Jaroslav Kysela , "Rafael J . Wysocki" , Len Brown , Hans de Goede , Mark Gross , Takashi Iwai , Cameron Berkenpas Subject: [PATCH v2 1/4] ALSA: hda: cs35l41: Use the CS35L41 HDA internal define Date: Wed, 27 Jul 2022 10:59:21 +0100 Message-ID: <20220727095924.80884-2-tanureal@opensource.cirrus.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220727095924.80884-1-tanureal@opensource.cirrus.com> References: <20220727095924.80884-1-tanureal@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: 4fn0EyL3NZu1_JRPPHSh5zWMTgrohK_a X-Proofpoint-ORIG-GUID: 4fn0EyL3NZu1_JRPPHSh5zWMTgrohK_a X-Proofpoint-Spam-Reason: safe Cc: alsa-devel@alsa-project.org, Lucas Tanure , patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Follow GPIO1 pattern, use cs35l41 HDA internal define for IRQ and then translate to ASoC cs35l41 define. Signed-off-by: Lucas Tanure --- sound/pci/hda/cs35l41_hda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index 28798d5c1cf1..48d94c683b75 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -1014,6 +1014,7 @@ static int cs35l41_hda_apply_properties(struct cs35l41_hda *cs35l41) break; case CS35L41_INTERRUPT: using_irq = true; + hw_cfg->gpio2.func = CS35L41_GPIO2_INT_OPEN_DRAIN; break; default: dev_err(cs35l41->dev, "Invalid GPIO2 function %d\n", hw_cfg->gpio2.func); @@ -1273,7 +1274,7 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i cs35l41->reset_gpio = gpiod_get_index(physdev, NULL, 0, GPIOD_OUT_HIGH); cs35l41->hw_cfg.bst_type = CS35L41_EXT_BOOST_NO_VSPK_SWITCH; cs35l41->speaker_id = cs35l41_get_speaker_id(physdev, 0, 0, 2); - hw_cfg->gpio2.func = CS35L41_GPIO2_INT_OPEN_DRAIN; + hw_cfg->gpio2.func = CS35L41_INTERRUPT; hw_cfg->gpio2.valid = true; cs35l41->hw_cfg.valid = true; put_device(physdev); From patchwork Wed Jul 27 09:59:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas tanure X-Patchwork-Id: 594088 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 20CD0C04A68 for ; Wed, 27 Jul 2022 10:01:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0B0C415F2; Wed, 27 Jul 2022 12:00:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0B0C415F2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658916059; bh=6IPLsZMFG3G/c7PcKKn+UQ/A6kxicY8fSiJcjw5wK58=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FpoQgXnxc1XRY3xjEsQXJPED6g2EY2TUZ4GkW8nnbHIzskrbcW2BRjbkeqSCA4nLE zPHUEfYTTeqUzG0umycc1zDueNTJxf4HBiMTA6Oqu+N/JokeW+03XeLZWrR1vGLy2N FTNtEBZ4Gbc7/xmgG6+0I6j789bvhpJHpbuud3tQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 60982F804D8; Wed, 27 Jul 2022 11:59:42 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ACA97F80543; Wed, 27 Jul 2022 11:59:40 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DCB05F800FA for ; Wed, 27 Jul 2022 11:59:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DCB05F800FA Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="IlRbU5NQ" Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26R4SNEf032560; Wed, 27 Jul 2022 04:59:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=UHvBpm5zfl//HU6kw3atKgmqc2hKJIkAZW2cDtQKQ5k=; b=IlRbU5NQhqkHHA1JhBgR+IECQY58O2ue3NFZLgrKUv+8IhzaYe6kO80S0KG5L4cp2GTf pl148xTAFYmFbCh6lXUb40Exa4WgI+jpKfmEvdGnUiKSXZ5TyT3M7Tq2ZzdMVak00zuR y33G9n2j+JMcZi22O2qu3iA8Z8r7ydryvYFv+i89HXsDZytG/RkBm2rPXM41WLNITCYU CE6/sN7zKj/vCJBE4KSwZQXaCBlolFi2lJq3k+SH2m2EFgiEPIC7BBs4CHmwC36J+bfg KtQkg/vyuebbsP8c14HfqFhFi76uRQgHybqhXrcnyhvv8PiBSPNFMTkkmCf25DD05vXo MA== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3hged1vtk6-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Jul 2022 04:59:31 -0500 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.9; Wed, 27 Jul 2022 04:59:28 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.9 via Frontend Transport; Wed, 27 Jul 2022 04:59:28 -0500 Received: from aryzen.ad.cirrus.com (unknown [198.61.65.94]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 86C4CB0E; Wed, 27 Jul 2022 09:59:28 +0000 (UTC) From: Lucas Tanure To: Jaroslav Kysela , "Rafael J . Wysocki" , Len Brown , Hans de Goede , Mark Gross , Takashi Iwai , Cameron Berkenpas Subject: [PATCH v2 2/4] ALSA: hda: cs35l41: Support CLSA0101 Date: Wed, 27 Jul 2022 10:59:22 +0100 Message-ID: <20220727095924.80884-3-tanureal@opensource.cirrus.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220727095924.80884-1-tanureal@opensource.cirrus.com> References: <20220727095924.80884-1-tanureal@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: lShaz5kvN2W-QsD4ao7Q4JOh0--Mn88P X-Proofpoint-ORIG-GUID: lShaz5kvN2W-QsD4ao7Q4JOh0--Mn88P X-Proofpoint-Spam-Reason: safe Cc: alsa-devel@alsa-project.org, Lucas Tanure , patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Add support for Intel version of Legion 7 laptop. Signed-off-by: Lucas Tanure --- sound/pci/hda/cs35l41_hda.c | 66 ++++++++++++++++++++------------- sound/pci/hda/cs35l41_hda_i2c.c | 3 ++ sound/pci/hda/patch_realtek.c | 12 ++++++ 3 files changed, 55 insertions(+), 26 deletions(-) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index 48d94c683b75..6edf95553745 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -1133,6 +1133,45 @@ static int cs35l41_get_speaker_id(struct device *dev, int amp_index, return speaker_id; } +/* + * Device CLSA010(0/1) doesn't have _DSD so a gpiod_get by the label reset won't work. + * And devices created by serial-multi-instantiate don't have their device struct + * pointing to the correct fwnode, so acpi_dev must be used here. + * And devm functions expect that the device requesting the resource has the correct + * fwnode. + */ +static int cs35l41_no_acpi_dsd(struct cs35l41_hda *cs35l41, struct device *physdev, int id, + const char *hid) +{ + struct cs35l41_hw_cfg *hw_cfg = &cs35l41->hw_cfg; + + /* check I2C address to assign the index */ + cs35l41->index = id == 0x40 ? 0 : 1; + cs35l41->channel_index = 0; + cs35l41->reset_gpio = gpiod_get_index(physdev, NULL, 0, GPIOD_OUT_HIGH); + cs35l41->speaker_id = cs35l41_get_speaker_id(physdev, 0, 0, 2); + hw_cfg->spk_pos = cs35l41->index; + hw_cfg->gpio2.func = CS35L41_INTERRUPT; + hw_cfg->gpio2.valid = true; + hw_cfg->valid = true; + put_device(physdev); + + if (strncmp(hid, "CLSA0100", 8) == 0) { + hw_cfg->bst_type = CS35L41_EXT_BOOST_NO_VSPK_SWITCH; + } else if (strncmp(hid, "CLSA0101", 8) == 0) { + hw_cfg->bst_type = CS35L41_EXT_BOOST; + hw_cfg->gpio1.func = CS35l41_VSPK_SWITCH; + hw_cfg->gpio1.valid = true; + } else { + hw_cfg->valid = false; + hw_cfg->gpio1.valid = false; + hw_cfg->gpio2.valid = false; + return -EINVAL; + } + + return 0; +} + static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, int id) { struct cs35l41_hw_cfg *hw_cfg = &cs35l41->hw_cfg; @@ -1161,7 +1200,7 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i property = "cirrus,dev-index"; ret = device_property_count_u32(physdev, property); if (ret <= 0) - goto no_acpi_dsd; + return cs35l41_no_acpi_dsd(cs35l41, physdev, id, hid); if (ret > ARRAY_SIZE(values)) { ret = -EINVAL; @@ -1255,31 +1294,6 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i dev_err(cs35l41->dev, "Failed property %s: %d\n", property, ret); return ret; - -no_acpi_dsd: - /* - * Device CLSA0100 doesn't have _DSD so a gpiod_get by the label reset won't work. - * And devices created by serial-multi-instantiate don't have their device struct - * pointing to the correct fwnode, so acpi_dev must be used here. - * And devm functions expect that the device requesting the resource has the correct - * fwnode. - */ - if (strncmp(hid, "CLSA0100", 8) != 0) - return -EINVAL; - - /* check I2C address to assign the index */ - cs35l41->index = id == 0x40 ? 0 : 1; - cs35l41->hw_cfg.spk_pos = cs35l41->index; - cs35l41->channel_index = 0; - cs35l41->reset_gpio = gpiod_get_index(physdev, NULL, 0, GPIOD_OUT_HIGH); - cs35l41->hw_cfg.bst_type = CS35L41_EXT_BOOST_NO_VSPK_SWITCH; - cs35l41->speaker_id = cs35l41_get_speaker_id(physdev, 0, 0, 2); - hw_cfg->gpio2.func = CS35L41_INTERRUPT; - hw_cfg->gpio2.valid = true; - cs35l41->hw_cfg.valid = true; - put_device(physdev); - - return 0; } int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int irq, diff --git a/sound/pci/hda/cs35l41_hda_i2c.c b/sound/pci/hda/cs35l41_hda_i2c.c index 9c08fa08c421..5baacfde4f16 100644 --- a/sound/pci/hda/cs35l41_hda_i2c.c +++ b/sound/pci/hda/cs35l41_hda_i2c.c @@ -22,6 +22,8 @@ static int cs35l41_hda_i2c_probe(struct i2c_client *clt, const struct i2c_device */ if (strstr(dev_name(&clt->dev), "CLSA0100")) device_name = "CLSA0100"; + else if (strstr(dev_name(&clt->dev), "CLSA0101")) + device_name = "CLSA0101"; else if (strstr(dev_name(&clt->dev), "CSC3551")) device_name = "CSC3551"; else @@ -45,6 +47,7 @@ static const struct i2c_device_id cs35l41_hda_i2c_id[] = { static const struct acpi_device_id cs35l41_acpi_hda_match[] = { {"CLSA0100", 0 }, + {"CLSA0101", 0 }, {"CSC3551", 0 }, {} }; diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0e340c0934db..65fd3e599a83 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6710,6 +6710,12 @@ static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const st cs35l41_generic_fixup(cdc, action, "i2c", "CLSA0100", 2); } +static void alc287_fixup_legion_16ithg6_speakers(struct hda_codec *cdc, const struct hda_fixup *fix, + int action) +{ + cs35l41_generic_fixup(cdc, action, "i2c", "CLSA0101", 2); +} + /* for alc295_fixup_hp_top_speakers */ #include "hp_x360_helper.c" @@ -7047,6 +7053,7 @@ enum { ALC245_FIXUP_CS35L41_SPI_4_HP_GPIO_LED, ALC285_FIXUP_HP_SPEAKERS_MICMUTE_LED, ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE, + ALC287_FIXUP_LEGION_16ITHG6, }; /* A special fixup for Lenovo C940 and Yoga Duet 7; @@ -8889,6 +8896,10 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC }, + [ALC287_FIXUP_LEGION_16ITHG6] = { + .type = HDA_FIXUP_FUNC, + .v.func = alc287_fixup_legion_16ithg6_speakers, + }, }; static const struct snd_pci_quirk alc269_fixup_tbl[] = { @@ -9353,6 +9364,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x384a, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), SND_PCI_QUIRK(0x17aa, 0x3853, "Lenovo Yoga 7 15ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS), + SND_PCI_QUIRK(0x17aa, 0x3855, "Legion 7 16ITHG6", ALC287_FIXUP_LEGION_16ITHG6), SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI), SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC), SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI), From patchwork Wed Jul 27 09:59:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas tanure X-Patchwork-Id: 593753 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CFEF3C19F29 for ; Wed, 27 Jul 2022 10:01:47 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 16F1E164E; Wed, 27 Jul 2022 12:00:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 16F1E164E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658916106; bh=rEwepkHm2EPch0pBXKRxv0Hv/vO+u9iTqCswBh/PC8c=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=eQvP+pH5dFopRWACLP+X23JQr+t0j6Z3hpvKPpDe4JpuYuc5tTeheJ+j1Fs5SuoQQ iBiVB6fAmN0YEueR3hBCGVVo/2q0rsNSC1cybvYZndFZ1JzA9m3snMDnpBAm+NmXFq SHugL6PlBg+iKYiD4UGfzEDFJiljGxf8lDEhIJLs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2CA72F80553; Wed, 27 Jul 2022 11:59:47 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9140DF801D5; Wed, 27 Jul 2022 11:59:44 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D7B1DF80171 for ; Wed, 27 Jul 2022 11:59:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D7B1DF80171 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="mRbjPnM4" Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26R4SNEg032560; Wed, 27 Jul 2022 04:59:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=OVWLOViijHvZ0gyrsr6sZosQT9smEiGwvFnRB0/TaRY=; b=mRbjPnM414VhyBwRFy9PC6SYYkXxG9KZHx50DRageHYP29fol+z3rOCN4NH4SluNwVPS Sl29+Ica17m9URmQU237sVDdieEvVJlOXM3IHctJN42WSKmBtqToO2vAlUmPMr+G50T4 mdgYRf+57DBKJTzX81GCkIMy+QVVnI7qkZtFqfuD/SvexyJ6XWx6FmkYeHkDEQ0Jesh0 713+YUqO9bGG4vWUyJfjWxLXRzy8x0nKSsOuiob0f1OUzD7+P9HgQnM6e+hb25EIdWka MFz9O0xzXMQBqIf6O2QJs0z6ILEU03RWj9GCpa0+uAMMs8ZtrZrLLdYqC7vRtQGGpbUv 5Q== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3hged1vtk6-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Jul 2022 04:59:32 -0500 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.9; Wed, 27 Jul 2022 04:59:29 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.9 via Frontend Transport; Wed, 27 Jul 2022 04:59:29 -0500 Received: from aryzen.ad.cirrus.com (unknown [198.61.65.94]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id E041E477; Wed, 27 Jul 2022 09:59:28 +0000 (UTC) From: Lucas Tanure To: Jaroslav Kysela , "Rafael J . Wysocki" , Len Brown , Hans de Goede , Mark Gross , Takashi Iwai , Cameron Berkenpas Subject: [PATCH v2 3/4] ACPI: scan: Add CLSA0101 Laptop Support Date: Wed, 27 Jul 2022 10:59:23 +0100 Message-ID: <20220727095924.80884-4-tanureal@opensource.cirrus.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220727095924.80884-1-tanureal@opensource.cirrus.com> References: <20220727095924.80884-1-tanureal@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: AtdIxN_CFm9gOicAvdNFl88eKK2K7cCh X-Proofpoint-ORIG-GUID: AtdIxN_CFm9gOicAvdNFl88eKK2K7cCh X-Proofpoint-Spam-Reason: safe Cc: alsa-devel@alsa-project.org, Lucas Tanure , patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Add CLSA0101 id to the ignore_serial_bus_ids so serial-multi-instantiate can correctly instantiate the driver. Signed-off-by: Lucas Tanure --- drivers/acpi/scan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index b100e6ca9bb4..42cec8120f18 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1722,6 +1722,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) {"INT3515", }, /* Non-conforming _HID for Cirrus Logic already released */ {"CLSA0100", }, + {"CLSA0101", }, /* * Some ACPI devs contain SerialBus resources even though they are not * attached to a serial bus at all. From patchwork Wed Jul 27 09:59:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas tanure X-Patchwork-Id: 594087 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98BACC04A68 for ; Wed, 27 Jul 2022 10:01:33 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 8DEC21638; Wed, 27 Jul 2022 12:00:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8DEC21638 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658916091; bh=DSCCyKVwWP2TcyemXmjZOPJN+EvQg7Qe5czbnE2lsOI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=UySzFSnrFwwH2ZD/k9tZmVisTPM2E3rfWjPF/+R8yo8CRI/jNCtckVixtlVZ+SboX Vb2/2S++yDRxEo7qXhccmVmMF6TliRIXVOSlWRWSXi1v6CfQ+j8tBMMXKf8TgTl3NV NSzIiQYbv06zW7bWUqZEJgpYcqvHUfJ5lCQzpYXQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9A6F9F80549; Wed, 27 Jul 2022 11:59:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3B9AFF80544; Wed, 27 Jul 2022 11:59:44 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 9A051F800C9 for ; Wed, 27 Jul 2022 11:59:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9A051F800C9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="TNYSGwwh" Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 26R4SNEe032560; Wed, 27 Jul 2022 04:59:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=T6+2mzXRPTLTtBq7x98yRAkPxVcb5dHCe1xJUV91oCI=; b=TNYSGwwh76BBHIpY0CGeSe+1YzJO9YFfbaisikwUU0yT4Gs10ICv3Pu9nAxmuUHshM43 9X9DDDTUdbLsTI9hxdNgKJng86o6D4V5amkqeLMwSaJEc9lAIaDdYRzBXmXzc0Ym+Pd/ NWbzdtjG8fX6hgZfKwNTBcrHcOUy6ayhxsqmP+AUiA4Qh/5x/AVSuUxtsuhS0PnIPqep rYuci/HcCGKHQPXn6JlzB4gdrsDID49bFQ9zcni9ZgIdSDc3dFFpX9S/aORkaj9w5fA6 rKGZxgbSXvFCK6tCOD8aixzcnwExc2Cg8aY0ky9sOMIDJvH1yHDxpoWuZLHtkWYfN1Yd ig== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3hged1vtk5-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Jul 2022 04:59:31 -0500 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.9; Wed, 27 Jul 2022 04:59:29 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.9 via Frontend Transport; Wed, 27 Jul 2022 04:59:29 -0500 Received: from aryzen.ad.cirrus.com (unknown [198.61.65.94]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 4FDF02D4; Wed, 27 Jul 2022 09:59:29 +0000 (UTC) From: Lucas Tanure To: Jaroslav Kysela , "Rafael J . Wysocki" , Len Brown , Hans de Goede , Mark Gross , Takashi Iwai , Cameron Berkenpas Subject: [PATCH v2 4/4] platform/x86: serial-multi-instantiate: Add CLSA0101 Laptop Date: Wed, 27 Jul 2022 10:59:24 +0100 Message-ID: <20220727095924.80884-5-tanureal@opensource.cirrus.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220727095924.80884-1-tanureal@opensource.cirrus.com> References: <20220727095924.80884-1-tanureal@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: KwUWKi34NrhthI5lpKwmDqaU7d1As0EB X-Proofpoint-ORIG-GUID: KwUWKi34NrhthI5lpKwmDqaU7d1As0EB X-Proofpoint-Spam-Reason: safe Cc: alsa-devel@alsa-project.org, Lucas Tanure , patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-acpi@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The device CLSA0101 has two instances of CS35L41 connected by I2C. Signed-off-by: Lucas Tanure --- drivers/platform/x86/serial-multi-instantiate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/serial-multi-instantiate.c b/drivers/platform/x86/serial-multi-instantiate.c index 67feed25c9db..5362f1a7b77c 100644 --- a/drivers/platform/x86/serial-multi-instantiate.c +++ b/drivers/platform/x86/serial-multi-instantiate.c @@ -328,6 +328,7 @@ static const struct acpi_device_id smi_acpi_ids[] = { { "INT3515", (unsigned long)&int3515_data }, /* Non-conforming _HID for Cirrus Logic already released */ { "CLSA0100", (unsigned long)&cs35l41_hda }, + { "CLSA0101", (unsigned long)&cs35l41_hda }, { } }; MODULE_DEVICE_TABLE(acpi, smi_acpi_ids);