From patchwork Mon Jun 17 13:50:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Trevor Gamblin X-Patchwork-Id: 13700793 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 11B4BC27C79 for ; Mon, 17 Jun 2024 13:53:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :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=wF3vdOViNuSZHyOEpmAAcheUvRTK8pguc3p24rzfUPw=; b=0oaLIIaChpCQos 8+1c2IHvoQLjMPAITWVT/ao7DQoX9yA0FQvXIPdafta8EJPAz6mLJ3hhQOSMsclzYLKyIcO1nrajI Tq7dI9O7+eCb3kc2LOPbtwGErZZnFhtVhz8e1UCgKyweNhn767lOpa4PLAPCT3x5h4eFvkvNkyANr 64h5X+WlgWuVYCzfG+lC09L3qIDEUAXe8lDijUf/nDflLcMOMV5TvpzZYipnMMg3rbFqD/knyMbVL 5lYOWaPSQ1HBAhftqRgtnZbyph7FOCr6r0nplk6WQj+0HC5c7uGCfhzw+C3zoX0Q07VDn6+hAYZiO fhheq9aqjeJPK7nfEG3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJCnf-0000000Aza0-3ddp; Mon, 17 Jun 2024 13:53:35 +0000 Received: from mail-vs1-xe2c.google.com ([2607:f8b0:4864:20::e2c]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJCky-0000000AxYO-3ihh for linux-amlogic@lists.infradead.org; Mon, 17 Jun 2024 13:50:55 +0000 Received: by mail-vs1-xe2c.google.com with SMTP id ada2fe7eead31-48c38cc7810so1292392137.0 for ; Mon, 17 Jun 2024 06:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718632247; x=1719237047; 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=DclUw90neJHmAEodckLVU1MrMAClwpCF1mlaeSjcN+U=; b=OjFPQkhl6K6SsrQ/CRGORZQTvU5S3AyOvJB0gdCQdYyPzeqmwZw06SzaOAqXDBZaJs 1yd21oXwFqMtGXskAtLgAKvF0LlDZR5awNL8KgXELcQgMr3S6X1dpA6iQTnnxANfqgjc QjG4oiIOh7bx8u7kud0dAw12YIjYLlZ5VOvGXHdF4AkoxDhrAuKzZ5SQ8x1oWCIoS/rU 48UW/Tyg7DmMqU+EBF9Av/awzKiE1AmKI9h8gRW9aAra4VbYQbsSb8dro55pGpY7bliE 4Mtd83eGsyi4kPGpz6XT010kXiSoZLTKs4l1gXDtopnBEjKfhHP3KbZMjypQVjOD62ZP RzqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718632247; x=1719237047; 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=DclUw90neJHmAEodckLVU1MrMAClwpCF1mlaeSjcN+U=; b=LeK7lpr1LZDCKrVRQP2Q7DeK/pNNr3V56sZ1khypXVQfK1aAK1cJkRSrQmeYZ3+DaP y+Oo68Ek/iJzzRcET2MHPGOXyzex0yIJdAoGdNb7qU/2xSqRh7FW3ja6jkKDzOhFRrcR jSYwEgWUZuIpSfw7VA0UPSsfBuTmvOxHF+rFa62v9qAL5+xKnbKVNIUKXhmDUfdP0Dkp mkkJVvVWJBa84YYAhAhEfFi/wo4XMj+8IqXRi/3OHw9SgpWab7QvfQLiBkmBRyFv7ZTO 1Rf8f/JeoRUVhvjIuH8Cmcp/ZeCbP7RV7KjZqzB5bDik+tZx2XSKlmB9Cioj+gzmkUU+ 8JzQ== X-Forwarded-Encrypted: i=1; AJvYcCUJXD8YxSK6/uiGBqmmDqZwxZH5aAmwzBrnqiTGV0uqTcU+wWwLPNFviuu87dW++/waacVfzxcarP5hmjXWORfgvLAe1d5xAKGKnB8Rw0lYWl8= X-Gm-Message-State: AOJu0Yy3KS5a4LV8jedqcWeQw/Pz81RDUB9rjnuWvv2L35P88+7KV8EI ISZSc+oGRzNoFxD8VYCZIMCiQv57q/5zTXSs6NBdp96Fkyxs1aCVa+uhJNIbsCI= X-Google-Smtp-Source: AGHT+IEubRIeXP7Kagp49NVByjjGeveFz51rlB4BKjhqfHfpKBEa7G7VixyRzOvMhLylvoLMhbPrtQ== X-Received: by 2002:a67:ec98:0:b0:48d:c0ab:ac20 with SMTP id ada2fe7eead31-48dc0abad12mr7057846137.7.1718632247057; Mon, 17 Jun 2024 06:50:47 -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.50.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 06:50:46 -0700 (PDT) From: Trevor Gamblin Date: Mon, 17 Jun 2024 09:50:09 -0400 Subject: [PATCH v3 29/41] iio: light: iqs621-als: make use of regmap_clear_bits() MIME-Version: 1.0 Message-Id: <20240617-review-v3-29-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_065049_156283_48161C3A X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-amlogic@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-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin --- drivers/iio/light/iqs621-als.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/iqs621-als.c b/drivers/iio/light/iqs621-als.c index 004ea890a4b2..6de33feada3a 100644 --- a/drivers/iio/light/iqs621-als.c +++ b/drivers/iio/light/iqs621-als.c @@ -86,8 +86,8 @@ static int iqs621_als_init(struct iqs621_als_private *iqs621_als) if (iqs621_als->prox_en) event_mask |= iqs62x->dev_desc->ir_mask; - return regmap_update_bits(iqs62x->regmap, IQS620_GLBL_EVENT_MASK, - event_mask, 0); + return regmap_clear_bits(iqs62x->regmap, IQS620_GLBL_EVENT_MASK, + event_mask); } static int iqs621_als_notifier(struct notifier_block *notifier,