From patchwork Thu Apr 6 19:41:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 670872 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 61FE3C7618D for ; Thu, 6 Apr 2023 19:42:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237563AbjDFTmR (ORCPT ); Thu, 6 Apr 2023 15:42:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237451AbjDFTmP (ORCPT ); Thu, 6 Apr 2023 15:42:15 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 636BB7EFE; Thu, 6 Apr 2023 12:42:13 -0700 (PDT) Received: from localhost (unknown [188.27.34.213]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madras.collabora.co.uk (Postfix) with ESMTPSA id 1F05A66031CE; Thu, 6 Apr 2023 20:42:12 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1680810132; bh=lFOZ5esxl/tbYIcE53Cn4DHfBeM2O3R87VdL+HeZPkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nxcc6qsej83m4UnOh2Bw4Mg3nUltXYSpcBJbTaPeB9jYbEpc5JKhLWylwsoihVMsd SMKoWPoOSzypcittADYQE5s/bF6+N6ZFVqUDpT/XDcbCcoIg40o7DPnt0lcK53k3qU Skbwo9JPOb5DWIE+6zrGXobR2fObR8X2E6YVqmukj9NPT6zw5onEhSMEJCYabG61yx WtDiy3eXNmmXdHYow3Holqo6jUx59W/8EMpRNsa7cvKtkHtCl6dYeeDmW0NCErnnmK TlSW55gjmhBhxDxeDcZkbKXkKvPq4Wb9q4auv9PF+Wwg+0o4iVsASKceuCL0bfgP+/ CtHxguKZebQeQ== From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Bjorn Andersson , Joseph Chen , Ezequiel Garcia Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kernel@collabora.com Subject: [PATCH v3 3/8] regulator: fan53555: Fix wrong TCS_SLEW_MASK Date: Thu, 6 Apr 2023 22:41:53 +0300 Message-Id: <20230406194158.963352-4-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230406194158.963352-1-cristian.ciocaltea@collabora.com> References: <20230406194158.963352-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The support for TCS4525 regulator has been introduced with a wrong ramp-rate mask, which has been defined as a logical expression instead of a bit shift operation. For clarity, fix it using GENMASK() macro. Fixes: 914df8faa7d6 ("regulator: fan53555: Add TCS4525 DCDC support") Signed-off-by: Cristian Ciocaltea --- drivers/regulator/fan53555.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c index 0754c370a21c..4d2104c3a077 100644 --- a/drivers/regulator/fan53555.c +++ b/drivers/regulator/fan53555.c @@ -61,7 +61,7 @@ #define TCS_VSEL1_MODE (1 << 6) #define TCS_SLEW_SHIFT 3 -#define TCS_SLEW_MASK (0x3 < 3) +#define TCS_SLEW_MASK GENMASK(4, 3) enum fan53555_vendor { FAN53526_VENDOR_FAIRCHILD = 0,