Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3984904rdb; Thu, 14 Sep 2023 08:28:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElRdD5To8f7jIbDWQELJ0PDelWW4xpwfGRqbduyFiVCMjm7JE57IdWYwJo8o7YVJKp5oKG X-Received: by 2002:a17:902:d4c3:b0:1c3:e3b1:98f9 with SMTP id o3-20020a170902d4c300b001c3e3b198f9mr3401013plg.24.1694705311365; Thu, 14 Sep 2023 08:28:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694705311; cv=none; d=google.com; s=arc-20160816; b=pLGRp9K2X6+6EnqFR5DU2PNL4pMg4oLJwmhsACKiaPCmzG/bs65lYEHEiG0PkFJSa2 NgLU/IaehafcLl0aI8fFEpcMYGxEvrADBeGXbeGF9IAX7M8bqq8bSgL93XG4H/2nNnCo ZoZjkN8Wga/HY8k9/jiToUMne5kLY0Mz0zxD5qjQmqkTKloNYXeyCzvvpSrSPu72vDWI Ka8tUz22nfU2AV1ziD/yZUGQo2q0US8jTLxwS5xRLIuZIoSjREMyUXLqbZOL/bDtpa0j 4Gb6gKAVt9cWfbMN0cJupJx8Spkt9UrdzZ6LmnwJRY77EeuCGxvrKONIMa/0mXver/4h w80w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qygg2TVwFG6lKmZeeKC9INbE7+tFtemrFvcVvzZt+To=; fh=SyhPsGKNo/JGCZgOgs8oor82YQAWZ9kc5f/0PFOAxm0=; b=sYCG6mbaErLIoCBD5o6TnwyTjAG69ADrEOpRjK5pH47CiMB1eCwBQbtxG+H0gVJFRt XRgNqZhV4h6vMDmKnqqo6AM7TzbeGn9eULd9T/CwOV1u+T/6qq4auuIEmFnCjjFHO5ED HPMaVa2UCx0NbU/JFHdCjFagz1G2Qdbxjlen1g31KZnhdbKdaDt6JGCGt1NA6K6bIfdB +JnnegWUxF7OnOUIGu6kkAsvj7bqVPvIz0L45WdlPA1kJb6jdkhswbaB+yrhSYhAzrCY JdkYR9kWL6YE/a4iNrMz4v2YpxtzemGyXfTC9tM3fyOWgZ2Fq44oxybF+MyUXqnO7G1U r7xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=qi+ZUMqO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id k9-20020a170902c40900b001bdebddc2f7si2124990plk.257.2023.09.14.08.28.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 08:28:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=qi+ZUMqO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 96CDC80EE76B; Thu, 14 Sep 2023 08:25:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240867AbjINPZk (ORCPT + 99 others); Thu, 14 Sep 2023 11:25:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235048AbjINPZk (ORCPT ); Thu, 14 Sep 2023 11:25:40 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA35DC6 for ; Thu, 14 Sep 2023 08:25:35 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 38ECunMr020490; Thu, 14 Sep 2023 10:25:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=PODMain02222019; bh=q ygg2TVwFG6lKmZeeKC9INbE7+tFtemrFvcVvzZt+To=; b=qi+ZUMqO1tU9ij+0V q5mfM2KtEBchrQTsq7seqoCFLjCKcjm+SFrzGAdgLhQqjy98CzRPVv8oo4SY1aLH vW1OdwLMZUwSbCkfV1bOt7mINd+t+w0Dd8PtqLZuKxY3KzOeDzLCL1/TsS7Bicq5 BW6v57nqHwhdVeiNoiHt2zdNxwcBuZqQdNMAsyEHrvfUqDtP+8+SVQgYiqlIJwNK +u8Qlu2wG0KUwCwxd020b01ZHh3sO2Blg0x+NEINStyYH5d/++1dmChKSpkF/UBC +bq4ZTP72TYMfyX9J54+V8cV5CBPxcmlBotpen3Fsu1Cml5a/EYFMcgWWgo+FCGQ 9tqPA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3t2y7sj9g5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 10:25:28 -0500 (CDT) Received: from ediex02.ad.cirrus.com (198.61.84.81) 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.37; Thu, 14 Sep 2023 16:25:27 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Thu, 14 Sep 2023 16:25:27 +0100 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.65.215]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id E561F3563; Thu, 14 Sep 2023 15:25:26 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Richard Fitzgerald Subject: [PATCH v2] ALSA: hda: cs35l56: Fix missing RESET GPIO if _SUB is missing Date: Thu, 14 Sep 2023 16:25:25 +0100 Message-ID: <20230914152525.20829-1-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: hvb46J8ibE00wLVH5auGSVmnOad4e6AQ X-Proofpoint-ORIG-GUID: hvb46J8ibE00wLVH5auGSVmnOad4e6AQ X-Proofpoint-Spam-Reason: safe Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Thu, 14 Sep 2023 08:25:49 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email In cs35l56_hda_read_acpi() do not return if ACPI _SUB is missing. A missing _SUB means that the driver cannot load a system-specific firmware, because the firmware is identified by the _SUB. But it can fallback to a generic firmware. Unfortunately this was being handled by immediately returning 0, which would skip the remaining ACPI configuration in cs35l56_hda_read_acpi() and so it would not get the RESET GPIO. Signed-off-by: Richard Fitzgerald Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier") --- sound/pci/hda/cs35l56_hda.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c index bc75865b5de8..87ffe8fbff99 100644 --- a/sound/pci/hda/cs35l56_hda.c +++ b/sound/pci/hda/cs35l56_hda.c @@ -865,15 +865,13 @@ static int cs35l56_hda_read_acpi(struct cs35l56_hda *cs35l56, int id) sub = acpi_get_subsystem_id(ACPI_HANDLE(cs35l56->base.dev)); if (IS_ERR(sub)) { - /* If no ACPI SUB, return 0 and fallback to legacy firmware path, otherwise fail */ - if (PTR_ERR(sub) == -ENODATA) - return 0; - else - return PTR_ERR(sub); + dev_info(cs35l56->base.dev, + "Read ACPI _SUB failed(%ld): fallback to generic firmware\n", + PTR_ERR(sub)); + } else { + cs35l56->system_name = sub; } - cs35l56->system_name = sub; - cs35l56->base.reset_gpio = devm_gpiod_get_index_optional(cs35l56->base.dev, "reset", cs35l56->index, -- 2.30.2