Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1003678rdb; Fri, 16 Feb 2024 02:13:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVnIuIsOYhAea9t41ZDn/tb7DFDkWDbwBHldZF2PQ2ALLw56irhZ/N04xVCG5HDVuds6y97xmLUA+TQ5a0ZwahYjr0pkwubH5z5ShW9Vg== X-Google-Smtp-Source: AGHT+IHd6kUuHs5HfHp1OLGP2VUVR9dnCG+bd6Ad2v/q0OwXuLGc1dxxbuK0fPZ3o2Pi0nIdOol5 X-Received: by 2002:a17:90b:1e47:b0:299:246a:869e with SMTP id pi7-20020a17090b1e4700b00299246a869emr3025046pjb.38.1708078400910; Fri, 16 Feb 2024 02:13:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708078400; cv=pass; d=google.com; s=arc-20160816; b=Sipidt0xlXHpb8WTJk+6Pp3QgMGGWdXWBI/9rIWeLde8Wmy1ohSFWe5Bscf5CVvknm wnwR4RQ8yoCQiUNeawS86YsPeS+5I5CcNNqfRQFRNBRm8vzXZLA3e9735RmK15w+Vs17 saCO170OXlfB5Yy2DiXgBMAYAps97Efg73g8tpbeenvd7zPFMQx/97rhyWS0pueINE37 bW8eMBgpk66ix7vYanDmUqcjIBFE3iwj+gBPdBlSZOJL+bkF4dRjJY4lP5NoDQd5dz9L m3f5t0/dluxTklUO5w+eG2+YMFvoGPRfM4e0kbwAXSthwz2ZyeyPbRv5JhJl/Ctw/NRy nPnw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=yBl3sKU+2L8E6Xmqeuy6j40kaWR7Rwcru9wjT8+Wxww=; fh=burN6xTHcnghXHYyVb+cSH0RpS4pQbq7wKpUW+bbWbQ=; b=OgQgRm3YAXaoytVf4wtYc1dtwUcbHcU9dbfwqC1/BMaVJzODrTW14UXClzakaCTRez YpNlc2SH+qQSPImvrDYTqdRbiK/tFtYcSqb08y+SV2P+HB9Yg7MWK2DzHpfD2YZLGW8s eCJ7kNCNjrSePR/zOnrV39XPTnfw465dHlV+9RfMEWVNWbqCc94QpJjGegU7H7h2C6l8 YGA81tpJ1rj6rFc6/OHdu/+aNYL6UzDt9apibTalUQzNj9jpKgOFj4qVMJQdM0kRowIY 4Zyc3LGFlVfO4gjT+RzCOglKI5dxHftG6kal+cXtHmooH6D6+wymU6SDWar3Fy4MACBO VK0w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=cCCU8feS; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-68426-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68426-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id r201-20020a632bd2000000b005dbcf1044c0si2853390pgr.57.2024.02.16.02.13.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 02:13:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68426-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=cCCU8feS; arc=pass (i=1 spf=pass spfdomain=opensource.cirrus.com dkim=pass dkdomain=cirrus.com dmarc=pass fromdomain=opensource.cirrus.com); spf=pass (google.com: domain of linux-kernel+bounces-68426-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68426-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 326D828539B for ; Fri, 16 Feb 2024 10:13:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7B60C1CAAF; Fri, 16 Feb 2024 10:13:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="cCCU8feS" 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id B599F1CAAC for ; Fri, 16 Feb 2024 10:13:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.149.25 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708078387; cv=none; b=RzoB0+JUfs+8v9sWGsUjfqFStUXolqJ13eIQTrEgq8Il+Yj17TNOWBn6dR4hMo1unR7RIWG58WQzW2rr++huP1d0Yqj64kPqHflNJsc+nPXcrTlMaA/5ybt7/ylsCJVhdXv6gtLzeOrz8a1JT+THbUxcUEHFze4C1iLysyLPZqI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708078387; c=relaxed/simple; bh=ddSHJRLWu0hndL+TKATWxu/fkQ5Cgt2wZVl4XXmBDmc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=jIeGs3dObUk7YcxjBzz6eT4FbE2YTVGELde+nCofyDkOqv4gn+vJDV+2oMF/WUR3qZODlbSdDb0whWpMqqq+9UsSX4hI7cdajuiDgyu8pWo0/rEsm+o/TKDWb5MjauV6Ob4pGwf1Rrkod8jSFFidXialFTGvQwpdOX8LoOUQdIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=cCCU8feS; arc=none smtp.client-ip=67.231.149.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41G7jo54008245; Fri, 16 Feb 2024 04:12:35 -0600 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=y Bl3sKU+2L8E6Xmqeuy6j40kaWR7Rwcru9wjT8+Wxww=; b=cCCU8feS682LwGXVU IhIxI/WXeHUTfJbWYlekatdSIv9LSdHNPSjZaPs5IouL3/mrjG71XQXkplkPcC+t IkgXebFAcKHC3cVmRZh3fUvEcHMV4rAajVR95R7HBJhUAoX1g3kjDba1blEy1Njk At5AJffR2hPIdDB7cW6NMPVQAqmNcDDY9xOYP7mfdJ14TJ6a8dVHqwkKtCX+7ood 4oLP9d78pfl0fBFKgo2bBA80DrvHRYiN9aDNwhruDg0dCzZ0dr7c6Bd7XwDoNuqy GAuaNuQFN4NmuUsiIGCXA2Y9NcyFFsL/WWc+0lQQF7V830IHhpiUpXvFTrWhOup2 3KwVw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3w67e26w8k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 16 Feb 2024 04:12:34 -0600 (CST) 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.40; Fri, 16 Feb 2024 10:12:32 +0000 Received: from ediswmail9.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.40 via Frontend Transport; Fri, 16 Feb 2024 10:12:32 +0000 Received: from lon-bigdaddy.ad.cirrus.com (unknown [198.61.65.28]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 4C923820242; Fri, 16 Feb 2024 10:12:32 +0000 (UTC) From: Vitaly Rodionov To: Mark Brown CC: Jaroslav Kysela , , , , "Vitaly Rodionov" Subject: [PATCH] ASoC: cs42l42: Remove redundant delays in suspend(). Date: Fri, 16 Feb 2024 10:11:57 +0000 Message-ID: <20240216101157.23176-1-vitalyr@opensource.cirrus.com> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: SPHtKxswNvwdYnim-ycZigmdJQrTo97J X-Proofpoint-GUID: SPHtKxswNvwdYnim-ycZigmdJQrTo97J X-Proofpoint-Spam-Reason: safe This patch will remove redundant delay and minimise total suspend() function call time. Signed-off-by: Vitaly Rodionov --- include/sound/cs42l42.h | 5 ++--- sound/soc/codecs/cs42l42.c | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include/sound/cs42l42.h b/include/sound/cs42l42.h index 3994e933db19..1bd8eee54f66 100644 --- a/include/sound/cs42l42.h +++ b/include/sound/cs42l42.h @@ -809,8 +809,7 @@ #define CS42L42_PLL_LOCK_TIMEOUT_US 1250 #define CS42L42_HP_ADC_EN_TIME_US 20000 #define CS42L42_PDN_DONE_POLL_US 1000 -#define CS42L42_PDN_DONE_TIMEOUT_US 200000 -#define CS42L42_PDN_DONE_TIME_MS 100 -#define CS42L42_FILT_DISCHARGE_TIME_MS 46 +#define CS42L42_PDN_DONE_TIMEOUT_US 235000 +#define CS42L42_PDN_DONE_TIME_MS 65 #endif /* __CS42L42_H */ diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c index 2d11c5125f73..60d366e53526 100644 --- a/sound/soc/codecs/cs42l42.c +++ b/sound/soc/codecs/cs42l42.c @@ -2195,7 +2195,6 @@ int cs42l42_suspend(struct device *dev) /* Discharge FILT+ */ regmap_update_bits(cs42l42->regmap, CS42L42_PWR_CTL2, CS42L42_DISCHARGE_FILT_MASK, CS42L42_DISCHARGE_FILT_MASK); - msleep(CS42L42_FILT_DISCHARGE_TIME_MS); regcache_cache_only(cs42l42->regmap, true); gpiod_set_value_cansleep(cs42l42->reset_gpio, 0); -- 2.40.1