From patchwork Thu Dec 16 11:43:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Tanure X-Patchwork-Id: 12680883 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 9733BC433FE for ; Thu, 16 Dec 2021 12:03:56 +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 D777F1F13; Thu, 16 Dec 2021 13:03:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D777F1F13 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1639656234; bh=oSWKT6ZNg3uzJGxn/Q1s2RPT7+QG47JNfy9ytgIp544=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=j40tB17DDFRCwWxBD+0nTQjf8QsS6aPx6Q5UADbmnRVdUqBvw3K8Pe/blAJwE/M1F 1pnSYTPg1cL+kzoSP4bUZB1frkTjyohs2B9vlfEoIGpcyhAzTo0//u486xJJnMjyGG 9nFC28SH94RK9pkIahMUppywIab3gFHzsKEx3Jms= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2C3F1F80116; Thu, 16 Dec 2021 13:02:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7B8ADF80116; Thu, 16 Dec 2021 13:02:29 +0100 (CET) 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 439CAF80116 for ; Thu, 16 Dec 2021 13:02:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 439CAF80116 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="kUEwVVjN" Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1BG6WwLq019726; Thu, 16 Dec 2021 05:43:42 -0600 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=le5QrY93oJaQcrGed4nRdWn7iLRo6OoqajMw7T+4nho=; b=kUEwVVjNxG2iaZBS+e5BvZzB3J9yqqIqkjg/gbNt47N4/fGYGYIUObws9t60100juuve ZMLkna3RHWhERHMcrdxAWC9+HkEnnUsQCRqY4UCTXoc+Larioqyi6BYA4FkQB1U2AHtU lkzAXvFpbM3fOlPJ5C6xvmxLohfgAPOClQixziWlgO0oBSatzHSbJ+EaeWpDaqAPiao6 sRqrh3Qn2VoVkEMtiEYOGzy99Doz/WVFEC5QAgOqxtRhqX8aTJUduTNz/kD1vmsEtxLD /BAs1ro0ZIWV6yCoE2KpDi9Nv34Zojm1bYtLf6/UG4IQmE0+89dJYRQAUpvSducEpJ8F ZQ== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3cymsc110q-7 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 16 Dec 2021 05:43:42 -0600 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_128_GCM_SHA256) id 15.1.2375.17; Thu, 16 Dec 2021 11:43:39 +0000 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Thu, 16 Dec 2021 11:43:39 +0000 Received: from aryzen.ad.cirrus.com (unknown [198.61.64.39]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id E3F12B13; Thu, 16 Dec 2021 11:43:38 +0000 (UTC) From: Lucas Tanure To: "Rafael J . Wysocki" , Len Brown , Hans de Goede , Mark Gross , Liam Girdwood , Jaroslav Kysela , Mark Brown , Takashi Iwai Subject: [PATCH v5 08/10] ACPI / scan: Create platform device for CLSA0100 and CSC3551 ACPI nodes Date: Thu, 16 Dec 2021 11:43:30 +0000 Message-ID: <20211216114332.153409-9-tanureal@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211216114332.153409-1-tanureal@opensource.cirrus.com> References: <20211216114332.153409-1-tanureal@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: VIoGxwT42pVH29GOsFdQk2F5396ErKdt X-Proofpoint-ORIG-GUID: VIoGxwT42pVH29GOsFdQk2F5396ErKdt 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 ACPI device with CLSA0100 or CSC3551 is a sound card with multiple instances of CS35L41 connectec by I2C to the main CPU. We add an ID to the i2c_multi_instantiate_ids list to enumerate all I2C slaves correctly. Signed-off-by: Lucas Tanure --- drivers/acpi/scan.c | 3 +++ drivers/platform/x86/i2c-multi-instantiate.c | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 5991dddbc9ce..333ae8914cf5 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -1706,8 +1706,11 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device) static const struct acpi_device_id i2c_multi_instantiate_ids[] = { {"BSG1160", }, {"BSG2150", }, + {"CSC3551", }, {"INT33FE", }, {"INT3515", }, + /* Non-conforming _HID for Cirrus Logic already released */ + {"CLSA0100", }, {} }; diff --git a/drivers/platform/x86/i2c-multi-instantiate.c b/drivers/platform/x86/i2c-multi-instantiate.c index 4956a1df5b90..a889789b966c 100644 --- a/drivers/platform/x86/i2c-multi-instantiate.c +++ b/drivers/platform/x86/i2c-multi-instantiate.c @@ -147,6 +147,14 @@ static const struct i2c_inst_data int3515_data[] = { {} }; +static const struct i2c_inst_data cs35l41_hda[] = { + { "cs35l41-hda", IRQ_RESOURCE_GPIO, 0 }, + { "cs35l41-hda", IRQ_RESOURCE_GPIO, 0 }, + { "cs35l41-hda", IRQ_RESOURCE_GPIO, 0 }, + { "cs35l41-hda", IRQ_RESOURCE_GPIO, 0 }, + {} +}; + /* * Note new device-ids must also be added to i2c_multi_instantiate_ids in * drivers/acpi/scan.c: acpi_device_enumeration_by_parent(). @@ -154,7 +162,10 @@ static const struct i2c_inst_data int3515_data[] = { static const struct acpi_device_id i2c_multi_inst_acpi_ids[] = { { "BSG1160", (unsigned long)bsg1160_data }, { "BSG2150", (unsigned long)bsg2150_data }, + { "CSC3551", (unsigned long)cs35l41_hda }, { "INT3515", (unsigned long)int3515_data }, + /* Non-conforming _HID for Cirrus Logic already released */ + { "CLSA0100", (unsigned long)cs35l41_hda }, { } }; MODULE_DEVICE_TABLE(acpi, i2c_multi_inst_acpi_ids);