From patchwork Mon Jun 17 13:50:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Trevor Gamblin X-Patchwork-Id: 13700664 Received: from mail-qk1-f180.google.com (mail-qk1-f180.google.com [209.85.222.180]) (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 42C9E1C9EDC for ; Mon, 17 Jun 2024 13:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718632232; cv=none; b=KMb/uUgm4Zb2S4xLBBsrPQBfrSJWikwrRQn8uddS+eGJPWNxlMde8lR/aO7nlaYnz15nHFcfiI8j+NxLd4XyD8U1b2l6LMC3E73F403Jr4d5kb7eG0f9i1QjUCTh0tHV+0f4M1GvKlIDxSmlh7nK8S2RvWUxqk84izBselSqlvQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718632232; c=relaxed/simple; bh=QPP25hzXGRebbNyApfbw/ePtiR6pqeVKltbiG7kR1ck=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SVt8pE/j1aZtDuIe4VfwEL4wg56/tc3M5MrXqILtOLZ+CRDeZhjCAKgqBxQ2YYa1Xxml4UBYAtm5ve9VlIuhIkCJLDARv4n3/8PoeXjac2mbRYznt4a/K+EtdOf10qFPJ1GnzikvEu6kfln15SFVSUl9G8fhV+s8qkFbjMKHUW8= 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=MChG/Nlg; arc=none smtp.client-ip=209.85.222.180 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="MChG/Nlg" Received: by mail-qk1-f180.google.com with SMTP id af79cd13be357-79550284502so267251885a.2 for ; Mon, 17 Jun 2024 06:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718632230; x=1719237030; darn=vger.kernel.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=DerxFnnoYXb7MP4GOUVN2xlgxjAao77OyLSOrDCydO0=; b=MChG/NlgqN5oIvipm7hig1cOCo00rbrUJSOPK8uKNfGR9JLzg8p3IidvCtg350jeID HCzsEjsaCgEMs7kAkQ4SJois0nIxP8JOP5CcaugPfWkITTvWHSZGNYiibZyyx9yF2JQM +kg4BUEEoKyy61PxiPJMw3/A7tT16RBrAJXLQrUjsgfKJHy5ChaomO4uh8cDam3QpA5k yMM6/V9AoVmTqUuJEbwRzYuoiWmlRndO/p6xdH6rUMidpca9ilsyEvE8R9mIugQEVP6X 5/xtNr7Ksz3oQb51gHNtRLkOep75NR4BiVAnK0oX2fbMBvc7IlLhZO6GR2Lh08tjIS1n awtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718632230; x=1719237030; 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=DerxFnnoYXb7MP4GOUVN2xlgxjAao77OyLSOrDCydO0=; b=N8x8fzFaL87LiGzC6HH8xc7F5gh4pY1mJbgF4J/ouA9tZroe+ZzLF4PikUVVT7jkOL bJk5sbOPtsmnmDWgC/7lg8At3pkJjMGK6DxwHH0nE1jF4l4x9KFkT5Y0zUPqMIin+lam JH0qQARekfUWhLTbD/qB5Fg87cu8S935ReSjQ82KXSMZd4CFFQLG95XAnbRvjsFH4pAJ DONXZ+XOxYOhQ79V6IFbRyWnp+aKjgLWd91tRzbIRvG4Pfs113Z23Ja3ia6avWG0H7ML f0zJp6spfLKW6Ui+3slf68eHNEztt6O4LTkzDt0CVHmPH7UxmUmKtmFUDDcn/ouwG4FX +aPA== X-Gm-Message-State: AOJu0Yygdb9LY2yB5IpUCeCh+Tmyqae3tozh9L86TIV78mchBe7GTuxE DBoE4W6ydwGgWzn/FFOwjcxFQnEp75qPddrsW07/2/gV10ud2/FDVi1meG3Z/nI= X-Google-Smtp-Source: AGHT+IHxtzkdFJwlDchh8tO2N+M/GUfc/zgUMeSNzO08CBN63HSCP+uPJVwg8RWxzdMRcwiKU/TPZA== X-Received: by 2002:a05:620a:2443:b0:795:4e2c:eabf with SMTP id af79cd13be357-798d240dcf1mr1259752585a.26.1718632229931; Mon, 17 Jun 2024 06:50:29 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 06:50:29 -0700 (PDT) From: Trevor Gamblin Date: Mon, 17 Jun 2024 09:50:01 -0400 Subject: [PATCH v3 21/41] iio: gyro: bmg160_core: make use of regmap_clear_bits() Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240617-review-v3-21-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 --- drivers/iio/gyro/bmg160_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c index 0e2eb0e98235..10728d5ccae3 100644 --- a/drivers/iio/gyro/bmg160_core.c +++ b/drivers/iio/gyro/bmg160_core.c @@ -285,8 +285,8 @@ static int bmg160_chip_init(struct bmg160_data *data) data->slope_thres = val; /* Set default interrupt mode */ - ret = regmap_update_bits(data->regmap, BMG160_REG_INT_EN_1, - BMG160_INT1_BIT_OD, 0); + ret = regmap_clear_bits(data->regmap, BMG160_REG_INT_EN_1, + BMG160_INT1_BIT_OD); if (ret < 0) { dev_err(dev, "Error updating bits in reg_int_en_1\n"); return ret;