From patchwork Mon Jun 17 13:50:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Trevor Gamblin X-Patchwork-Id: 13700835 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4EECBC2BA15 for ; Mon, 17 Jun 2024 13:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=1Tk27b9u+l0CzDHHIWu0wOizrcdk6I7Pf7l1UE2LHs0=; b=AhPsQ1ybhyjKqYAYabURBXmZiX EK4cGpTqTnT2nfxZ3LvoHlkN7WCocdazXTJGDDlzVIKdYKnPLHDU6ZfFZ5x8zHWq430Jj1j5jYgtT Fa9srY6P7H7A4C846NzNeN3Hl/KHMVZv7xctXZenOJU4Tw51mdiAjYU4FTQJoAGSmQDnZkXsd+v8S /s0TNMMQvubWcSLZGuGTPRph4/RnMwYuTLiwAkJRdGR6B21CZnP/zeINOAf5AK5/W6WVE27SamVlS N1iLqrZ3yWtcec+MqeBziL9G1mEenSYMgmHVfGuATlFON9s0eSKGYA9XqXZwnEGK1mNmywLCl3tmi qayiSKBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJCob-0000000B0MS-1hfP; Mon, 17 Jun 2024 13:54:33 +0000 Received: from mail-oa1-x30.google.com ([2001:4860:4864:20::30]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJClC-0000000AxlT-3yoN for linux-arm-kernel@lists.infradead.org; Mon, 17 Jun 2024 13:51:07 +0000 Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-24c9f628e71so2279958fac.1 for ; Mon, 17 Jun 2024 06:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718632262; x=1719237062; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1Tk27b9u+l0CzDHHIWu0wOizrcdk6I7Pf7l1UE2LHs0=; b=ZRW2ww0NDW4aYlhCaME/E9vKjcSlkZcGcaiSyVic59a87F3AETdPZsaiz6zph5vGTH nM34dS38371T4224w6ByUCPjAhz1iL7EmF5oXXc5EfXro7/4v54ijTrMmZygPJbfgJSL LB098r6L1aYUYGFx8lg/hKyt4u+Xcb+Tc/zjFZLMK9R0s1TiN+EYb6izxo4EGEV3BX/u q7dMrn2sjsHHuL4Ng/BgqzXjBNRRuTDtjrNRZF7A3njS/G+BRc467LQsV7Vh2NVPCpH9 eBfw9Artxq57vFpZFHpjnJLmEcYYrzOWYx4HqJhFUEe5TLizMFinT8JQM56DtAYpGJXg /7Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718632262; x=1719237062; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1Tk27b9u+l0CzDHHIWu0wOizrcdk6I7Pf7l1UE2LHs0=; b=MXuodeK7td2ereTiv4hl/az0ikPVsYjzLXL3KTnAOaA/coPgKTtwqJHtxxPu1K43CE pdd0MpJJLk6u7xxqnzAKsVvTWzlTC1UbzAeohhy+ub0sZBPBjJhNuahhoPUJ+HPpMLIU ssCN0crnAhylsfWJz9a2jm660pmC1gG8QPHdh7M+IGmyexv4tqvAwSYU77ET0nEcMN8D svN1Ds9y+d6iEcDzO4ye9cNeN7coLJ5MmGPiZ1tYixBiOaOB1UjT8WkCC2ghmM/9/BF0 ADXv6RoNkqGO2vph9HkErZNWk7DmCI7ZWD0w1jzv0MhegrGGq1iy6OYX/ygiJU3N6ddM FnFg== X-Forwarded-Encrypted: i=1; AJvYcCU5JEprX65Na9ELwiLNcz//9EnKU7SxvQ7tAm1/1vjxUbws/l6z8dpHCn+7PWrA/TnJNm2H5c5e751lnfjIpzK6xpDS+RBx6F9B1G3H5a4cMRgBP2o= X-Gm-Message-State: AOJu0Ywnwx6bsgZHaxNOhLq512YCVeiddHlH3p7+vOk3MFLsyU8GEkhV G6bE2R12oJzpLsljbGB1zmREX4+JMVg+nsGY1iRR7fzskLnPBHmX9tCtQyeZvSg= X-Google-Smtp-Source: AGHT+IFPuCaLYR0OC2CKxxs6bVWzV0l0Y4GqKpcVsLYm2jLp2HnQirR7TaXtLxRY2U4vfGwAEVGQmA== X-Received: by 2002:a05:6870:89a4:b0:254:7471:56b7 with SMTP id 586e51a60fabf-25842853b1bmr11345694fac.11.1718632262042; Mon, 17 Jun 2024 06:51:02 -0700 (PDT) Received: from megalith.oryx-coho.ts.net (d24-150-219-207.home.cgocable.net. [24.150.219.207]) by smtp.gmail.com with ESMTPSA id af79cd13be357-798aaecc004sm432892285a.31.2024.06.17.06.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 06:51:01 -0700 (PDT) From: Trevor Gamblin Date: Mon, 17 Jun 2024 09:50:16 -0400 Subject: [PATCH v3 36/41] iio: proximity: sx9324: make use of regmap_set_bits() MIME-Version: 1.0 Message-Id: <20240617-review-v3-36-88d1338c4cca@baylibre.com> References: <20240617-review-v3-0-88d1338c4cca@baylibre.com> In-Reply-To: <20240617-review-v3-0-88d1338c4cca@baylibre.com> To: Jonathan Cameron , Lars-Peter Clausen , Dmitry Rokosov , Michael Hennerich , Cosmin Tanislav , Chen-Yu Tsai , Hans de Goede , Ray Jui , Scott Branden , Broadcom internal kernel review list , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Neil Armstrong , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Saravanan Sekar , Orson Zhai , Baolin Wang , Chunyan Zhang , Maxime Coquelin , Alexandre Torgue , =?utf-8?q?Nuno_S=C3=A1?= , Linus Walleij , Jean-Baptiste Maneyrol , Crt Mori Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Trevor Gamblin X-Mailer: b4 0.13.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240617_065103_207064_283728AD X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin --- drivers/iio/proximity/sx9324.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/proximity/sx9324.c b/drivers/iio/proximity/sx9324.c index aa0d14a49d5e..629f83c37d59 100644 --- a/drivers/iio/proximity/sx9324.c +++ b/drivers/iio/proximity/sx9324.c @@ -835,9 +835,8 @@ static int sx9324_init_compensation(struct iio_dev *indio_dev) int ret; /* run the compensation phase on all channels */ - ret = regmap_update_bits(data->regmap, SX9324_REG_STAT2, - SX9324_REG_STAT2_COMPSTAT_MASK, - SX9324_REG_STAT2_COMPSTAT_MASK); + ret = regmap_set_bits(data->regmap, SX9324_REG_STAT2, + SX9324_REG_STAT2_COMPSTAT_MASK); if (ret) return ret;