From patchwork Mon Jun 17 13:50:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Trevor Gamblin X-Patchwork-Id: 13700827 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 4D6CCC2BB9A for ; Mon, 17 Jun 2024 13:54:04 +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=t8YULb8v1sn3GDlNsUVTylV3HxE+kmj1LUMr99y6lFU=; b=XbWQjhTLYpzA0d Dg+sQ0o9I0iOR/0hAlM1rqF9jfqN+gyDHpUyZlZLSOhstd5EDZMaZXOaBaj8w52hHP4c0nWsGREf5 Ash6nybnYk70k0NC64rU9FWPSOmwjULROATcxYintmwLrmQ4nV9AnRtSNUuuXp8HM8A34RKqM/gey 3sQzSCK+5DaZUVpkRdVTVx/vLyAJKXV/nhv04NCFjA0V/59mRb35iLMjuN3UwBz9vDvKli2dnhoYK Bz8+rl5vybClKf+yTegdn0eATijWptTeYC0Fmbw+HIkeNPDlQWUusdFYPwhc1WZAJ6njf4E3/GrXG /XXG+aK2oAZTu2+/8b/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJCo0-0000000AzsS-12pd; Mon, 17 Jun 2024 13:53:56 +0000 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sJCl2-0000000Axby-3urt for linux-amlogic@lists.infradead.org; Mon, 17 Jun 2024 13:50:58 +0000 Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-7955841fddaso361935285a.1 for ; Mon, 17 Jun 2024 06:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718632251; x=1719237051; 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=b+ymucZ3m6lrJGr3WTAeCvzidHKg4xOe2grvPyQxJhA=; b=cg3m+UNm5cj53SiOCopffSu2NrqsqVryVEFNFdIQ2hXMJcsvJQo++7XitZxgt5zlxB Wr9+hcNO9yCxxGweqiXArTiyE8iKuLVHMFhyQUQ4eVBTPzDQ2Ho82FKUT4BggamkdXEw SpyRd4mgH7lxwIEo6fqCqgBEc+P+IIeVwG8lgqcUk0bczTDx7Ra6SDCldl0jiynsXtek De3pF4e1+MDj51KBNO5K9FlMQ/ExP+Rd+d+05S8QLDX2iCjrsKyz0EBpYjSllaqh/xYQ pQfzgniJvZzr5DkJltiGPokl+X5YzWub84S2lZpxIlWa3DYeFSEnzHTz/VQ0YE70fEdN wL7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718632251; x=1719237051; 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=b+ymucZ3m6lrJGr3WTAeCvzidHKg4xOe2grvPyQxJhA=; b=CVVdsZZEonvW9wkn/qjthdAD0ah6pOtsWz4gZqqOt3gvsfv8Zjm1BPFTXCkQ5FkjMA r/36WW6dxNLF4w00LpthtMqJDjm6uDTQI0bnAjuHy+osRHOCXgjsgFgTGPGjAdmAEJjW UHrxln7NC6QLgYvpOdDvuvJG/xpMIJHgOdmQrDr71QwEFyxdViDQjG5RQHdc34uk6k/D dEL79YOs/Oms9GK7ArlMl3kGS3znQYUUI4xz6cOQ+EuRJmHFOlk5EpeRfTWuiGKyy+wS Bb04JOmWCJNXCNdrE5epHfM2wU//yyLis2tc8x9pGGnBuUDhAZ5zWfwISCYphDMAQ2Yq j1fQ== X-Forwarded-Encrypted: i=1; AJvYcCXpX9BTlC1bq1KlDu1pr2U82bhxcD9NfSt5n8RoYqlR9IQa0uImrlYkG60w0DH/o1AiheNDSc4exwn4D4MtQjaIbF1aGfzBj05kbtCmEKKLjwQ= X-Gm-Message-State: AOJu0Yym9o58P8paTAs0eGbqdpG0lyxinUYH037G+hPi+/PKOeU4nEsu lxzjR8nyc137oY7xwOQpPXo6BzWcYGLadckRnbQez/9wmUUfbjTAh5oYtJiX4Eo= X-Google-Smtp-Source: AGHT+IFhD2JefGeiJgsg6Ae7QRIe/BDndSP0Z/WiCRPC91zIn6+wpqBzLsiQzn3/JIP4kN+hagVe4g== X-Received: by 2002:a05:620a:4056:b0:795:56a1:6c0a with SMTP id af79cd13be357-798d03b78c4mr1852443685a.30.1718632251285; Mon, 17 Jun 2024 06:50:51 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 06:50:51 -0700 (PDT) From: Trevor Gamblin Date: Mon, 17 Jun 2024 09:50:11 -0400 Subject: [PATCH v3 31/41] iio: light: st_uvis25_core: make use of regmap_clear_bits() MIME-Version: 1.0 Message-Id: <20240617-review-v3-31-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_065053_315826_5D1F29ED X-CRM114-Status: GOOD ( 10.23 ) 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/st_uvis25_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/st_uvis25_core.c b/drivers/iio/light/st_uvis25_core.c index d4e17079b2f4..fba3997574bb 100644 --- a/drivers/iio/light/st_uvis25_core.c +++ b/drivers/iio/light/st_uvis25_core.c @@ -330,8 +330,8 @@ static int st_uvis25_suspend(struct device *dev) struct iio_dev *iio_dev = dev_get_drvdata(dev); struct st_uvis25_hw *hw = iio_priv(iio_dev); - return regmap_update_bits(hw->regmap, ST_UVIS25_REG_CTRL1_ADDR, - ST_UVIS25_REG_ODR_MASK, 0); + return regmap_clear_bits(hw->regmap, ST_UVIS25_REG_CTRL1_ADDR, + ST_UVIS25_REG_ODR_MASK); } static int st_uvis25_resume(struct device *dev)