From mboxrd@z Thu Jan 1 00:00:00 1970 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 58947EEAA45 for ; Thu, 14 Sep 2023 14:29:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240160AbjINO3S (ORCPT ); Thu, 14 Sep 2023 10:29:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240101AbjINO3R (ORCPT ); Thu, 14 Sep 2023 10:29:17 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F2FA2115 for ; Thu, 14 Sep 2023 07:29:12 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id AC16E218F0; Thu, 14 Sep 2023 14:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1694701751; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2cQqm3IxLFOpNf1wNNro2m2AP7w9Qrx243MKxUbDrug=; b=clsjyHnglaHWQoHtjJbOXG+74XyDfkQuidTS+CW6rTfrlYbcXFZe+5wpqYtlS7m1t5e483 dsB+Mx3gEYWvxbKd49pYdngvlKhWbBupSV5EBLkbjm2u/RQeXyOoU9T+nO0ZVE6+2hRgav y7YpRa4obHYN3gT2VaDpzMEoQ/5CDnc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1694701751; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2cQqm3IxLFOpNf1wNNro2m2AP7w9Qrx243MKxUbDrug=; b=MuPvWmJy9St++Q7vQIiRQqZ5ko+Ty17s9S8fFiCWNaxow+Jl4sj2pkQWSElXyOkvLj0b4n fj7PJwsLtmjbcCBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 86F60139DB; Thu, 14 Sep 2023 14:29:11 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 9osnILcYA2VFdAAAMHmgww (envelope-from ); Thu, 14 Sep 2023 14:29:11 +0000 Date: Thu, 14 Sep 2023 16:29:11 +0200 Message-ID: <871qf0zv48.wl-tiwai@suse.de> From: Takashi Iwai To: Richard Fitzgerald Cc: , , , Subject: Re: [PATCH] ALSA: hda: cs35l56: Fix missing RESET GPIO if _SUB is missing In-Reply-To: <20230914121120.6201-1-rf@opensource.cirrus.com> References: <20230914121120.6201-1-rf@opensource.cirrus.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 14 Sep 2023 14:11:20 +0200, Richard Fitzgerald wrote: > > 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 | 14 +++++--------- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/sound/pci/hda/cs35l56_hda.c b/sound/pci/hda/cs35l56_hda.c > index 9e4976bdb5e0..a9844336bdc9 100644 > --- a/sound/pci/hda/cs35l56_hda.c > +++ b/sound/pci/hda/cs35l56_hda.c > @@ -864,15 +864,11 @@ 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); > - } > - > - cs35l56->system_name = sub; > + if (IS_ERR(sub)) > + dev_err_probe(cs35l56->base.dev, PTR_ERR(sub), > + "Read ACPI _SUB failed: fallback to generic firmware\n"); Do we want to show as an error? Since the driver continue to work, it could be rather dev_info()? thanks, Takashi