From patchwork Mon Jun 17 13:49:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Trevor Gamblin X-Patchwork-Id: 13700730 Received: from mail-ua1-f43.google.com (mail-ua1-f43.google.com [209.85.222.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18F1B1BA876 for ; Mon, 17 Jun 2024 13:49:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718632191; cv=none; b=mCgfP8cAfSPQVJhEt6tZGyalJZDnID5scddNdFKy51I3ilP0Y00HRx1vOREdCmZVaKij7tskw2Gckv/G3ggj4ZcyCu1Oasc4CCWlaxb0q0pKzevoJ71By5JEaxel54TJ8hmeOC7tHgJ2K4gmr8AtVm6IVGIfBM8ubwZWNUA35Ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718632191; c=relaxed/simple; bh=yZg3W0CF/EzgkZiaio4uCiv0EYa6DTKX0nMHxwiSYDA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kKO4e8zs1aznmBJqAtHkxICrVMZJ0XkMRr583pPqV5KjF58zxAEFRS22+h2OOmUI7gK0OgUSxEZAAAHKHRLfo6nxVGFXO3uq8RDLrP14GQUFP+lAy4ijE7chQQ0qPhZJQ5Wereapz0nY/PH5kRAZLSiQNiAGkXBoNllrbx7m7mA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=cCViwIaf; arc=none smtp.client-ip=209.85.222.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="cCViwIaf" Received: by mail-ua1-f43.google.com with SMTP id a1e0cc1a2514c-80d6534e302so1379895241.0 for ; Mon, 17 Jun 2024 06:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718632189; x=1719236989; darn=lists.linux.dev; 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=8Zs4CGtswXRcL4r5zLR2D5+LAoG+l8N82wbiM+7ownU=; b=cCViwIaf0vZUVkgu9NUvKNc5fvslLmWrc+7EbfGBubwKLSiP+OdgeBN3XiCNP16ZDR vZEuFjbVbKIDS6UAWzDL3o61r+s4teFHUe/8JBkAI2ZbgDGzF4h3Fc+RFOQfLh244FC/ cashX6kydxt5EBz+e1BmJ+zUTuS1WuRh+duvsQ/OGYFJzK+h31NuU/973DE86IrEgbOO r9y7dy6KdqjvudiTj51MbdGB5xcDDVjFds/2/IcGIczar9gfmkWbqq3WZfApyP/FNEsJ 5soxXqt8FPogAIOWTE8L69gLYbHNzlnj5IXonHCgzQGsthk0AEuBFlGVIeEDUdyuvR55 EXTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718632189; x=1719236989; 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=8Zs4CGtswXRcL4r5zLR2D5+LAoG+l8N82wbiM+7ownU=; b=XxZm5z8CDPY49ABw7grzZvr/J9HnUYl9/ayZerV3ZS7g+U1yYWZG/CHFKsDQuxRfar ZNa9eGOohq90EhW1R+UHo8cuCbv2xzPCF36Mekr9fBlmToVm929/Hj1So6xztqFppHob RGbNswyG/EWY3GlOqadQLaApWgwQXrhQNbwlMrBZf+3HcErseiN3ZtDkVOc0bY4hMaYM QfQVCFT5oXWecFyzF0SiVTHUOQ9F2MBLn2LD3fwPzP1+w3EqyntEMISdhdQ4/HQ8W35C CnQd+E8XEIb/E5dB7FWgGgRfB8pwn2G4gRlwusNeY6AQWZXEtnMJbpd43ryD3zFCpURM ayPA== X-Forwarded-Encrypted: i=1; AJvYcCWATV55tbrY/bvbluzUXyOiGaEYCfv7yOeN2R1KhDVcTwAyc743AqcFyrfp4NVqFdvD5auMyfB5ZMPEDdaTZm60NwJz X-Gm-Message-State: AOJu0YxLBEDS9rt+dXGds4Gq59553xRSxDVxdN0FESevWG81U9ksxnwJ AcILkRMz8XXpTgm3GmGA5l1DLoXNhHq5waa8HkK1mJYX8yZ4fnqy141CZLqxPbg= X-Google-Smtp-Source: AGHT+IEFmgHtaGyOVxmPD/zpG+S8mAUnggR0FqGzztaCLAyq4bVNR5GtCNAnJm1CQv7c1xou1ffjIg== X-Received: by 2002:a67:b902:0:b0:48d:7702:99e2 with SMTP id ada2fe7eead31-48dae3e00c7mr8793212137.31.1718632188950; Mon, 17 Jun 2024 06:49:48 -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.49.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 06:49:48 -0700 (PDT) From: Trevor Gamblin Date: Mon, 17 Jun 2024 09:49:42 -0400 Subject: [PATCH v3 02/41] iio: accel: kxsd9: Make use of regmap_clear_bits() Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240617-review-v3-2-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 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 Reviewed-by: Linus Walleij --- drivers/iio/accel/kxsd9.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c index ba99649fe195..03ce032e06ff 100644 --- a/drivers/iio/accel/kxsd9.c +++ b/drivers/iio/accel/kxsd9.c @@ -370,10 +370,8 @@ static int kxsd9_power_down(struct kxsd9_state *st) * make sure we conserve power even if there are others users on the * regulators. */ - ret = regmap_update_bits(st->map, - KXSD9_REG_CTRL_B, - KXSD9_CTRL_B_ENABLE, - 0); + ret = regmap_clear_bits(st->map, KXSD9_REG_CTRL_B, + KXSD9_CTRL_B_ENABLE); if (ret) return ret;