Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1188535pxp; Thu, 17 Mar 2022 04:56:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC9B59Lm1jthOceMgbjyrY6Sdv8DsU5H5pC1vp7roOESoWH2rXJtF1ByOwP93Htefg9+pF X-Received: by 2002:a17:902:8218:b0:153:278d:b377 with SMTP id x24-20020a170902821800b00153278db377mr4574929pln.119.1647518185161; Thu, 17 Mar 2022 04:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647518185; cv=none; d=google.com; s=arc-20160816; b=vTTC1XWyeeTA9/VHqsDBdz9w8HinyMy/etl0M986dAI4mC1qZN1jJOhO9Ywvq2CztB piq/NOGj4wwn+MnXtRFoDzAVbrAlsvCaYERTTTYqQHLuPS5RWgZdy7m9xypk8EpG9cRM omqV06lpHqKdeFkgsw8yLsCVNHxhmf0h21uu36uksb8BEcUSQdJvndGwsdE6DasXp45E /ij1r7r0WsTcmVZAOB3Tg+giG8r8eQrEdgXQxDX4IAy74tcseQWMdMoRf05yQJDHaIlx GYw7b2wifysFqIKLVM3tEN+1lrv6Fg7zkXgG33ocPVag1BMYkkfciW/WP5GcqOhwdUmQ lZjw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tHvVnOC+9G3Hu8w41fGXZGEdPqMVugcJ/G91GRLrkXY=; b=Sankokudwfzsanb2j47AE7Cy0TUyRU9+G9ri6/dMjZeonriklTLoXo3/7ncw7Cv3CS CV5NnZ70m1rR3XulVEcVUh07Cri3KJHDefLzyTDLgAMFnrgi8zRSm6iZm1nsS37kYSvj FSSjNoCjehF22hAfrWtjg/hfb5EfBKE4tTGC3QdQclfPOV5SFPejVPc7Po4svo4gXgaL Lcunfnx8VGCfMVXc2AqF2jMd72JCgQ8gvhxUywBSnLtPSv5vkXRhZ5SlcxCDywSRKj4J 0hTCZJBSJGWI5CNY3hWhbCikBtJ7UznPYo8QvRmTMJdbxuW84WBseLEu8H0LH3/ba+g2 3cTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=jXHt+4JB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r9-20020a170902be0900b00151d09157c2si4068581pls.587.2022.03.17.04.56.11; Thu, 17 Mar 2022 04:56:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=jXHt+4JB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231925AbiCQJdR (ORCPT + 99 others); Thu, 17 Mar 2022 05:33:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231869AbiCQJdG (ORCPT ); Thu, 17 Mar 2022 05:33:06 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F2D21D4C24; Thu, 17 Mar 2022 02:31:50 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 22H7ecZp022935; Thu, 17 Mar 2022 04:31:33 -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=tHvVnOC+9G3Hu8w41fGXZGEdPqMVugcJ/G91GRLrkXY=; b=jXHt+4JBdZygerywnBvUPBaq73CG0kTeobHEIOWUgRSu932dirHEgTduzCe0fSQM0DRf w4bf0WbHBv+WbkPMm86Hc0lKR3RwwGekCZqwhYQhqV7lPPibR3bG5uVlzKqyq2H11tdY Uy2eNPsjRp9H/pu4ZUP9yVn8yTcKqtONoiVKjSNWI8AWeIZ2S9Per2JuFT4UGOk9qROJ Z3h2WKo16g5HjGuoFx8sh1DPZ7qSzzXESUf1ZP29qd33UlakMBjEaGFg1oPz8zPd0yiw /0lcklpMx9TQ7agzlnX8uaHprnHzA+q51SrWxUWWP6mVI8wDekSfqsaqjd5YaowhWd9j eQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3et5yp475f-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 17 Mar 2022 04:31:33 -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_128_GCM_SHA256) id 15.1.2375.18; Thu, 17 Mar 2022 09:31:32 +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.18 via Frontend Transport; Thu, 17 Mar 2022 09:31:32 +0000 Received: from aryzen.ad.cirrus.com (unknown [198.61.64.95]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id F21FD459; Thu, 17 Mar 2022 09:31:31 +0000 (UTC) From: Lucas Tanure To: Liam Girdwood , Mark Brown , Rob Herring , Jaroslav Kysela , Takashi Iwai CC: , , , , Lucas Tanure Subject: [PATCH v4 07/16] hda: cs35l41: Put the device into safe mode for external boost Date: Thu, 17 Mar 2022 09:31:11 +0000 Message-ID: <20220317093120.168534-8-tanureal@opensource.cirrus.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220317093120.168534-1-tanureal@opensource.cirrus.com> References: <20220317093120.168534-1-tanureal@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: hFhDICJzX7ZY-nePOk9VxBz-harh_nH9 X-Proofpoint-GUID: hFhDICJzX7ZY-nePOk9VxBz-harh_nH9 X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To facilitate the configuration of external boost devices, put all devices, with or without VSPK switch, into safe mode from the start. That allows the following parts of the driver to handle all external boost devices in the same way. Signed-off-by: Lucas Tanure --- sound/pci/hda/cs35l41_hda.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index 0dac622805c4..46e920ec3000 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -109,8 +109,6 @@ static const struct reg_sequence cs35l41_reset_to_safe[] = { }; static const struct cs35l41_hda_reg_sequence cs35l41_hda_reg_seq_no_bst = { - .probe = cs35l41_reset_to_safe, - .num_probe = ARRAY_SIZE(cs35l41_reset_to_safe), .prepare = cs35l41_safe_to_active, .num_prepare = ARRAY_SIZE(cs35l41_safe_to_active), .cleanup = cs35l41_active_to_safe, @@ -224,10 +222,15 @@ static int cs35l41_hda_apply_properties(struct cs35l41_hda *cs35l41) return ret; break; case CS35L41_EXT_BOOST: - cs35l41->reg_seq = &cs35l41_hda_reg_seq_ext_bst; - break; case CS35L41_EXT_BOOST_NO_VSPK_SWITCH: - cs35l41->reg_seq = &cs35l41_hda_reg_seq_no_bst; + if (hw_cfg->bst_type == CS35L41_EXT_BOOST) + cs35l41->reg_seq = &cs35l41_hda_reg_seq_ext_bst; + else + cs35l41->reg_seq = &cs35l41_hda_reg_seq_no_bst; + ret = regmap_multi_reg_write(cs35l41->regmap, cs35l41_reset_to_safe, + ARRAY_SIZE(cs35l41_reset_to_safe)); + if (ret) + return ret; break; default: dev_err(cs35l41->dev, "Boost type %d not supported\n", hw_cfg->bst_type); -- 2.35.1