From patchwork Wed Jan 24 15:30:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 13529342 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 2D7544409; Wed, 24 Jan 2024 15:30:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110227; cv=none; b=UkRkjli76IBC4FV+cPQGhwBzdxZGZvdBxnzUlRbCEEjs2tu9sJuVWbxH/O/it6I78bx0ashz3rrKTmLOiUzWLEm+O3nJJKm+rTM6FvQ0CJgnFL4N/4TcXz05qRRl/9mZDApxDPLD0CHzKJzoK3FWHroYHhsk3K2pqwrowo3vCPk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110227; c=relaxed/simple; bh=xX8V+ooBoGuO9/qAZe63ZvqC3unGlMbM7oteiXO0RC4=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=X+kjZyIHxuY2+7viC3Hk5F9sALPGnp4FLmdK1rJ1rXaJB/xA5K2n4eHVjYmthVLDkpFNA4l6WJuGGG737+ZiIFVgWsUVYQ0FMSJyySkKWlc5rdVvVPedLWOjKdj91PBP1CVea3FqItrhNqFs8sGPwTElkBhCP9BpQZkgkiDys0k= 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=LweXCt7J; arc=none smtp.client-ip=67.231.152.168 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="LweXCt7J" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40O8MvMl030107; Wed, 24 Jan 2024 09:30:18 -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=l RLqdGz9nV9jBTZzuw5ozwQtDA2zkxWRDOuyDlnnA78=; b=LweXCt7JqcK49xNqX jp/83OkDlTze3OwnFiOBAR2BUrWPPy3ikkugkAcdCc7bNBsxBOAylOB0QiqSYNJr Xnd9kWLFasRG7pAbdJpobqUV6a3XRP7s41pRXKfyzmm98DkcheM26N0fiUaEOj2Y I/RO4rdrwJoc/OgG9JHPMqoCKgb7N3lvKcv7a9BtaCNwTqDz+pPX0o3PMcM7lFbF p8PNYvGaWf45HSIV6e+y2ZRegGU9uJRX3soOUiSxVMreZzSCSx3s42AQV7dYe68c 5pOy22uQtZzd5k+FoKAHaarDBypFg7neXNfws3El6CvQUFhjMttQqiWnj/DdSliE dFhZA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3vtmf9ryqc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 09:30:18 -0600 (CST) 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_256_GCM_SHA384) id 15.2.1118.40; Wed, 24 Jan 2024 15:30:16 +0000 Received: from ediswmail9.ad.cirrus.com (198.61.86.93) 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 via Frontend Transport; Wed, 24 Jan 2024 15:30:16 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id 98D63820246; Wed, 24 Jan 2024 15:30:16 +0000 (UTC) From: Charles Keepax To: , CC: , , , , Subject: [PATCH v2 1/6] spi: cs42l43: Tidy up header includes Date: Wed, 24 Jan 2024 15:30:11 +0000 Message-ID: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: m-fKSUnpiyZc6hYMIqEPaZ1VCktx70Fo X-Proofpoint-ORIG-GUID: m-fKSUnpiyZc6hYMIqEPaZ1VCktx70Fo X-Proofpoint-Spam-Reason: safe Including some missing headers. Suggested-by: Andy Shevchenko Acked-by: Mark Brown Signed-off-by: Charles Keepax Reviewed-by: Andy Shevchenko --- Changes since v1: - Moved to start of the series The changes to the MFD headers necessitate the inclusion of of.h here to keep things building, hence my including this SPI change in the this MFD series. The rest of the SPI fixups will be sent separately, as they are also not dependent on this change. Thanks, Charles drivers/spi/spi-cs42l43.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-cs42l43.c b/drivers/spi/spi-cs42l43.c index d239fc5a49ccc..fb62807fc991c 100644 --- a/drivers/spi/spi-cs42l43.c +++ b/drivers/spi/spi-cs42l43.c @@ -11,7 +11,9 @@ #include #include #include +#include #include +#include #include #include #include From patchwork Wed Jan 24 15:30:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 13529346 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 448447A729; Wed, 24 Jan 2024 15:30:26 +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=1706110228; cv=none; b=fGpVmg/HTR/0B0gsfm5GbGpdV2HvvpWQD2xNDgWXMEuroIYxhsMKmI2Dj7flP7ehfT+Z4PsR8+tNSkt3dV9LC5/zBx16KVxIncGyvBelqlmaWXkoTQ68TkOJHmvcQD8Jzwq2mzzHccHyvhY+11axhmu12bR85xtA54zEkgJfpjg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110228; c=relaxed/simple; bh=wYSLCOGRNXXv1Vi8jzuH0RFFj80iLBVjvc3k9ghGQDo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YzXBztO8J2+49/PkewNtlhVx+yp9hbZnElU/k1kl0TlGTT7jm3HMKNEO6byntX/uq8nOl+ius61+kqKpkkgUXLXkvvJ4N4nLaI3pqVaOVcc17aFc27k0upE09Wf6lCgnoSf6+JWA7eKPhy4jlIqMhnqAGTHni49fx3XqLxG5+LA= 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=aH65Nxxk; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="aH65Nxxk" 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 40O5ABcJ018377; Wed, 24 Jan 2024 09:30:19 -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=E2XWBHwq6ltlZasJbVG3NX2UFpIfLf7u9nZRl21LhxE=; b= aH65NxxknFPzb6+Mg4oTB/tdjPkpk8lRRnacmPCJcfp1hhuGVjk6d4kIn/OmnbjZ Wg9y6n4YYSne60qFsKqCaIdcLMWLNxQnkC5U1vhsx0aZ6/18ca1FXSoqStqi5tVS OncF9gUGZl4KElLuMnYlS+eweDKb0onBdIDkulUi9vuiUqE163vikRTnW1XBxIZ2 p/JW/hVxFiYip95AfH6mV3bBq1qQfFg9y8oz3PYY3Tycum7dFNfTXQcLwqIN/EBa BR5Oij1WSzS5/E8bkFzUITwvWpns7b1Dvr28W8cVYCFs3Z+2oxGpm+PIfiWzgW3D j5Z44c1mzAb9wXpaM+AdJg== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3vtmfhgyrg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 09:30:18 -0600 (CST) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 24 Jan 2024 15:30:16 +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; Wed, 24 Jan 2024 15:30:16 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id ABAF5820247; Wed, 24 Jan 2024 15:30:16 +0000 (UTC) From: Charles Keepax To: , CC: , , , , Subject: [PATCH v2 2/6] mfd: cs42l43: Tidy up header includes Date: Wed, 24 Jan 2024 15:30:12 +0000 Message-ID: <20240124153016.1541616-2-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> References: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: UpLMu7Puv_9W5cJe5TyYpu1GUr74z5EA X-Proofpoint-GUID: UpLMu7Puv_9W5cJe5TyYpu1GUr74z5EA X-Proofpoint-Spam-Reason: safe Use more forward declarations, move header guards to cover other includes, and rely less on including headers through other headers. Suggested-by: Andy Shevchenko Signed-off-by: Charles Keepax --- No changes since v1. drivers/mfd/cs42l43-i2c.c | 6 +++++- drivers/mfd/cs42l43-sdw.c | 6 +++++- drivers/mfd/cs42l43.c | 8 +++++++- drivers/mfd/cs42l43.h | 9 +++++---- include/linux/mfd/cs42l43.h | 13 +++++++------ 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/drivers/mfd/cs42l43-i2c.c b/drivers/mfd/cs42l43-i2c.c index 4922211680c96..7162274a0b551 100644 --- a/drivers/mfd/cs42l43-i2c.c +++ b/drivers/mfd/cs42l43-i2c.c @@ -6,11 +6,15 @@ * Cirrus Logic International Semiconductor Ltd. */ +#include #include -#include #include +#include #include +#include #include +#include +#include #include "cs42l43.h" diff --git a/drivers/mfd/cs42l43-sdw.c b/drivers/mfd/cs42l43-sdw.c index 1d85bbf8cdd5d..d6962a5a35f65 100644 --- a/drivers/mfd/cs42l43-sdw.c +++ b/drivers/mfd/cs42l43-sdw.c @@ -6,11 +6,15 @@ * Cirrus Logic International Semiconductor Ltd. */ +#include #include #include -#include +#include #include +#include #include +#include +#include #include #include #include diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c index 7b6d07cbe6fc6..4e2bc5ad244a5 100644 --- a/drivers/mfd/cs42l43.c +++ b/drivers/mfd/cs42l43.c @@ -6,18 +6,24 @@ * Cirrus Logic International Semiconductor Ltd. */ +#include #include #include #include +#include #include -#include #include +#include #include #include +#include #include #include +#include #include +#include #include +#include #include "cs42l43.h" diff --git a/drivers/mfd/cs42l43.h b/drivers/mfd/cs42l43.h index eb4caf3938332..70129db9f916e 100644 --- a/drivers/mfd/cs42l43.h +++ b/drivers/mfd/cs42l43.h @@ -6,15 +6,16 @@ * Cirrus Logic International Semiconductor Ltd. */ -#include -#include -#include - #ifndef CS42L43_CORE_INT_H #define CS42L43_CORE_INT_H #define CS42L43_N_DEFAULTS 176 +struct cs42l43; +struct dev_pm_ops; +struct device; +struct reg_default; + extern const struct dev_pm_ops cs42l43_pm_ops; extern const struct reg_default cs42l43_reg_default[CS42L43_N_DEFAULTS]; diff --git a/include/linux/mfd/cs42l43.h b/include/linux/mfd/cs42l43.h index cf8263aab41bd..2239d8585e785 100644 --- a/include/linux/mfd/cs42l43.h +++ b/include/linux/mfd/cs42l43.h @@ -6,20 +6,21 @@ * Cirrus Logic International Semiconductor Ltd. */ +#ifndef CS42L43_CORE_EXT_H +#define CS42L43_CORE_EXT_H + #include -#include -#include #include #include #include -#include #include -#ifndef CS42L43_CORE_EXT_H -#define CS42L43_CORE_EXT_H - #define CS42L43_N_SUPPLIES 3 +struct device; +struct gpio_desc; +struct sdw_slave; + enum cs42l43_irq_numbers { CS42L43_PLL_LOST_LOCK, CS42L43_PLL_READY, From patchwork Wed Jan 24 15:30:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 13529344 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 C9C3F7A708; Wed, 24 Jan 2024 15:30:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110228; cv=none; b=AElpKUh1y2YCA+mnPvClFGnIPiCS/qVg8rDjftSCnSnjWHDXH32yB2nPpNhYVCmyXLUUxFuQMuUnhJ7huC1FIXEASJbyYj4qoV+2M1tGnZMAEWF/5BiCH6B8r1lgaT1mSIzS9qcPoxdOSaUYa+P5EoJJmPMfm6yzaiTzP3OqqOk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110228; c=relaxed/simple; bh=KirQojbILq0HAmMclkCbeSctz6QKZqPebV16z8U1rCA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Y7m8cJMyLlYof3OoNUxjM85LHrD8d1T1hFEAZ9e41rKQLx31b/U3uwZ75AAC7ZgBzPzx722xPOBGrYk0765POUQcWRnbuXy2OxpkrxdVpSnMreDvhYZ/uUrNCdG6TRZh+NetumV/pdP42zLPIVNybwJVusFZWfpkdKX5u8h0b0Q= 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=CftZTG/A; arc=none smtp.client-ip=67.231.152.168 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="CftZTG/A" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40O8MvMo030107; Wed, 24 Jan 2024 09:30:20 -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=KBAeivo/+2imYGWU1iaqRu5IzYuy5Ccsg353C7Igfzw=; b= CftZTG/AoqBl2k33U8oOEErFJ72SPYJ8m6262mB6YLRaRKJrpqiqdpqBLL9mqbWf o2UR7mo1VfQ4A46k02AoYi4kao101WcNpX+C+agj3WCkepDjUyhRd4JLLxK8WHvd vscmRAgL7gqp1VKio1a4ZU7jQBcyJofH8rEqbUBrBiR9DWvX0KVvkNfT70RlW79j 7yp5RbFgJsMdGLOz/IhzWbDEatSvRUIWnQSbnj4+Oc/jbwOxBeJu1TUOmJwcFbRO 4yfyX8MzM+N6ANjlpYbUupblxAzZD317za3dG1nOe9qy/iyIN3+6ayJ6F+6m9ovz lbJ3bKITt5PTsWda/jDpaw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3vtmf9ryqc-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 09:30:20 -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; Wed, 24 Jan 2024 15:30:16 +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; Wed, 24 Jan 2024 15:30:16 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id AE640820248; Wed, 24 Jan 2024 15:30:16 +0000 (UTC) From: Charles Keepax To: , CC: , , , , Subject: [PATCH v2 3/6] mfd: cs42l43: Use __u8 type rather than u8 for firmware interface Date: Wed, 24 Jan 2024 15:30:13 +0000 Message-ID: <20240124153016.1541616-3-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> References: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: OzuVkBAJQGDzU3QMoK397vMH9JOK5CcU X-Proofpoint-ORIG-GUID: OzuVkBAJQGDzU3QMoK397vMH9JOK5CcU X-Proofpoint-Spam-Reason: safe Suggested-by: Andy Shevchenko Signed-off-by: Charles Keepax --- No changes since v1. drivers/mfd/cs42l43.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c index 4e2bc5ad244a5..65a331481d975 100644 --- a/drivers/mfd/cs42l43.c +++ b/drivers/mfd/cs42l43.c @@ -55,8 +55,8 @@ struct cs42l43_patch_header { __le16 version; __le16 size; - u8 reserved; - u8 secure; + __u8 reserved; + __u8 secure; __le16 bss_size; __le32 apply_addr; __le32 checksum; From patchwork Wed Jan 24 15:30:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 13529347 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 41D347A73E; Wed, 24 Jan 2024 15:30:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110229; cv=none; b=dHUUsKOGF4RksU70FWNSmy/ViiOhF9VhMXZ2Wr7un0LvHrmM4mqvkiiPuhAg9jRzo6Ht452tdZ2HryyNeZJUEb/bUqEst1y9oSdr0qubOMdH+2pcyhG200xZSl7kZygv1L/FvJF9spMpM45XS3f5V9UheTI98/6L29umuL+GuQY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110229; c=relaxed/simple; bh=q1qljiRKaxjntRw5kG7QwnLqBgJ0tPa/yRRn7mQMqbE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZzuYO2Jsf9jD1W2/okK+p/Q/RIikKZeS3mOwgy7uvRfDPqBhmUj4SY47D/Wf/xBD477UVS4jhGR7tE9J58a3rQ2VppFjw2qHrwoQ4SHBuuhruLHcqjiF/SsssiNxgYUfO9K13K/HrW8d6Nj5a4CgH2LnA93aVtNepJx5TwQi6yk= 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=HWPNmwS5; arc=none smtp.client-ip=67.231.152.168 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="HWPNmwS5" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40O8MvMp030107; Wed, 24 Jan 2024 09:30:21 -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=DjhIKQsx+swONFXaIPFE3+Q7LSkupW8SdUx6aCYcm08=; b= HWPNmwS5/OVqhYrm/vEuYjjefPPFMufxudHfOgq0uSm3fRhq2U173znDXxXIHNJR PKKF6U4wSV6VNm+5QCS2NpCr6vUbqpRQn7bmsmwcKHNUWSKjXSx6LHVa/ibh2hEb P9DPbhVkvyJCHIe6U8viVIkVYMS8nm4FzNnvpNIV7uvcQjUAmsjcemzWwjUB9/Ut 5P5KWKkuuNLCTHIr6yKRAUtei1ZCvUMqpa3hr9GFA6Gyas850QUkNYPzYQhI0v/K 2q1mAJV44O6fu85KjVBCCMW1BMg0eyCoRT2P6yr8PVBIlfobJCL8/vWMlgrLP/Th mJLCYkc8WATva3vt8N7dig== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3vtmf9ryqc-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 09:30:20 -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; Wed, 24 Jan 2024 15:30:16 +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; Wed, 24 Jan 2024 15:30:16 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id BAFC7820249; Wed, 24 Jan 2024 15:30:16 +0000 (UTC) From: Charles Keepax To: , CC: , , , , Subject: [PATCH v2 4/6] mfd: cs42l43: Add time postfixes on defines Date: Wed, 24 Jan 2024 15:30:14 +0000 Message-ID: <20240124153016.1541616-4-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> References: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: _wosBvJXISbzl8day1vReIkCMywQVGoO X-Proofpoint-ORIG-GUID: _wosBvJXISbzl8day1vReIkCMywQVGoO X-Proofpoint-Spam-Reason: safe Suggested-by: Andy Shevchenko Signed-off-by: Charles Keepax --- No changes since v1. drivers/mfd/cs42l43.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c index 65a331481d975..aea0f8f485785 100644 --- a/drivers/mfd/cs42l43.c +++ b/drivers/mfd/cs42l43.c @@ -27,30 +27,30 @@ #include "cs42l43.h" -#define CS42L43_RESET_DELAY 20 +#define CS42L43_RESET_DELAY_MS 20 -#define CS42L43_SDW_ATTACH_TIMEOUT 500 -#define CS42L43_SDW_DETACH_TIMEOUT 100 +#define CS42L43_SDW_ATTACH_TIMEOUT_MS 500 +#define CS42L43_SDW_DETACH_TIMEOUT_MS 100 #define CS42L43_MCU_BOOT_STAGE1 1 #define CS42L43_MCU_BOOT_STAGE2 2 #define CS42L43_MCU_BOOT_STAGE3 3 #define CS42L43_MCU_BOOT_STAGE4 4 -#define CS42L43_MCU_POLL 5000 -#define CS42L43_MCU_CMD_TIMEOUT 20000 +#define CS42L43_MCU_POLL_US 5000 +#define CS42L43_MCU_CMD_TIMEOUT_US 20000 #define CS42L43_MCU_UPDATE_FORMAT 3 #define CS42L43_MCU_UPDATE_OFFSET 0x100000 -#define CS42L43_MCU_UPDATE_TIMEOUT 500000 +#define CS42L43_MCU_UPDATE_TIMEOUT_US 500000 #define CS42L43_MCU_UPDATE_RETRIES 5 #define CS42L43_MCU_SUPPORTED_REV 0x2105 #define CS42L43_MCU_SHADOW_REGS_REQUIRED_REV 0x2200 #define CS42L43_MCU_SUPPORTED_BIOS_REV 0x0001 -#define CS42L43_VDDP_DELAY 50 -#define CS42L43_VDDD_DELAY 1000 +#define CS42L43_VDDP_DELAY_US 50 +#define CS42L43_VDDD_DELAY_US 1000 -#define CS42L43_AUTOSUSPEND_TIME 250 +#define CS42L43_AUTOSUSPEND_TIME_MS 250 struct cs42l43_patch_header { __le16 version; @@ -538,10 +538,10 @@ static int cs42l43_soft_reset(struct cs42l43 *cs42l43) regcache_cache_only(cs42l43->regmap, true); regmap_multi_reg_write_bypassed(cs42l43->regmap, reset, ARRAY_SIZE(reset)); - msleep(CS42L43_RESET_DELAY); + msleep(CS42L43_RESET_DELAY_MS); if (cs42l43->sdw) { - unsigned long timeout = msecs_to_jiffies(CS42L43_SDW_DETACH_TIMEOUT); + unsigned long timeout = msecs_to_jiffies(CS42L43_SDW_DETACH_TIMEOUT_MS); unsigned long time; time = wait_for_completion_timeout(&cs42l43->device_detach, timeout); @@ -561,7 +561,7 @@ static int cs42l43_soft_reset(struct cs42l43 *cs42l43) static int cs42l43_wait_for_attach(struct cs42l43 *cs42l43) { if (!cs42l43->attached) { - unsigned long timeout = msecs_to_jiffies(CS42L43_SDW_ATTACH_TIMEOUT); + unsigned long timeout = msecs_to_jiffies(CS42L43_SDW_ATTACH_TIMEOUT_MS); unsigned long time; time = wait_for_completion_timeout(&cs42l43->device_attach, timeout); @@ -603,7 +603,7 @@ static int cs42l43_mcu_stage_2_3(struct cs42l43 *cs42l43, bool shadow) ret = regmap_read_poll_timeout(cs42l43->regmap, CS42L43_BOOT_STATUS, val, (val == CS42L43_MCU_BOOT_STAGE3), - CS42L43_MCU_POLL, CS42L43_MCU_CMD_TIMEOUT); + CS42L43_MCU_POLL_US, CS42L43_MCU_CMD_TIMEOUT_US); if (ret) { dev_err(cs42l43->dev, "Failed to move to stage 3: %d, 0x%x\n", ret, val); return ret; @@ -652,7 +652,7 @@ static int cs42l43_mcu_disable(struct cs42l43 *cs42l43) ret = regmap_read_poll_timeout(cs42l43->regmap, CS42L43_SOFT_INT_SHADOW, val, (val & CS42L43_CONTROL_APPLIED_INT_MASK), - CS42L43_MCU_POLL, CS42L43_MCU_CMD_TIMEOUT); + CS42L43_MCU_POLL_US, CS42L43_MCU_CMD_TIMEOUT_US); if (ret) { dev_err(cs42l43->dev, "Failed to disable firmware: %d, 0x%x\n", ret, val); return ret; @@ -696,7 +696,7 @@ static void cs42l43_mcu_load_firmware(const struct firmware *firmware, void *con ret = regmap_read_poll_timeout(cs42l43->regmap, CS42L43_SOFT_INT_SHADOW, val, (val & CS42L43_PATCH_APPLIED_INT_MASK), - CS42L43_MCU_POLL, CS42L43_MCU_UPDATE_TIMEOUT); + CS42L43_MCU_POLL_US, CS42L43_MCU_UPDATE_TIMEOUT_US); if (ret) { dev_err(cs42l43->dev, "Failed to update firmware: %d, 0x%x\n", ret, val); cs42l43->firmware_error = ret; @@ -957,7 +957,7 @@ static int cs42l43_power_up(struct cs42l43 *cs42l43) } /* vdd-p must be on for 50uS before any other supply */ - usleep_range(CS42L43_VDDP_DELAY, 2 * CS42L43_VDDP_DELAY); + usleep_range(CS42L43_VDDP_DELAY_US, 2 * CS42L43_VDDP_DELAY_US); gpiod_set_value_cansleep(cs42l43->reset, 1); @@ -973,7 +973,7 @@ static int cs42l43_power_up(struct cs42l43 *cs42l43) goto err_core_supplies; } - usleep_range(CS42L43_VDDD_DELAY, 2 * CS42L43_VDDD_DELAY); + usleep_range(CS42L43_VDDD_DELAY_US, 2 * CS42L43_VDDD_DELAY_US); return 0; @@ -1057,7 +1057,7 @@ int cs42l43_dev_probe(struct cs42l43 *cs42l43) if (ret) return ret; - pm_runtime_set_autosuspend_delay(cs42l43->dev, CS42L43_AUTOSUSPEND_TIME); + pm_runtime_set_autosuspend_delay(cs42l43->dev, CS42L43_AUTOSUSPEND_TIME_MS); pm_runtime_use_autosuspend(cs42l43->dev); pm_runtime_set_active(cs42l43->dev); /* From patchwork Wed Jan 24 15:30:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 13529345 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 E70417A714; Wed, 24 Jan 2024 15:30:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110228; cv=none; b=RDlo6FOIa6lVB/xDl6cagZecAve23hwzloncdWSw0pJqXvaSUm/yXiVydoKCGALesJz/jUlO+reWgGUMU4RT0/CYYSH1WQnhPxw/g8QJ4Gp8/R8G81ATdEX0eOn5QETqq56Rt/lwDiG0ElEtMvofC0jfp3GTzDMkcvxzocYu2TM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110228; c=relaxed/simple; bh=t5tlNEvlXgAxKg4SMJL4JOiD4JdYo0qP/3NyA5o+14E=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=R03Ef0cEPDTMhhpMLyXWAhvqvCyCUVyXB0edU0HzQoBZlxRThNw2E95pynY1ILITTtFpCG4YomACJ7mAsTNZlLPk5ebOloedZL6yjUXf2x9yIIMAMK8IDMjbdPKW3DhMxYkhD0kor6yW6cEMK8BKZMEZ/72MyrxpCI4cJdtESxk= 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=EE/CxP9H; arc=none smtp.client-ip=67.231.152.168 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="EE/CxP9H" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40O8MvMm030107; Wed, 24 Jan 2024 09:30:19 -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=T04BEboBcsX0FcHCR9rWpO+dAdCpJVUhGdtiAcCuucc=; b= EE/CxP9Hh7gakcwOtkYUpMdpf+PgtEoZJuAYEiI6YdJouXb7xn96CnC9gaSEk4OA 1/xTylo8tW1MaTmG0iXlNYmt3Hp7Z2FrGPWYXlHaZvh945/kaVYW5OoJFLy71ga5 Wxbauun9nADMllMhi3Ui6ZH6kNfw5K2mzc1xgkkN+0mKMTAdbGMX6OAcUzam700X 2nWZXBEXcsB/Calv9vTEG9Zviy8W38YjP9udqzotIMy3Ex/vEI9gE1OiO/J8N2sY IzJJY8y7isJaQZ2Tui4ug6gsYJMPUbJ1NtFh4GyAIb279jds0zFxu6vknwo4NsUG fLAwpFGbAS78lguYJEBsfw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3vtmf9ryqc-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 09:30:18 -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; Wed, 24 Jan 2024 15:30:16 +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; Wed, 24 Jan 2024 15:30:16 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id BE07282024A; Wed, 24 Jan 2024 15:30:16 +0000 (UTC) From: Charles Keepax To: , CC: , , , , Subject: [PATCH v2 5/6] mfd: cs42l43: Add some missing dev_err_probes Date: Wed, 24 Jan 2024 15:30:15 +0000 Message-ID: <20240124153016.1541616-5-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> References: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: OeqhVnh9doqIPa-YSbmx56hpop6DrezP X-Proofpoint-ORIG-GUID: OeqhVnh9doqIPa-YSbmx56hpop6DrezP X-Proofpoint-Spam-Reason: safe Use of dev_err_probe was missed in the i2c and sdw parts of the code, update the missing parts. Suggested-by: Andy Shevchenko Signed-off-by: Charles Keepax --- No changes since v1. drivers/mfd/cs42l43-i2c.c | 9 +++------ drivers/mfd/cs42l43-sdw.c | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/mfd/cs42l43-i2c.c b/drivers/mfd/cs42l43-i2c.c index 7162274a0b551..c9e4ea76149a8 100644 --- a/drivers/mfd/cs42l43-i2c.c +++ b/drivers/mfd/cs42l43-i2c.c @@ -38,7 +38,6 @@ static const struct regmap_config cs42l43_i2c_regmap = { static int cs42l43_i2c_probe(struct i2c_client *i2c) { struct cs42l43 *cs42l43; - int ret; cs42l43 = devm_kzalloc(&i2c->dev, sizeof(*cs42l43), GFP_KERNEL); if (!cs42l43) @@ -50,11 +49,9 @@ static int cs42l43_i2c_probe(struct i2c_client *i2c) cs42l43->attached = true; cs42l43->regmap = devm_regmap_init_i2c(i2c, &cs42l43_i2c_regmap); - if (IS_ERR(cs42l43->regmap)) { - ret = PTR_ERR(cs42l43->regmap); - dev_err(cs42l43->dev, "Failed to allocate regmap: %d\n", ret); - return ret; - } + if (IS_ERR(cs42l43->regmap)) + return dev_err_probe(cs42l43->dev, PTR_ERR(cs42l43->regmap), + "Failed to allocate regmap\n"); return cs42l43_dev_probe(cs42l43); } diff --git a/drivers/mfd/cs42l43-sdw.c b/drivers/mfd/cs42l43-sdw.c index d6962a5a35f65..65f7b1d782486 100644 --- a/drivers/mfd/cs42l43-sdw.c +++ b/drivers/mfd/cs42l43-sdw.c @@ -171,7 +171,6 @@ static int cs42l43_sdw_probe(struct sdw_slave *sdw, const struct sdw_device_id * { struct cs42l43 *cs42l43; struct device *dev = &sdw->dev; - int ret; cs42l43 = devm_kzalloc(dev, sizeof(*cs42l43), GFP_KERNEL); if (!cs42l43) @@ -181,11 +180,9 @@ static int cs42l43_sdw_probe(struct sdw_slave *sdw, const struct sdw_device_id * cs42l43->sdw = sdw; cs42l43->regmap = devm_regmap_init_sdw(sdw, &cs42l43_sdw_regmap); - if (IS_ERR(cs42l43->regmap)) { - ret = PTR_ERR(cs42l43->regmap); - dev_err(cs42l43->dev, "Failed to allocate regmap: %d\n", ret); - return ret; - } + if (IS_ERR(cs42l43->regmap)) + return dev_err_probe(cs42l43->dev, PTR_ERR(cs42l43->regmap), + "Failed to allocate regmap\n"); return cs42l43_dev_probe(cs42l43); } From patchwork Wed Jan 24 15:30:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charles Keepax X-Patchwork-Id: 13529343 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 9ADD27A707; Wed, 24 Jan 2024 15:30:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=67.231.152.168 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110228; cv=none; b=X7qe0K3Ndjt09ljaNlki6+QWrYbk8BSKltBixlRrBaLvJfvLZeaTWQ28pfhBz+xVjQCZsYcrNWPNLylVnZbYuJxQJ6pmwHGJ2vhaM8Y4NwtWyOrbrkL//OzASy3/9FUJBt+EycMWRvG4/nOsHFuQgU//uFNG4Ox2eK5PAJqcH68= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706110228; c=relaxed/simple; bh=dwNSFLpQJ15WSNLHQJc0HWdI5vgJK4PLbibeEt3onbM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=R9yqIV4h6u4ESD1wXfBMaPlb6umB5pyVHbkIEG+3RaN+sQI5icuQmsWg3V3YVitzRnZvSYgxCfr/kP1U2tAIIc9UHMnV77V+xASAVs0QOlZreJfqOxYsvhpajXgb5jVYc4GU46GnTPRflzWejqNdDqrT4oYCuwi8TLQofXTx4JU= 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=m3cpJ6vr; arc=none smtp.client-ip=67.231.152.168 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="m3cpJ6vr" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40O8MvMn030107; Wed, 24 Jan 2024 09:30:19 -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=3wVnz+qTDhd7ewymUmUS+IuKvNXLSEtQi0GPLXhpiT0=; b= m3cpJ6vr/YsEf11Pw5ubyLoyQUN5DQGyV0NH7Y41V7Z+oRk9aHEoKwSwzexEUK+T EpjpRsej/rMkxErRj58nk8ZN5ZrtmA2W6x+fL87NIAwmC7iaasUxbks6xhkxHFfm G/m2gSluhoAvxmwQUyg4r6M3F4jVt/HBAjETHak8vCn5n0jVVVdtBO5ofltWUoCV 4Pi3EDoA5xIUQOgPAgmBZ9NonPEJ/mDsvQx6ZK4ET/nknOQEGMM5wPA2YuhPoeN5 o2fQAudasr+J+A6vFf0AbT73RC+O+95f//oy6Wx8mibsVwT/SU0ELKKaNcKMf//b dqt51C/Rc6q4cqV+G0OG1w== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3vtmf9ryqc-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 24 Jan 2024 09:30:19 -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; Wed, 24 Jan 2024 15:30:16 +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; Wed, 24 Jan 2024 15:30:16 +0000 Received: from ediswws07.ad.cirrus.com (ediswws07.ad.cirrus.com [198.90.208.14]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTP id CAFCB82024B; Wed, 24 Jan 2024 15:30:16 +0000 (UTC) From: Charles Keepax To: , CC: , , , , Subject: [PATCH v2 6/6] mfd: cs42l43: Handle error from devm_pm_runtime_enable Date: Wed, 24 Jan 2024 15:30:16 +0000 Message-ID: <20240124153016.1541616-6-ckeepax@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> References: <20240124153016.1541616-1-ckeepax@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-spi@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Proofpoint-GUID: c8Z7e5c67-GQC_sft4G-zoF0go-TruDf X-Proofpoint-ORIG-GUID: c8Z7e5c67-GQC_sft4G-zoF0go-TruDf X-Proofpoint-Spam-Reason: safe As it devm_pm_runtime_enable can fail due to memory allocations, it is best to handle the error. Suggested-by: Andy Shevchenko Signed-off-by: Charles Keepax --- No changes since v1. drivers/mfd/cs42l43.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/cs42l43.c b/drivers/mfd/cs42l43.c index aea0f8f485785..56bd9dbbe10b0 100644 --- a/drivers/mfd/cs42l43.c +++ b/drivers/mfd/cs42l43.c @@ -1065,7 +1065,9 @@ int cs42l43_dev_probe(struct cs42l43 *cs42l43) * the boot work runs. */ pm_runtime_get_noresume(cs42l43->dev); - devm_pm_runtime_enable(cs42l43->dev); + ret = devm_pm_runtime_enable(cs42l43->dev); + if (ret) + return ret; queue_work(system_long_wq, &cs42l43->boot_work);