From patchwork Mon Jun 17 13:50:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Trevor Gamblin X-Patchwork-Id: 13700679 Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) (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 F070A200105 for ; Mon, 17 Jun 2024 13:51:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718632265; cv=none; b=liC6dj11oa/tFrejG413HfKHHd+IlwcC6FjEhSKBLWT4pZ4/AKK5p+ZoDPLbh7laJR/4cTgFaq5zpCipD8cGXbJn29av7S2CgObBxCh1o4yj5TG36rbF9yWUBkGh7IDPeZpx1qrY+YpMdRV4zgey7pEGEqVu9ALUB3t+8qEo7UY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718632265; c=relaxed/simple; bh=vM1JkJ0x/TYqTHqzgAuZC94s5MJ55op+dR9vjEILN4Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LskSmxjDelbJTwRjE26xOvYwSwT5QKqt31feWscKYAG6Hrp0ZlTCYMdJY8Aj5SEJwzwh7IoVVcz5UJ9S7603W5WwgO5qgi+rfBNqD9pNrrCJYqVUXgoRcpY7c4rTktNYLKafkk9I/BSaMqEriSQQgtTOhBQqq3UZXoeJbA1gZKE= 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=NzGz//51; arc=none smtp.client-ip=209.85.160.50 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="NzGz//51" Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-250ca14422aso2412107fac.0 for ; Mon, 17 Jun 2024 06:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1718632262; x=1719237062; 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=1Tk27b9u+l0CzDHHIWu0wOizrcdk6I7Pf7l1UE2LHs0=; b=NzGz//513ml3WiJcUgwxZZ1zBQSCKot5xLpCZW3EcxPHX+Vgh8tM8K1boRvG7S5zMW iassgf1a8UeDo0F367yz89jb8tUdvddiZjbk/Acd0+mdwc+e3TUTlnrox7C7TqYiZ8ox 4eDxUkj7mWznkezvHf8jSWMbZH9mKoZtUBuXgbwsQboOageunQ4E8ZcHLPi85lWs2FMp 2cAzFQgGElFDB4NRoqhtv/m7AKaMmpYSAhREyCZCj9ujtxRsjIMDYY5u9VsHPbEoCkki W8sXTgvW1BaBoBqORtSBBvtqBrnxWlg4+31VySLw3sujIZiTymviv3tl2WsdDruHwtfS q8XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718632262; x=1719237062; 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=1Tk27b9u+l0CzDHHIWu0wOizrcdk6I7Pf7l1UE2LHs0=; b=O4NAg6Xl2LJfZicXWMJlJq5c3nRtU7L2GA8uFQwjRttHX4aS/TVTf/zaRNsEoI4ei6 OA3Ex92I8Gv+KlgoLcXFZWVY75ZF1BERadHSOFT66ptAw0eH+py/U1rlA10BeqFdcjQ3 QHTNoitqCzzH8DQrxZT9sPLTTZuCxAMvIk+A8f84d7Cgyox8uJ3O922CE33e/2p20A+X uZukOfc/SURk0JfgnauKYgr5LNeLKEvlgjW4PGBa5MlF0+Yv2F7jbsdGB03CobLjvK6B RSsb9RvUmeB/QrMvjHgH8vIzoXsDMFJz+zUEur2z8HJxZuWC/dfEcsRaJrSXRC/cgM3L pR3Q== X-Gm-Message-State: AOJu0YwHVVfF2docxIxfARsTLC08jCCtzcvXfDyMzeXJJqKnH9n8sLiq G9UZ4/MoUYG3oZk1nZDwUHD4Y+kC63zTh1xbj2npIPXT4RGEPKU0HkAQiYUzXJU= X-Google-Smtp-Source: AGHT+IFPuCaLYR0OC2CKxxs6bVWzV0l0Y4GqKpcVsLYm2jLp2HnQirR7TaXtLxRY2U4vfGwAEVGQmA== X-Received: by 2002:a05:6870:89a4:b0:254:7471:56b7 with SMTP id 586e51a60fabf-25842853b1bmr11345694fac.11.1718632262042; Mon, 17 Jun 2024 06:51:02 -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.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 06:51:01 -0700 (PDT) From: Trevor Gamblin Date: Mon, 17 Jun 2024 09:50:16 -0400 Subject: [PATCH v3 36/41] iio: proximity: sx9324: make use of regmap_set_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-36-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 the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König Signed-off-by: Trevor Gamblin --- drivers/iio/proximity/sx9324.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/iio/proximity/sx9324.c b/drivers/iio/proximity/sx9324.c index aa0d14a49d5e..629f83c37d59 100644 --- a/drivers/iio/proximity/sx9324.c +++ b/drivers/iio/proximity/sx9324.c @@ -835,9 +835,8 @@ static int sx9324_init_compensation(struct iio_dev *indio_dev) int ret; /* run the compensation phase on all channels */ - ret = regmap_update_bits(data->regmap, SX9324_REG_STAT2, - SX9324_REG_STAT2_COMPSTAT_MASK, - SX9324_REG_STAT2_COMPSTAT_MASK); + ret = regmap_set_bits(data->regmap, SX9324_REG_STAT2, + SX9324_REG_STAT2_COMPSTAT_MASK); if (ret) return ret;