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: 804955 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 F008D1C9ED3 for ; Mon, 17 Jun 2024 13:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718632232; cv=none; b=o29byvA5lwQuQTJtYtJ8gPOBa+Ynd3y+gJZ+dr4TvnHTPshqrLOUlMOZlSZxvbH0QJtaDEAMoniEj1ksYTzRTd/l+7IvlY34Jb2yLa63sV31pBKaiUMaIusT6c57gVSc7st+i5Wn9x9Lg3cD4yNESj2u67lvLF7Prw3aTmVP+AQ= 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.169 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-f169.google.com with SMTP id af79cd13be357-795ca45c54cso246594985a.0 for ; Mon, 17 Jun 2024 06:50:30 -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=eI1hQGpa1XvgLRkhj9bt/NpbKyALYw/XyDn8tgJA52E8HXVxGBcdwprktZXC0k1ktI qmptUbAGpRxUAICtizuhb8ocLKDplDwAs8MWQc9SNKvE/csjcGpu8wk7nyrijJA0+BVA wjVFdwJp31501+lpeCRXTC750i8XjSgu/Q9CG+SB82pRWsgsBB5oV/vCsijuSXlsUQ5n 5S9se9fMoVXxvV/cUJnRF6ItwTtbnW07/G0ZpF/OSnLEZDh4lqk8vWlPb72/ALzvs/QT /4k124wlAxDwC1EW2O6qWXC3qdiM8dfhD9Hw6dvXUN2w4RGa27UfSVqyXZNkHA++DXBd 9oZA== X-Forwarded-Encrypted: i=1; AJvYcCVJorV1YO9PUrjLUywN0t//vi+RbdeEhNdcAePMsdHFkG2rbuycFzLaUCkjMdiw0ffaY+KnymrpQjYjjgs+iEWohZy3wPWJEc4LVhvcvg== X-Gm-Message-State: AOJu0YxtrUgAftp41MtzxlNA5y8QPfQ+55UApF0LFsbJjNWs5e0eb0C0 wbsPnVDsoP1Z9/6wiCS/pBVQaw6AXsO3XAR5XuMOX3ybpkfSCBMge+uIFc94dVI= 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-arm-msm@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;