From patchwork Thu Oct 31 15:26:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858134 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 B0705D767D8 for ; Thu, 31 Oct 2024 15:53:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=5q6n3vif9yRqdpFEirWIbpqWZyq5PPsTaLuK/TXVuwM=; b=Q/2L7AeSbkapNqlWHVzTdTLB7M tpR0SuFXGhytCJAHPp+RehoRLfv0ZoknOuITcI64ZOyGYUovPp5/tH5aiGxXcuu+BN2Gp14B+JXzM BRHprv+/1OBoGezY86PMXr621uO5CBi38rNjkomPux6Um3daFXzfO2mCHB/bGC7wBRxfwoWDA30DE eehTzUOvQG4/+5UJZB6QV2rRFKmvtk8i4fNMpTJj3AjxA7+emKaNyUzqdGMSY/+FE0huwx2/pjTEp qgWDxCg3vLXar0lZSgv48Iry3QpM8d4AloWCEoTvO++JLuB8VGrEQxfWPFDvLBeEd6bZ7jln0OLmq 9DhZYcyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6XUD-000000046Ck-3VtX; Thu, 31 Oct 2024 15:53:25 +0000 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4o-00000003zEp-2mPy for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:12 +0000 Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-37d49a7207cso770160f8f.0 for ; Thu, 31 Oct 2024 08:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388429; x=1730993229; 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=5q6n3vif9yRqdpFEirWIbpqWZyq5PPsTaLuK/TXVuwM=; b=e+pa94E1BhHFScB06mycl3RmH8GJu73jdM6AC2oLGolER7legHlDE0DHXSo65qc2+U nn43ujFJoX9ZWDX0tUvMJb/7XI7yFaCuulhF0cPWVRjj4nTzoPvzgR62QqnpGGcFy9Jc dCbTN6R5I27wq7bK8jVMGjY12Pk3kl+PO/i3QxVIdkwTh8Isjni4iT/aY5CyB3lcfU6c gdlbQ48iI0vFXOTc0/QwvCXpUoqpXTameviCvKqnTAC7oueQrIt6yEUyZEEuwW5HzuPi MK6FzL5OYxBXnJgepIb5x7m1mSZzvnTnrqeGveb/o5vfp6X/YLAajwG77CotzoOLcLaK lkNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388429; x=1730993229; 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=5q6n3vif9yRqdpFEirWIbpqWZyq5PPsTaLuK/TXVuwM=; b=DBsAQbM9xlK180U6jQJkSs4SdKFPgNtWGyFDjM0qboEJgtcKwjxZ3WjebDCMmsOAub dR7gL14gr2oKaayHr/UzWdepVIKS+1Bevxe4WJcW8Ff3dNn2zcBaUGdjdFQ7j/FPC7Dh kLskT+y0kmK7OoAwif5CIbqp59gAvRWORoT6hCx2lDMwDdqe9HHQ3+wCMnjl7l+y8mIE 9G2WyFAaJaJbDMdxVOMkhOQsAY3ZWkOb5D9B44moW7U8669beD7cfVds8OEFxG/5c1xz eBYvGQp4pxs8Vsw8hWlbYu7h/MZDJvT1PkY/2DUsdHVAAQKm4Kl5Gz3AAfQBj4BHOboV Glow== X-Forwarded-Encrypted: i=1; AJvYcCXx4U4ztKPRSP6+Yde62aVOROQJkeuUfMjSUBVWi2IJmJA/g1sLonDSKmJ3GDC4BISmqTaOvV8Zf36yNCtZQmAj@lists.infradead.org X-Gm-Message-State: AOJu0YxVOqEglKBnsUC/mRuGyyl2wngeVKHWCMW/Tl2V7A7pbEhUHcLW k6xnGADX/TBnflA9LcQkqtSY5j7lYFUlBe7jpdbQDdIq+0jEW1V1yNB/JvyvZ54= X-Google-Smtp-Source: AGHT+IGaw7tHL795rWp+9Pukkty49eWxvccjSs+5mhazyr072wPwTV8LiZfSVUziuIlxxgcHMJ0lWw== X-Received: by 2002:a05:6000:1569:b0:37d:5103:8894 with SMTP id ffacd0b85a97d-381c7aa4a56mr334756f8f.42.1730388428718; Thu, 31 Oct 2024 08:27:08 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:08 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:26:56 +0100 Subject: [PATCH v2 01/15] iio: light: ltr390: simplify code in write_event_config callback MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-1-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082710_735889_563DD87E X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to the write_event_config callback. Remove useless code in write_event_config callback. Signed-off-by: Julien Stephan --- drivers/iio/light/ltr390.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iio/light/ltr390.c b/drivers/iio/light/ltr390.c index 8e0a3fc3d923a6f65d2a629c87e7bfd35d82a507..3bdffb6360bcbaab4df1a2d39c8ea3813b5d6bd3 100644 --- a/drivers/iio/light/ltr390.c +++ b/drivers/iio/light/ltr390.c @@ -558,10 +558,7 @@ static int ltr390_write_event_config(struct iio_dev *indio_dev, struct ltr390_data *data = iio_priv(indio_dev); int ret; - if (state != 1 && state != 0) - return -EINVAL; - - if (state == 0) + if (!state) return regmap_clear_bits(data->regmap, LTR390_INT_CFG, LTR390_LS_INT_EN); guard(mutex)(&data->lock); From patchwork Thu Oct 31 15:26:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858192 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 CC124D767EA for ; Thu, 31 Oct 2024 17:01:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=6eDKpTruMZP+IxXjbPpb2d8Qn7H2+5jIQszhP7gdxmg=; b=kpTcgvAGP8ztOJQH+/Ah00D5MP loiqHpynjMxIp4xcijuWQxxnsveupx0ZtYlf3eKNnY16ejiiqGgPjsIx8sOKgsMWidtUrxkA2DQIi cwe4f5pWedoeSmORgUJDqvyNxZk/5g/bBe5xGYuqpphYBaEQeJ72mGbRRBzgUuLblQyBUzxcAqpJs gSvl9a73HkbiOmm3A71Qi35+6ENk3oP/qo7qFhZ8hgMHRnh9WMu/7LznM7hqkmfVJs8stUNn4mXz8 02ux6IJlVz/fekpVeWZ52T4WefYiKVJcdAmN5jk8i3oqbVKVQtAXYKGdjUB9dPh2wYWn36HLPcVHO CsRPPueg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6YXk-00000004HK4-2Ap8; Thu, 31 Oct 2024 17:01:08 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4r-00000003zEu-0JkN for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:14 +0000 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-53b34ed38easo984744e87.0 for ; Thu, 31 Oct 2024 08:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388430; x=1730993230; 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=6eDKpTruMZP+IxXjbPpb2d8Qn7H2+5jIQszhP7gdxmg=; b=iZEDOvznGuVSsUD7X982+ibb9MBfT6BYt8CBD0ci2M8RouLPD49PSfcICmSM8rfKnm 0evj6zvY+izmrNAoLbQSwiY2qOJ2Qve1hyyu/eTwHrDMLDAPLXnc5v5cwI0qVVggJKx/ q2IMq+Uhox7Dwpae93Ap7b3nfiO5x2/lS56ePWGdqw5seOHhrFnIVqCz3pq+hM54sd7C hZkiRHcrJgkEjxDUO0ge98GIeMypH/n8y//cnBbmi31ufF+oVdC7Z0t55O/qBNjL9Ei/ H97DNmYWnfLLFKC4IqD3zaMpLVpVJztsfZIKYd4R+C+1ylhHfmHvYLPtiCmZ6n83l17f PuMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388430; x=1730993230; 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=6eDKpTruMZP+IxXjbPpb2d8Qn7H2+5jIQszhP7gdxmg=; b=KpL4v1Vbn0YZDbhEZWX5s34gL/drVv29gCSgAzESkUXPOeQJHbiRo5mT9D3krSsUa2 AE7hMUPCvOvnYJdiKiBfZMag+9Ig6t6fJf8QJNdSUwjyrfxql1MFm7pIpSr1asKJRQ6B 8CZnDQMCk2X/W7VvxezwTLQAt2Epge2yb1SoAQdpuIqQ4CXJ7M49lT1YfcG0P3MO9KnO WOMueqSXAReo/MklMQMtRVzuyvOEA1XtqAaJq6LMsJeFhA3cIVOWEGuqQgmYbiMUNmQ7 Dl2esa95zQ6N0+9Mpv/4i2QEvXz3+KOdMpcPvYEnPCXaBxEy0WSTpXdbq+zdbJgdq6/i UXpQ== X-Forwarded-Encrypted: i=1; AJvYcCUgQpZk8QGuhv6+EAmpCXT1tVAH1Tzbpd0DP4KSNbXnSB7P8TgsjdHM+yL06AyXU1JlyUrsZI47vwy0YpbKXWC6@lists.infradead.org X-Gm-Message-State: AOJu0YzWTR5+mDpM6PCGW/UwmOt4SSGAnQfz9G5CdhBCjDcRKWWGPrto yvWb/GWfLKyVkKmxnKkXYh+QmrBI1e/yH+0elB2E9QbJAT4meYvC7ePJht8s/qs= X-Google-Smtp-Source: AGHT+IGjr93P1e7lz+9DxAcqNxw0ZM4hWmcWRfsYdyiLlzZAFmm8L5DUz7on0ZrmWR0iZ8h9Nc8dCg== X-Received: by 2002:a05:6512:3ca2:b0:539:f699:bb29 with SMTP id 2adb3069b0e04-53b348c8d6fmr8574506e87.15.1730388429624; Thu, 31 Oct 2024 08:27:09 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:09 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:26:57 +0100 Subject: [PATCH v2 02/15] iio: proximity: hx9023s: simplify code in write_event_config callback MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-2-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082713_153231_E17AE627 X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to the write_event_config callback. Remove useless code in write_event_config callback. Signed-off-by: Julien Stephan --- drivers/iio/proximity/hx9023s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/proximity/hx9023s.c b/drivers/iio/proximity/hx9023s.c index d8fb34060d3db88a3ba5ecdc209b14be8e42e8b9..38441b1ee040c7c26047b0cb2ac443ecb8396df3 100644 --- a/drivers/iio/proximity/hx9023s.c +++ b/drivers/iio/proximity/hx9023s.c @@ -879,7 +879,7 @@ static int hx9023s_write_event_config(struct iio_dev *indio_dev, struct hx9023s_data *data = iio_priv(indio_dev); if (test_bit(chan->channel, &data->chan_in_use)) { - hx9023s_ch_en(data, chan->channel, !!state); + hx9023s_ch_en(data, chan->channel, state); __assign_bit(chan->channel, &data->chan_event, data->ch_data[chan->channel].enable); } From patchwork Thu Oct 31 15:26:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858194 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 BC144D767EE for ; Thu, 31 Oct 2024 17:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=nfayXnl3KgVE68uldd/53FtSQhtptu319uaFu0iSbt8=; b=pyfTL10hOpkEI0+pFbvc2vI9SF b0yjt4g6iBXiJgBgDxwNjOb55sbxmJ1qUvhEJn5v0h/pogTdnoCWsfA0kjlF8P5J4r24YPgSLvZrk pJ+2H8RDPswUraIL1DaOEaqXIQd7L1Dd+P1MhP+61+yO+yMOmcUWBGUVJWPEapHlXzr1NlDPdYwne eUH3r97EtWkf59k7tYilOdy//B03JQcBA6dpwf/CxBlc8IsKUFSjwNqm3XNrXoj0fjMkxEwrO4doc JARbvNU8zeUXJbFQsicIZQwAXgpFJaWXPog5G7pFxh3KP6tndorHhRsenFmbMALFYGRL2bYRFkJeb GHiuMAXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6YXl-00000004HKO-0fkN; Thu, 31 Oct 2024 17:01:09 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4r-00000003zFL-1VkJ for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:14 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-539f1292a9bso1350726e87.2 for ; Thu, 31 Oct 2024 08:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388431; x=1730993231; 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=nfayXnl3KgVE68uldd/53FtSQhtptu319uaFu0iSbt8=; b=J9LNiMDfHaIIPIku+5T5dtljZavF08EN7oyz2fewKpTeKBFRhfbLrH4IlJ3EzaWGw+ Jssf1qzgaQKK40MQ/uwqFMV+xfsP6hDj5u1i5g14iGmiVNkm+31d7fumx2/EiwuaqNo+ IPC+BAo/UBvn9NmR7wbQz7Amjr46C+veVy5kbPbQKSTkttCyj4kKWZk+aQNyV9bx8ZTM PrVIfnPaLhmuzmMlzrn47OveyKz3GZK4Ku1liyLx8Y0rz+/BXp5AD5ON+qiyzOjMuiK4 WOl/IG++h+JdpmYChaCRrs9bpm5XcgFb0oiGPQdRq07dkj6moxIvpzCdWH8BQMa3mKHI GVKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388431; x=1730993231; 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=nfayXnl3KgVE68uldd/53FtSQhtptu319uaFu0iSbt8=; b=jj2MvwzqKc1iNqp17vKYvsrn2LJGfUeo5yxoB+0Fv18w+OOzUSAPn16YS8PmdqbQxD 0GJCIh8GNNzIMSTfPXfpFyzBIrJiPKCb7/mvdXu9pBKJ+t5gF/AujrS8rmaIW+mh/nqf yoe0Hmf2W2V0qaCnJmSyxdlZqQjI0fjTqg0LDVqUS3WLebA/YlxRj2ytCZSFPCHwxAoC LndyxC4dgStraJD1BdnA46TdTU5pKH3l6suwH9H1+jbMNDCOd6hZM3I7ud/de9Z3SuVb o9CK+RYZla7NkER9NwNHFsmZ5cMVh0XpHosr3XhDmkdhqFcRjYzXpdNcLjzdt+kTP+ll JIpQ== X-Forwarded-Encrypted: i=1; AJvYcCUD1V491AfZ+Fbzok/8zB3v/jCTwV5OBPkHGPGHuvJWvnwRVBmHGXM3I6LVOGzQCL/xa4jSLdnJk8+3A9vROyYw@lists.infradead.org X-Gm-Message-State: AOJu0Yyn+uH8UmSt2VQAo96Fa8TB4CrdGcTUOMjtvpC0STKC+wv5WoxH oduAbZb/Fch87NHaarDkfiMjoCXHTe3HT0vtnY5Ipf6xmbBOAbM+SGyxdw0L7oQ= X-Google-Smtp-Source: AGHT+IGh99tSGgSkk7UO/iFz05CAdTlnzxIFxRiRB1z7ObMWAVrMO/9RIhKBJVpF/cTnncS5M8FTQA== X-Received: by 2002:a05:6512:2341:b0:536:554a:24c2 with SMTP id 2adb3069b0e04-53b348c8978mr10449686e87.13.1730388430582; Thu, 31 Oct 2024 08:27:10 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:10 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:26:58 +0100 Subject: [PATCH v2 03/15] iio: light: tsl2772: simplify code in write_event_config callback MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-3-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082713_503935_7CE613C5 X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to the write_event_config callback. Remove useless code in write_event_config callback. Signed-off-by: Julien Stephan --- drivers/iio/light/tsl2772.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/tsl2772.c b/drivers/iio/light/tsl2772.c index cab468a82b616a23394977da1d8822d29d8941d3..26082f239c4c3aeabfe73ed100d6e885f5266329 100644 --- a/drivers/iio/light/tsl2772.c +++ b/drivers/iio/light/tsl2772.c @@ -1086,9 +1086,9 @@ static int tsl2772_write_interrupt_config(struct iio_dev *indio_dev, struct tsl2772_chip *chip = iio_priv(indio_dev); if (chan->type == IIO_INTENSITY) - chip->settings.als_interrupt_en = val ? true : false; + chip->settings.als_interrupt_en = val; else - chip->settings.prox_interrupt_en = val ? true : false; + chip->settings.prox_interrupt_en = val; return tsl2772_invoke_change(indio_dev); } From patchwork Thu Oct 31 15:26:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858158 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 AD418D767D8 for ; Thu, 31 Oct 2024 16:00:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=iARvgNUgpGuJeduLUMchLuVPcb6x0a/MDX16DJ8FtYc=; b=h5kEovhQNKO8ivY8qPJl4uF6W7 AFEeQp+WM+GXiJh8hjIGczbLgzLjiBPFIh9rbCM+5VIaSMzpyiSC8T1ruLWdg1eOchpvVG9duIf9c 0nQ0NT2s3Td03xs2F6i0B+60VB7bdFinntArY3ZtiWoHaXD5ydJnKVHxJIXqqaEmGJvPGpMtMtx0+ GZ6SDXWoZvmMNHZyt/fBI4np4v79Elui8J4/FKD83muGbUY+ar6W1TZbCPPr3Bp2FihLhbvfZSG5d lRuQRWs1+sKwlVTOQVT5hbO9GqZgYzRGhBYiA3bJNpTriCAzJpAzK/NyngkndrdfPjPPhJCCeINYL ox46v9ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6Xah-000000047C6-135N; Thu, 31 Oct 2024 16:00:07 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4r-00000003zFO-1b1g for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:16 +0000 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-539e7e73740so1008329e87.3 for ; Thu, 31 Oct 2024 08:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388432; x=1730993232; 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=iARvgNUgpGuJeduLUMchLuVPcb6x0a/MDX16DJ8FtYc=; b=1mDqyq4q2SBAGs/uvZgLMZpbtgFsqHwvlMPyuqOfkfXKK5pK6DuQiKwc+VsMrmvtWx piZnHoDXU6nTwruVm/LkH5MvzLEIRZthCpv7WkUVlJjBTEWsnvetrWX1tZgod2Nbw5x5 lbvdEncrRPZtkDZomAXZ3yRj/JwhwtLhIm3V8rJ8HXASx0udECPdwfGiJ2HgjL3EU103 wzP/3l6dAK1J+RVjrqCNY+FPhfAGstWwrQcQDEY5wSiLUXz0ehYBO1YozhHOjPZkUOLd KmG40wK40FXRovUb04ajP2c8svbj/nv/HQbJ2uOhy7ZgBNaJaroJC0AQiI5CTVK15sBN vsoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388432; x=1730993232; 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=iARvgNUgpGuJeduLUMchLuVPcb6x0a/MDX16DJ8FtYc=; b=jrbDYmrhAizULdaE7h6wzxCVt3DFmdj08t17JTF40Fsb+iX+d5h78+vQ/uVl4bVKnE skmSxdkAaGkBGlYkzH0JaAFTTr3JLtWj+7yF5leLMn9BW3ijmtm3BH2NIyKS0fEWEyWN b1YaHAzL5LaRbfnvxULw9T1IaOXJG5OaZ6YXXNnFkGlfPtPH4giTw2naU/0+n2BWRiXd 42cSCZusrrTQcKzrPI67bwB915X32IWM4N8EnYJPlYp+9ChSWkjo550q5HxA+Hmk17fG QHkE0lDozRg6RAeDNUg59rK1YxC7ZsUIdRhgx+Seok8NcgFJmu0k5s5he48Kaws6Bu4y 3nMQ== X-Forwarded-Encrypted: i=1; AJvYcCVJI9l0V9AKE1JpXmSvryLM0z61VkATqGt5F6p1f3/2Jf8SyoJJ0evnR2bLumWKtJyABVC0/HV30A0GPkoGKA6/@lists.infradead.org X-Gm-Message-State: AOJu0YyRvTR91SE1omTmI++Wie3lnV2EP2bFNwEBtQ6tf5q/qCwMkPh4 pXCaUEv7d3a9UMBeGlGtM89pYvMJ4abwpmnRKnp02Q0Ofg50m+Q5xvBwouuQOZo= X-Google-Smtp-Source: AGHT+IEWcF0+R0QL/6lFuKjPVZ78UfoWB02cUsI4xL/9k/ULH8MPxNidSuG6r6GPzz/NlzRHmcmBRQ== X-Received: by 2002:a05:6512:ba1:b0:539:fdee:fe04 with SMTP id 2adb3069b0e04-53b7ecd57d5mr3831450e87.11.1730388431614; Thu, 31 Oct 2024 08:27:11 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:11 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:26:59 +0100 Subject: [PATCH v2 04/15] iio: proximity: irsd200: simplify code in write_event_config callback MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-4-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082713_515289_E4A6B528 X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to the write_event_config callback. Remove useless code in write_event_config callback. Signed-off-by: Julien Stephan --- drivers/iio/proximity/irsd200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/proximity/irsd200.c b/drivers/iio/proximity/irsd200.c index 6e96b764fed8b577d71c3146210679b0b61d4c38..fb0691da99ee621e19013a64d122f097e793efd9 100644 --- a/drivers/iio/proximity/irsd200.c +++ b/drivers/iio/proximity/irsd200.c @@ -662,7 +662,7 @@ static int irsd200_write_event_config(struct iio_dev *indio_dev, return ret; return regmap_field_write( - data->regfields[IRS_REGF_INTR_COUNT_THR_OR], !!state); + data->regfields[IRS_REGF_INTR_COUNT_THR_OR], state); default: return -EINVAL; } From patchwork Thu Oct 31 15:27:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858161 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 4F675D767D8 for ; Thu, 31 Oct 2024 16:03:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=ynbTz0mAIREWX9DSd8GtfjNx2HTiawNK3KErRQuBlPE=; b=0YZI2dXCNO+2dS8z4YpZkqQDUK GTEvPPXpczvPXIFSlnkWsN2IqOA1NfTaRaDBHz+odDD2d8ONcqhVNrbohUv/a38Uupz4GEr2PtO8g T5ahdvFNbjOkgsBlbap+Lod5U/Eot/K/Xz6pGOmtwfwNNKZt0glEJTLOLsT8MzIzcFne9qIa0etP2 wRgenUFNNS0aO+1vM3ZWXy2qCzdKNulvof6z9M6axr19k/UxU5lwteyGr9M8tjWwBU05pf7vOYDDN 5ljjFqQx/f2KpvLHFEdslfFzMpz3RK7nA5w/IMEzVazlTT+SQPYzKp3X3CUXUdSfUurWjzp2SF+Xk wV0bSJcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6Xe2-000000047kJ-18ng; Thu, 31 Oct 2024 16:03:34 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4t-00000003zFk-2ESp for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:17 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43167ff0f91so9521465e9.1 for ; Thu, 31 Oct 2024 08:27:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388433; x=1730993233; 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=ynbTz0mAIREWX9DSd8GtfjNx2HTiawNK3KErRQuBlPE=; b=qiNNVRMMpPpwtWaIXsTP0lgr39RJ6YjpOo4m7crYNb5+Zd4rCX1pI+maUr3UirWiCC 8dj9hro5NLG0fO/vqh+VZeSmMtytB9FQ/wFNFV+VktnJ6dN3cmMXg4NH0NsoXCq59e0U H9WccerEekUzAkSS3jct2i88D7hS592lRGT8TL3xlIvGbQO4ebpg1QTiVmzhco7fJKJs 8FCt88m9KxL2gUfORDdZDqkOEfcYJ1MS5ubyckds4ZI+mAZ5zl32dsXbnzN2ogaHvpTk CX75m1vAuhJijeYtC4Ls0hpMQoaam/BQd/IeLCMgsBvMoCq8gPLTXZtShyGwBjZ1VWts 0Dtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388433; x=1730993233; 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=ynbTz0mAIREWX9DSd8GtfjNx2HTiawNK3KErRQuBlPE=; b=ILqG3lYeTiVw5AgMCWuP2Pl/gRHjYHyvlznSuGvlT3fB3GQAx72qPxU97PSrxLwxqV rg+JAuORPe2ow58NmTj7W0RKMwKJkR3OIvyRHxtr7t+mMT26CmIAJkz7zxyHHh0jMrhU bOlO48wuuXp7GD5wZ91eUY2makrfaaccbvFUwIxSL0uqMR52yd2HTMgtUkj8TYwhAzwF arkOZb1cCx5oKB8ouo/BVnFJycAiY2DnWQZFOnY1sEplbhaxBnHOck4tpjmPprusmgdU a9qGJxbUzGqrSzM1wPTBU5K92nSlDjIvhw1V3X8f4PYjrjw31u0434qB1FTaWpY8NgUi MtQw== X-Forwarded-Encrypted: i=1; AJvYcCVwZ+wf8l/D6mzF8NN+kG7uOYty1avUQrXkzggBSkfbNVU+F6Dt11Oxt46KkLY9ghDda4hYsiZxiSPMtCcpt+Ox@lists.infradead.org X-Gm-Message-State: AOJu0YxkC3X5uKPWsAwfn5j71OgD7dpY6PYGmSeoku7uBmODtbfJ0DPw 03VHQ+KeWRKV/GlrVmk/74WHoVX5iXtHczhbB53q8iQhUcUHpSZu1kPey8OUsPI= X-Google-Smtp-Source: AGHT+IFcDhwM/WUu2euAD7a6xckHNF1ZKNFT/G1Ed5VwyVng6DCbMufZzTDi7LNt16ADIplrfYs/Hg== X-Received: by 2002:a05:600c:4f04:b0:42c:acb0:dda5 with SMTP id 5b1f17b1804b1-4327b6f9574mr33906995e9.1.1730388432612; Thu, 31 Oct 2024 08:27:12 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:12 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:00 +0100 Subject: [PATCH v2 05/15] iio: proximity: sx9500: simplify code in write_event_config callback MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-5-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082715_618471_79B1866B X-CRM114-Status: GOOD ( 12.52 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to the write_event_config callback. Remove useless code in write_event_config callback. Signed-off-by: Julien Stephan --- drivers/iio/proximity/sx9500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c index 3f4eace05cfc6a4679fe82854dc059aa4a710d6d..e3da709424d5b2bd4e746df7adc4a4969e62f2a6 100644 --- a/drivers/iio/proximity/sx9500.c +++ b/drivers/iio/proximity/sx9500.c @@ -551,7 +551,7 @@ static int sx9500_write_event_config(struct iio_dev *indio_dev, mutex_lock(&data->mutex); - if (state == 1) { + if (state) { ret = sx9500_inc_chan_users(data, chan->channel); if (ret < 0) goto out_unlock; @@ -571,7 +571,7 @@ static int sx9500_write_event_config(struct iio_dev *indio_dev, goto out_unlock; out_undo_chan: - if (state == 1) + if (state) sx9500_dec_chan_users(data, chan->channel); else sx9500_inc_chan_users(data, chan->channel); From patchwork Thu Oct 31 15:27:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858159 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 7CBF9D767DF for ; Thu, 31 Oct 2024 16:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=JeXr3qZeoMT4Q41ImmT91MFFoZboqwE1uhQTfbeavwY=; b=TsIyGtTvW8+EhnWIC69w8mM4Fs EM2Tl8i+4YOoPvdgeW6bInUr6X+SPe84fzWQEwSg32DcTNr6sAEsz4r1Oz8vny074TO/vBGdBJkle exvUNxm5fwLPYxWqMZ9FMVEAlTIncXrAQ7s3ghzKBek0H/Cy7lUvGWii36GsjLdLx7dN0aGthp69H edohkkRod+gv4aHup5jp0d9m+WezF6IEOCr/GMuvBI0a0jIxYX9X0wMmNbW1XC5RzD/i4hjzHHDuW S8yIvGdVLWWSsDM6ISEL99XndyLjS8kmic2Zobzo0gsYyIDZwH7NZZrD7gnTnZCGOwIYVZM8fCzJ1 mS+wv4+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6XcP-000000047XA-2Z7q; Thu, 31 Oct 2024 16:01:53 +0000 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4t-00000003zGL-176Z for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:16 +0000 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-43162cf1eaaso11531555e9.0 for ; Thu, 31 Oct 2024 08:27:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388433; x=1730993233; 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=JeXr3qZeoMT4Q41ImmT91MFFoZboqwE1uhQTfbeavwY=; b=cphGEWICxlV76pV+QgcnxfQU+KVkz/UZI/DW372IHNDGQmmHgoJ01Ldko7MO8tG0z2 DW11sHnRfI720Gco/eK9LW9W+Et1lEghz/Bac2bG+sQJ9G2IdfFaCjteq+pv/vNxTTHz Or4Ib8WZso3bmZEInsZuqpyf5VYWerIbkR9siWYi6WOnb0/4j6CD5jVAA+ozZkG7lOnn NUguNAexOUcnNC6n+T3E4xYweVN+7pPQCyynct8GPIUVJMGAkBWgfzI5u1IUH2+U9TTr q72YcLv6iQbLvx22uM1u0qP/gbSHDdB7yTH2J7wxFZgGayQNXr+8+yADcLjpdcjGcul2 eCmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388433; x=1730993233; 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=JeXr3qZeoMT4Q41ImmT91MFFoZboqwE1uhQTfbeavwY=; b=SyoKRRAvqmMhoJrexKbJA+gbw7gg/wQOW3Ya/1UToJJ53U4tOpnR5AR/XKaF0ULVwt KbK4TWvntsFYOpBpVIefKWQB9YNY+1ckBKc77RvQiT710vXHlJeBejxMEFyLuIyTOvvK MapoGe1SrYiYF5KUeMXKniIjUliJ7A/czdov1+5dyQhRJxwVmsYQiUP7COCnfw2dvoxy C33RguDTydY/8FhOuzuJNLdOm1QfVF4TgrjORNJ03lTRqDtuTav4BDt4Z4etoHBM/nts 6ML5gBONWqCzqRDWeoVOSgN2uTnYYjBLOM7hiPb8hO2mFdbrAEkuz3Jc/I+wRqJjedAP bGjA== X-Forwarded-Encrypted: i=1; AJvYcCX8NkjvgS5jlMRLXC7JSQ5EHWXfHLSo/2i9J3s2FVUqHXd4eKo7q8mSAjwEmazu9alT7hYhu89UiihO5koyAhKL@lists.infradead.org X-Gm-Message-State: AOJu0YyoUNx3onNkeQ7EmZQu/x32zV6Q4Lu21+/NHutBjCceep0R75hu 1RQm2cF9ivEo7HP/qBKxYQ4BMBBo2NOruGvG4jC/uo6KlTDQGlmG9a3lmrs2lxM= X-Google-Smtp-Source: AGHT+IHhKXOtU6WrItuY3dPBqGFS+YCmx9LFZrBINQBT3KJgqU4GZtX+T26R8f/M/h9JuV4y1clo3w== X-Received: by 2002:a05:600c:5486:b0:431:52cc:877a with SMTP id 5b1f17b1804b1-43283296066mr2433515e9.34.1730388433589; Thu, 31 Oct 2024 08:27:13 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:13 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:01 +0100 Subject: [PATCH v2 06/15] iio: light: adux1020: write_event_config: use local variable for interrupt value MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-6-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082715_341780_36351642 X-CRM114-Status: GOOD ( 12.54 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org state parameter is currently an int, but it is actually a boolean. iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to write_event_config. The code in adux1020_write_event_config re-uses state parameter to store an integer value. To prepare for updating the write_event_config signature to use a boolean for state, introduce a new local int variable. Signed-off-by: Julien Stephan --- drivers/iio/light/adux1020.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/light/adux1020.c b/drivers/iio/light/adux1020.c index 2e0170be077aef9aa194fab51afbb33aec02e513..db57d84da616b91add8c5d1aba08a73ce18c367e 100644 --- a/drivers/iio/light/adux1020.c +++ b/drivers/iio/light/adux1020.c @@ -505,7 +505,7 @@ static int adux1020_write_event_config(struct iio_dev *indio_dev, enum iio_event_direction dir, int state) { struct adux1020_data *data = iio_priv(indio_dev); - int ret, mask; + int ret, mask, val; mutex_lock(&data->lock); @@ -526,12 +526,12 @@ static int adux1020_write_event_config(struct iio_dev *indio_dev, mask = ADUX1020_PROX_OFF1_INT; if (state) - state = 0; + val = 0; else - state = mask; + val = mask; ret = regmap_update_bits(data->regmap, ADUX1020_REG_INT_MASK, - mask, state); + mask, val); if (ret < 0) goto fail; From patchwork Thu Oct 31 15:27:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858163 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 38768D767DF for ; Thu, 31 Oct 2024 16:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=pNVlgZbMHatULKuPqR/ehfFhVRq6GfasgmsLRyp3kiY=; b=hyznbFxoQ9G4a7NKcxJJydTZqf tpB/kxmzk5LK3q4e2umABaRcA7z0tOoxlG/7E85oLmCVkr8clsckqBipYpbZYLL2ntlNdHofHWDrU SmZfWx5Ux3sxY95EXHu0wXyJl3pDo3W6xUC8LdAS2Fz3xKuP8fvAFUHea2/MwNO0UbpP/pEYc0Rqe jwA68N/1JONyN6h9VWaXzAmN9Pa4Z6lQYuKhGIy97JD0/L1If8OCrkcH5rHX3h4K+KpmvfY1Jut5b CSQv7zjOlP8cGR+j8M4xQi4OxNACFDAa5E1vJvqrnxdyHdLkmBGEoN0VLDbGf/xLphZg8Ygy2e7yf eKMrOhNw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6XhN-000000048Ow-43Ig; Thu, 31 Oct 2024 16:07:01 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4u-00000003zGq-2blS for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:20 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-37d6ff1cbe1so780006f8f.3 for ; Thu, 31 Oct 2024 08:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388435; x=1730993235; 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=pNVlgZbMHatULKuPqR/ehfFhVRq6GfasgmsLRyp3kiY=; b=PgtlcoMAkxOIlT0Hg0C7GYaz9c8UxVlwwJWDUhiosCs0qR39XWmZy9hWabyqABdjJ9 OCpdTE5U8KndyywPeFxPzXlIyUR/sjNcB1KSnz1/tn8actUAxprcdUrISa5vvgqfB4oC Yj4ChRGN4bktf+lqWdcau9gJasgrPimOcEUE5p1+ZLVZpGJlLK9WrjX53U2eBKkah0bG 4dwPfc0ysV+6YxT/5F+Ip4w/DJWShdS5ggSb1eX5FlDFIBo/OQRlkasRqkt42/b2pBSm XTkQrM9klq8w3ulsrvHFfB1YP5P4mTM5GIIpWR/ZWytG8/U5iUccziLsi5y9PWQA68X6 68Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388435; x=1730993235; 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=pNVlgZbMHatULKuPqR/ehfFhVRq6GfasgmsLRyp3kiY=; b=Xrp/9pSl/TCGuyDr8FEtb9KeYhmwUwSXzv6MZRts/tZ2kj6063Vlew8C8gIv+IG+UU WZ2vP1jZd0dNknWYCdmNhdbflKfrcH2OYJDpLdBRGdCMxRtDgh71akkYRzHPwYVG4pQ9 1QqH8GefIQKZRHcNatTjtJhNLiK70HWBLbum7IftNMvPMe65xGU360IVk62hnydQZUWy jj0WFcgB2DqUhWLX2mCICB7jkkunrE2C2lcaulyytCUQFi1KbEBBidPr/YTqATUiplSh YAg2kuuaNnZyvOukxmdkXrGWAbjPpnlc4+nNPDgQiNStjY7/ULzLwUEf/57tDDZWtTnA Eigw== X-Forwarded-Encrypted: i=1; AJvYcCU9fNXEVZjpDRmI7HnXzVgPlvrRlkLYiEdaPyxxlwNOGKHKJII3cnFJ+DEBOIs9g4jNVcyv42lsPM/MvxPpxv7Q@lists.infradead.org X-Gm-Message-State: AOJu0Ywo8TyJaLO5uZ5nM0QCbfzMGnp1gaaAUG74PmSQbKjM1ryG+eVE PaebQoKwVoe/NAh9a852zJQJjexEpC4PaOvBw/tM4YnfM9Tjl9+G12NWjpjKXo+1q3SMnWXUlxV kK022kg== X-Google-Smtp-Source: AGHT+IGOgA2+T5ZQIukQ4DQ1UKH9lD78fd8+mZGwsrT72KWNxwUQ7MK1q1dtkX4huLnya4y3YoeFOQ== X-Received: by 2002:a05:6000:1a85:b0:37d:4125:5cba with SMTP id ffacd0b85a97d-381be7d8c46mr2905915f8f.32.1730388434664; Thu, 31 Oct 2024 08:27:14 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:14 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:02 +0100 Subject: [PATCH v2 07/15] iio: fix write_event_config signature MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-7-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan , Julia Lawall X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082716_764553_1FCF4112 X-CRM114-Status: GOOD ( 14.65 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org write_event_config callback use an int for state, but it is actually a boolean. iio_ev_state_store is actually using kstrtobool to check user input, then gives the converted boolean value to write_event_config. Fix signature and update all iio drivers to use the new signature. This patch has been partially written using coccinelle with the following script: $ cat iio-bool.cocci // Options: --all-includes virtual patch @c1@ identifier iioinfo; identifier wecfunc; @@ static const struct iio_info iioinfo = { ..., .write_event_config = ( wecfunc | &wecfunc ), ..., }; @@ identifier c1.wecfunc; identifier indio_dev, chan, type, dir, state; @@ int wecfunc(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, -int +bool state) { ... } make coccicheck MODE=patch COCCI=iio-bool.cocci M=drivers/iio Unfortunately, this script didn't match all files: * all write_event_config callbacks using iio_device_claim_direct_scoped were not detected and not patched. * all files that do not assign and declare the write_event_config callback in the same file. iio.h was also manually updated. The patch was build tested using allmodconfig config. cc: Julia Lawall Signed-off-by: Julien Stephan --- drivers/iio/accel/adxl367.c | 2 +- drivers/iio/accel/adxl372.c | 2 +- drivers/iio/accel/adxl380.c | 2 +- drivers/iio/accel/bma400_core.c | 2 +- drivers/iio/accel/bmc150-accel-core.c | 2 +- drivers/iio/accel/fxls8962af-core.c | 2 +- drivers/iio/accel/kxcjk-1013.c | 2 +- drivers/iio/accel/mma8452.c | 2 +- drivers/iio/accel/mma9551.c | 2 +- drivers/iio/accel/mma9553.c | 3 ++- drivers/iio/accel/sca3000.c | 2 +- drivers/iio/adc/ad7091r-base.c | 3 ++- drivers/iio/adc/ad7291.c | 2 +- drivers/iio/adc/ad799x.c | 2 +- drivers/iio/adc/hi8435.c | 2 +- drivers/iio/adc/max1363.c | 2 +- drivers/iio/adc/pac1921.c | 3 ++- drivers/iio/adc/palmas_gpadc.c | 2 +- drivers/iio/adc/ti-ads1015.c | 2 +- drivers/iio/adc/xilinx-ams.c | 2 +- drivers/iio/adc/xilinx-xadc-events.c | 2 +- drivers/iio/adc/xilinx-xadc.h | 2 +- drivers/iio/cdc/ad7150.c | 2 +- drivers/iio/dac/ad5421.c | 2 +- drivers/iio/dac/ad8460.c | 2 +- drivers/iio/dummy/iio_simple_dummy.h | 2 +- drivers/iio/dummy/iio_simple_dummy_events.c | 2 +- drivers/iio/gyro/bmg160_core.c | 2 +- drivers/iio/imu/bmi323/bmi323_core.c | 2 +- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 +- drivers/iio/imu/kmx61.c | 2 +- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +- drivers/iio/light/adux1020.c | 3 ++- drivers/iio/light/apds9300.c | 2 +- drivers/iio/light/apds9306.c | 2 +- drivers/iio/light/apds9960.c | 2 +- drivers/iio/light/bh1745.c | 2 +- drivers/iio/light/cm36651.c | 2 +- drivers/iio/light/gp2ap002.c | 2 +- drivers/iio/light/gp2ap020a00f.c | 2 +- drivers/iio/light/iqs621-als.c | 2 +- drivers/iio/light/ltr390.c | 2 +- drivers/iio/light/ltr501.c | 2 +- drivers/iio/light/max44009.c | 2 +- drivers/iio/light/opt3001.c | 2 +- drivers/iio/light/stk3310.c | 2 +- drivers/iio/light/tcs3472.c | 2 +- drivers/iio/light/tsl2563.c | 2 +- drivers/iio/light/tsl2591.c | 2 +- drivers/iio/light/tsl2772.c | 2 +- drivers/iio/light/us5182d.c | 2 +- drivers/iio/light/vcnl4000.c | 5 +++-- drivers/iio/light/veml6030.c | 2 +- drivers/iio/position/iqs624-pos.c | 2 +- drivers/iio/proximity/aw96103.c | 2 +- drivers/iio/proximity/cros_ec_mkbp_proximity.c | 2 +- drivers/iio/proximity/hx9023s.c | 2 +- drivers/iio/proximity/irsd200.c | 3 ++- drivers/iio/proximity/sx9500.c | 2 +- drivers/iio/proximity/sx_common.c | 2 +- drivers/iio/proximity/sx_common.h | 2 +- drivers/iio/proximity/vcnl3020.c | 2 +- drivers/iio/temperature/mcp9600.c | 2 +- drivers/iio/temperature/tmp007.c | 2 +- include/linux/iio/iio.h | 2 +- 65 files changed, 72 insertions(+), 66 deletions(-) diff --git a/drivers/iio/accel/adxl367.c b/drivers/iio/accel/adxl367.c index e790a66d86c79f7de9650ea47f11c8990825fd42..705375f3b56e653631491a8316a56d0dcb171e89 100644 --- a/drivers/iio/accel/adxl367.c +++ b/drivers/iio/accel/adxl367.c @@ -1073,7 +1073,7 @@ static int adxl367_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { enum adxl367_activity_type act; diff --git a/drivers/iio/accel/adxl372.c b/drivers/iio/accel/adxl372.c index ef8dd557877bd44570e84579b1af89e6b02cc523..5b9eb364760a281e8ef0ef15124cc1c8e8b0f58c 100644 --- a/drivers/iio/accel/adxl372.c +++ b/drivers/iio/accel/adxl372.c @@ -940,7 +940,7 @@ static int adxl372_read_event_config(struct iio_dev *indio_dev, const struct iio static int adxl372_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct adxl372_state *st = iio_priv(indio_dev); diff --git a/drivers/iio/accel/adxl380.c b/drivers/iio/accel/adxl380.c index 9f6f0a45efce7981736c3a8f005f4fef83f05cfd..5d2bda1a6a783c3f5bf6dfa6830bc80cc7055e01 100644 --- a/drivers/iio/accel/adxl380.c +++ b/drivers/iio/accel/adxl380.c @@ -1386,7 +1386,7 @@ static int adxl380_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct adxl380_state *st = iio_priv(indio_dev); enum adxl380_axis axis; diff --git a/drivers/iio/accel/bma400_core.c b/drivers/iio/accel/bma400_core.c index 0bf5f321cfe79147df01fa674de779e506818b46..906d2577be2d64220046ec56ef675ddafb9a50ab 100644 --- a/drivers/iio/accel/bma400_core.c +++ b/drivers/iio/accel/bma400_core.c @@ -1293,7 +1293,7 @@ static int bma400_disable_adv_interrupt(struct bma400_data *data) static int bma400_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct bma400_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c index 0f32c1e92b4dc121bb85516acef4941b0421f100..158579350d596e11ab36d9ea4692e5837cca482e 100644 --- a/drivers/iio/accel/bmc150-accel-core.c +++ b/drivers/iio/accel/bmc150-accel-core.c @@ -804,7 +804,7 @@ static int bmc150_accel_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct bmc150_accel_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c index ab427f3461dbbef535c2ec2cf2982202ca97bb82..f07fba17048e7b5c1958807b14d4bcb3ff87e26d 100644 --- a/drivers/iio/accel/fxls8962af-core.c +++ b/drivers/iio/accel/fxls8962af-core.c @@ -617,7 +617,7 @@ static int fxls8962af_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct fxls8962af_data *data = iio_priv(indio_dev); u8 enable_event, enable_bits; diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index a6621cd69707bfdf6dfe0b1bf87e0829d2c7c545..6ce84b2dd720b719c0bd9baa653af54539e93ac2 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -1093,7 +1093,7 @@ static int kxcjk1013_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct kxcjk1013_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c index de4525b30edcab8c786708df98f072d569c81f2e..962d289065ab7bb3da5ae102cb5ee2cb96662af5 100644 --- a/drivers/iio/accel/mma8452.c +++ b/drivers/iio/accel/mma8452.c @@ -974,7 +974,7 @@ static int mma8452_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct mma8452_data *data = iio_priv(indio_dev); int val, ret; diff --git a/drivers/iio/accel/mma9551.c b/drivers/iio/accel/mma9551.c index a5d20d8d08b8ee54eed0849dad433c00a055ab2c..605022f5239a6412827f4ba059aa18d490908720 100644 --- a/drivers/iio/accel/mma9551.c +++ b/drivers/iio/accel/mma9551.c @@ -225,7 +225,7 @@ static int mma9551_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct mma9551_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/accel/mma9553.c b/drivers/iio/accel/mma9553.c index 1ea6aa00741238a8512294cdc8147a53853e5277..43ba04c606a40debb3befe1df92bd4cc7b7777d3 100644 --- a/drivers/iio/accel/mma9553.c +++ b/drivers/iio/accel/mma9553.c @@ -725,7 +725,8 @@ static int mma9553_read_event_config(struct iio_dev *indio_dev, static int mma9553_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, + bool state) { struct mma9553_data *data = iio_priv(indio_dev); struct mma9553_event *event; diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c index 87c54e41f6ccd2f9311653b757b2d794df1dd5d4..36cbfcbba04d6920ba68bebd70d21bc3898a044d 100644 --- a/drivers/iio/accel/sca3000.c +++ b/drivers/iio/accel/sca3000.c @@ -1253,7 +1253,7 @@ static int sca3000_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct sca3000_state *st = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/adc/ad7091r-base.c b/drivers/iio/adc/ad7091r-base.c index d6876259ad14499df0983b4744834d66aa789f27..eb0a059b4b0e9e8af52e9433032318d853a76c33 100644 --- a/drivers/iio/adc/ad7091r-base.c +++ b/drivers/iio/adc/ad7091r-base.c @@ -150,7 +150,8 @@ static int ad7091r_read_event_config(struct iio_dev *indio_dev, static int ad7091r_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, + bool state) { struct ad7091r_state *st = iio_priv(indio_dev); diff --git a/drivers/iio/adc/ad7291.c b/drivers/iio/adc/ad7291.c index 4c7f887adbbf2f2c857288b19ce8058ee5ebdffb..60e12faa32070183c64a2037c968177cb903cc11 100644 --- a/drivers/iio/adc/ad7291.c +++ b/drivers/iio/adc/ad7291.c @@ -269,7 +269,7 @@ static int ad7291_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { int ret = 0; struct ad7291_chip_info *chip = iio_priv(indio_dev); diff --git a/drivers/iio/adc/ad799x.c b/drivers/iio/adc/ad799x.c index 0f107e3fc2c85575e6820f995949a5345e9d69d3..aa44b4e2542b2679c6b5fbe7346e3e9dc17721af 100644 --- a/drivers/iio/adc/ad799x.c +++ b/drivers/iio/adc/ad799x.c @@ -406,7 +406,7 @@ static int ad799x_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct ad799x_state *st = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/adc/hi8435.c b/drivers/iio/adc/hi8435.c index fb635a756440300432b0bbcf1fd9ebce2e9ab92d..689e34f069877ec525c5f9ee7258d5140d4bba70 100644 --- a/drivers/iio/adc/hi8435.c +++ b/drivers/iio/adc/hi8435.c @@ -132,7 +132,7 @@ static int hi8435_read_event_config(struct iio_dev *idev, static int hi8435_write_event_config(struct iio_dev *idev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct hi8435_priv *priv = iio_priv(idev); int ret; diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c index 8da2d8d7a9c677c6eb5c4b2903a7954c0105707d..9a0baea08ab6162b024932f3f65c8a68d156672d 100644 --- a/drivers/iio/adc/max1363.c +++ b/drivers/iio/adc/max1363.c @@ -944,7 +944,7 @@ static inline int __max1363_check_event_mask(int thismask, int checkmask) static int max1363_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct max1363_state *st = iio_priv(indio_dev); diff --git a/drivers/iio/adc/pac1921.c b/drivers/iio/adc/pac1921.c index f6f8f9122a78d1b5e63d8184203eb3dae55eb560..66f206b9465e5d390aa2ad63d7d72d86f457f202 100644 --- a/drivers/iio/adc/pac1921.c +++ b/drivers/iio/adc/pac1921.c @@ -740,7 +740,8 @@ static int pac1921_read_event_config(struct iio_dev *indio_dev, static int pac1921_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, + bool state) { struct pac1921_priv *priv = iio_priv(indio_dev); u8 ovf_bit; diff --git a/drivers/iio/adc/palmas_gpadc.c b/drivers/iio/adc/palmas_gpadc.c index 67d567ee21b439e3f296c239c68d8ed6f1723b59..d283ee8fb1d2f219674ece7faa5492503671ac94 100644 --- a/drivers/iio/adc/palmas_gpadc.c +++ b/drivers/iio/adc/palmas_gpadc.c @@ -676,7 +676,7 @@ static int palmas_gpadc_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct palmas_gpadc *adc = iio_priv(indio_dev); int adc_chan = chan->channel; diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c index 052d2124b21570e0b90fd4aa4048adcc921301ef..47fe8e16aee42d375a74f9e97d4220542b04566d 100644 --- a/drivers/iio/adc/ti-ads1015.c +++ b/drivers/iio/adc/ti-ads1015.c @@ -806,7 +806,7 @@ static int ads1015_disable_event_config(struct ads1015_data *data, static int ads1015_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct ads1015_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/adc/xilinx-ams.c b/drivers/iio/adc/xilinx-ams.c index ebc583b07e0c00bd08c3219f595edd8df26a8378..76dd0343f5f76a6b1a8882e41d6a7f333c3a36e4 100644 --- a/drivers/iio/adc/xilinx-ams.c +++ b/drivers/iio/adc/xilinx-ams.c @@ -905,7 +905,7 @@ static int ams_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct ams *ams = iio_priv(indio_dev); unsigned int alarm; diff --git a/drivers/iio/adc/xilinx-xadc-events.c b/drivers/iio/adc/xilinx-xadc-events.c index 90f62377c34d97fcf3695103edc4d8e9a17d0a83..c188d3dcab48fea007ac065397bb17f952ca09db 100644 --- a/drivers/iio/adc/xilinx-xadc-events.c +++ b/drivers/iio/adc/xilinx-xadc-events.c @@ -121,7 +121,7 @@ int xadc_read_event_config(struct iio_dev *indio_dev, int xadc_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { unsigned int alarm = xadc_get_alarm_mask(chan); struct xadc *xadc = iio_priv(indio_dev); diff --git a/drivers/iio/adc/xilinx-xadc.h b/drivers/iio/adc/xilinx-xadc.h index 3036f4d613ff5d44018c098781576d3f71fd5b49..b4d9d468311723fa79cfd7f10781f788dbf9c9db 100644 --- a/drivers/iio/adc/xilinx-xadc.h +++ b/drivers/iio/adc/xilinx-xadc.h @@ -25,7 +25,7 @@ int xadc_read_event_config(struct iio_dev *indio_dev, enum iio_event_direction dir); int xadc_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state); + enum iio_event_direction dir, bool state); int xadc_read_event_value(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, enum iio_event_info info, diff --git a/drivers/iio/cdc/ad7150.c b/drivers/iio/cdc/ad7150.c index 4c03b9e834b88d6eafabb63999a1ed2c1720118f..e64a41bae32c67e43fc9021c186170c4bacb2ae3 100644 --- a/drivers/iio/cdc/ad7150.c +++ b/drivers/iio/cdc/ad7150.c @@ -232,7 +232,7 @@ static int ad7150_write_event_params(struct iio_dev *indio_dev, static int ad7150_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct ad7150_chip_info *chip = iio_priv(indio_dev); int ret = 0; diff --git a/drivers/iio/dac/ad5421.c b/drivers/iio/dac/ad5421.c index 7644acfd879e046ebea39e16a5566f58e9ceefed..1462ee640b16863e779bb550fa64445b5c8bd72c 100644 --- a/drivers/iio/dac/ad5421.c +++ b/drivers/iio/dac/ad5421.c @@ -384,7 +384,7 @@ static int ad5421_write_raw(struct iio_dev *indio_dev, static int ad5421_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct ad5421_state *st = iio_priv(indio_dev); unsigned int mask; diff --git a/drivers/iio/dac/ad8460.c b/drivers/iio/dac/ad8460.c index 7470d97825e0a6b0124c2a3bac3d5709dcded534..f235394589dfb6ae575e37819dfd33dc35f77f23 100644 --- a/drivers/iio/dac/ad8460.c +++ b/drivers/iio/dac/ad8460.c @@ -573,7 +573,7 @@ static int ad8460_read_event_value(struct iio_dev *indio_dev, static int ad8460_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int val) + enum iio_event_direction dir, bool val) { struct ad8460_state *state = iio_priv(indio_dev); int fault; diff --git a/drivers/iio/dummy/iio_simple_dummy.h b/drivers/iio/dummy/iio_simple_dummy.h index a91622ac54e06e037502fbc956f0bd7c35de7509..8246f25dbad04f2bb612177631ebc1bedfc1f1e9 100644 --- a/drivers/iio/dummy/iio_simple_dummy.h +++ b/drivers/iio/dummy/iio_simple_dummy.h @@ -60,7 +60,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state); + bool state); int iio_simple_dummy_read_event_value(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, diff --git a/drivers/iio/dummy/iio_simple_dummy_events.c b/drivers/iio/dummy/iio_simple_dummy_events.c index 63a2b844be50834e232f653bbb893dee29171c4c..c7f2d3a4d60b2602bd180feca7c141b2dd6e35a7 100644 --- a/drivers/iio/dummy/iio_simple_dummy_events.c +++ b/drivers/iio/dummy/iio_simple_dummy_events.c @@ -53,7 +53,7 @@ int iio_simple_dummy_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct iio_dummy_state *st = iio_priv(indio_dev); diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c index bb235697262bc363f4117aee7eb987318806fa63..ba877d067afb7a7bd0d350edd8f2be86fe673c69 100644 --- a/drivers/iio/gyro/bmg160_core.c +++ b/drivers/iio/gyro/bmg160_core.c @@ -748,7 +748,7 @@ static int bmg160_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct bmg160_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c index 1e6c083ea5c1bbddb878f08cd4f4be725c0e319f..76a88e1ccc1d89988eb52d6b1be8da0f5005f0e6 100644 --- a/drivers/iio/imu/bmi323/bmi323_core.c +++ b/drivers/iio/imu/bmi323/bmi323_core.c @@ -785,7 +785,7 @@ static const struct attribute_group bmi323_event_attribute_group = { static int bmi323_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct bmi323_data *data = iio_priv(indio_dev); diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index 21ebf0f7e28fec302cbf8ab890fc53a3de6f36cd..40271352b02cf6e0acdfa7a8b2d50f384650a6c0 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -1173,7 +1173,7 @@ static int inv_mpu6050_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct inv_mpu6050_state *st = iio_priv(indio_dev); diff --git a/drivers/iio/imu/kmx61.c b/drivers/iio/imu/kmx61.c index 2af772775b68932db45f2b9a5d40dc8b1bb247b5..324c38764656ad74e2bbdc54824b4321db3c0b81 100644 --- a/drivers/iio/imu/kmx61.c +++ b/drivers/iio/imu/kmx61.c @@ -942,7 +942,7 @@ static int kmx61_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct kmx61_data *data = kmx61_get_data(indio_dev); int ret = 0; diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index fb4c6c39ff2e157593f02513cc8e01cd7eea9bdf..caefa15e559b8808051ff1c7f82c3f36c947933c 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -1959,7 +1959,7 @@ static int st_lsm6dsx_write_event_config(struct iio_dev *iio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct st_lsm6dsx_sensor *sensor = iio_priv(iio_dev); struct st_lsm6dsx_hw *hw = sensor->hw; diff --git a/drivers/iio/light/adux1020.c b/drivers/iio/light/adux1020.c index db57d84da616b91add8c5d1aba08a73ce18c367e..32e58496cb10ae5578935302c08dbbbb46c5f79a 100644 --- a/drivers/iio/light/adux1020.c +++ b/drivers/iio/light/adux1020.c @@ -502,7 +502,8 @@ static int adux1020_write_raw(struct iio_dev *indio_dev, static int adux1020_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, + bool state) { struct adux1020_data *data = iio_priv(indio_dev); int ret, mask, val; diff --git a/drivers/iio/light/apds9300.c b/drivers/iio/light/apds9300.c index 11f2ab4ca261813aff04b8c25d4595a531fb43cb..95861b2a5b2d94011d894959289c5c4f06cc1efe 100644 --- a/drivers/iio/light/apds9300.c +++ b/drivers/iio/light/apds9300.c @@ -321,7 +321,7 @@ static int apds9300_read_interrupt_config(struct iio_dev *indio_dev, static int apds9300_write_interrupt_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct apds9300_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c index 079e02be1005210ddd30b384ffa1ff7feeb098d7..8adc74040db2bddf93fbb773e3519abcc726b9a6 100644 --- a/drivers/iio/light/apds9306.c +++ b/drivers/iio/light/apds9306.c @@ -1071,7 +1071,7 @@ static int apds9306_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct apds9306_data *data = iio_priv(indio_dev); struct apds9306_regfields *rf = &data->rf; diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index 3a56eaae5a68f2891d061871c7013f0b5447bb47..a7f0cc99f236685900f89fbc48de3be0e9a40704 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -757,7 +757,7 @@ static int apds9960_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct apds9960_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/light/bh1745.c b/drivers/iio/light/bh1745.c index fc6bf062d4f510886f909509d8115f0cf892f3c4..23e9f16090ccdbb672fea741f3f4e361086f0360 100644 --- a/drivers/iio/light/bh1745.c +++ b/drivers/iio/light/bh1745.c @@ -638,7 +638,7 @@ static int bh1745_read_event_config(struct iio_dev *indio_dev, static int bh1745_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct bh1745_data *data = iio_priv(indio_dev); int value; diff --git a/drivers/iio/light/cm36651.c b/drivers/iio/light/cm36651.c index a4a1505534c015e3146c00de3e38966ffd712a5b..ae3fc3299eec6c30149bbfcb638d5c0001c30ed9 100644 --- a/drivers/iio/light/cm36651.c +++ b/drivers/iio/light/cm36651.c @@ -529,7 +529,7 @@ static int cm36651_write_prox_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct cm36651_data *cm36651 = iio_priv(indio_dev); int cmd, ret; diff --git a/drivers/iio/light/gp2ap002.c b/drivers/iio/light/gp2ap002.c index f8b1d7dd6f5fc69da12cf37ad286112555e4919f..d56ee217fe538c8babb5df510932bd6e67c59ea6 100644 --- a/drivers/iio/light/gp2ap002.c +++ b/drivers/iio/light/gp2ap002.c @@ -340,7 +340,7 @@ static int gp2ap002_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct gp2ap002 *gp2ap002 = iio_priv(indio_dev); diff --git a/drivers/iio/light/gp2ap020a00f.c b/drivers/iio/light/gp2ap020a00f.c index 81e718cdeae32d60581cb490148f4f1c0bd695c7..1a352c88598e5d701256aa8659a7f9683bce56f9 100644 --- a/drivers/iio/light/gp2ap020a00f.c +++ b/drivers/iio/light/gp2ap020a00f.c @@ -1159,7 +1159,7 @@ static int gp2ap020a00f_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct gp2ap020a00f_data *data = iio_priv(indio_dev); enum gp2ap020a00f_cmd cmd; diff --git a/drivers/iio/light/iqs621-als.c b/drivers/iio/light/iqs621-als.c index 6de33feada3a36f0656e9bdf5289560a49358b5a..b9f230210f0731b82139191366f2309f835c0b6d 100644 --- a/drivers/iio/light/iqs621-als.c +++ b/drivers/iio/light/iqs621-als.c @@ -271,7 +271,7 @@ static int iqs621_als_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct iqs621_als_private *iqs621_als = iio_priv(indio_dev); struct iqs62x_core *iqs62x = iqs621_als->iqs62x; diff --git a/drivers/iio/light/ltr390.c b/drivers/iio/light/ltr390.c index 3bdffb6360bcbaab4df1a2d39c8ea3813b5d6bd3..df664f36090301e21d6e2f92035198e15e018712 100644 --- a/drivers/iio/light/ltr390.c +++ b/drivers/iio/light/ltr390.c @@ -553,7 +553,7 @@ static int ltr390_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct ltr390_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/light/ltr501.c b/drivers/iio/light/ltr501.c index 7228611d4c59032d7b0e4f3e958cf24184de7f37..b92b5580c91cc7fce338a747630224687357372e 100644 --- a/drivers/iio/light/ltr501.c +++ b/drivers/iio/light/ltr501.c @@ -1077,7 +1077,7 @@ static int ltr501_read_event_config(struct iio_dev *indio_dev, static int ltr501_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct ltr501_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/light/max44009.c b/drivers/iio/light/max44009.c index 3b92362675dc96fd37272bb5c25c20717b8c25b0..8cd7f5664e5b1a13aceb3aaeac3f6eef14a1eaac 100644 --- a/drivers/iio/light/max44009.c +++ b/drivers/iio/light/max44009.c @@ -422,7 +422,7 @@ static int max44009_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct max44009_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c index ff7fc0d4b08f9905bd6514d5f1c64b5923ec86cb..65b295877b41588d40234ca7681bfee291e937c2 100644 --- a/drivers/iio/light/opt3001.c +++ b/drivers/iio/light/opt3001.c @@ -634,7 +634,7 @@ static int opt3001_read_event_config(struct iio_dev *iio, static int opt3001_write_event_config(struct iio_dev *iio, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct opt3001 *opt = iio_priv(iio); int ret; diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c index c6f950af5afa0f77a617bd2baf0a08eef5ec26f0..b81cc44db43c377ad8a8cc61c4430decb187181d 100644 --- a/drivers/iio/light/stk3310.c +++ b/drivers/iio/light/stk3310.c @@ -324,7 +324,7 @@ static int stk3310_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { int ret; struct stk3310_data *data = iio_priv(indio_dev); diff --git a/drivers/iio/light/tcs3472.c b/drivers/iio/light/tcs3472.c index 04452b4664f306339db42657c03e08bfc0ffff11..4186aac04902e6b12ee7978ef19c3b47faf773f7 100644 --- a/drivers/iio/light/tcs3472.c +++ b/drivers/iio/light/tcs3472.c @@ -327,7 +327,7 @@ static int tcs3472_read_event_config(struct iio_dev *indio_dev, static int tcs3472_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct tcs3472_data *data = iio_priv(indio_dev); int ret = 0; diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c index 1a6f514bced6e0bd542c14a279071d5820a462c8..f1fe7640fce63bddad57fbe7809ee60bbfd44e1f 100644 --- a/drivers/iio/light/tsl2563.c +++ b/drivers/iio/light/tsl2563.c @@ -630,7 +630,7 @@ static irqreturn_t tsl2563_event_handler(int irq, void *private) static int tsl2563_write_interrupt_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct tsl2563_chip *chip = iio_priv(indio_dev); int ret = 0; diff --git a/drivers/iio/light/tsl2591.c b/drivers/iio/light/tsl2591.c index 850c2465992fa0d83430236825ce94051a104272..b81ca6f73f92732dc66a9be35c9dbed5088e8da1 100644 --- a/drivers/iio/light/tsl2591.c +++ b/drivers/iio/light/tsl2591.c @@ -985,7 +985,7 @@ static int tsl2591_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct tsl2591_chip *chip = iio_priv(indio_dev); struct i2c_client *client = chip->client; diff --git a/drivers/iio/light/tsl2772.c b/drivers/iio/light/tsl2772.c index 26082f239c4c3aeabfe73ed100d6e885f5266329..349afdcbe30dd0c4c0fbabaa16ff7832e407e8ee 100644 --- a/drivers/iio/light/tsl2772.c +++ b/drivers/iio/light/tsl2772.c @@ -1081,7 +1081,7 @@ static int tsl2772_write_interrupt_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int val) + bool val) { struct tsl2772_chip *chip = iio_priv(indio_dev); diff --git a/drivers/iio/light/us5182d.c b/drivers/iio/light/us5182d.c index de6967ac3b0b3be02a96f3eb05aa58c49b0c87c7..c83114aed6b23f1d68068105b7c145bedf005b36 100644 --- a/drivers/iio/light/us5182d.c +++ b/drivers/iio/light/us5182d.c @@ -627,7 +627,7 @@ static int us5182d_read_event_config(struct iio_dev *indio_dev, static int us5182d_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct us5182d_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/light/vcnl4000.c b/drivers/iio/light/vcnl4000.c index 4e3641ff2ed446262c12380e520d3d220865c00c..e19199b17f2ef7ebd022c211605418711b8220d2 100644 --- a/drivers/iio/light/vcnl4000.c +++ b/drivers/iio/light/vcnl4000.c @@ -1456,7 +1456,7 @@ static int vcnl4010_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { switch (chan->type) { case IIO_PROXIMITY: @@ -1501,7 +1501,8 @@ static int vcnl4040_read_event_config(struct iio_dev *indio_dev, static int vcnl4040_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, + bool state) { int ret = -EINVAL; u16 val, mask; diff --git a/drivers/iio/light/veml6030.c b/drivers/iio/light/veml6030.c index 95751c1015909cd80543a559673f435d1a168f68..208a040ee345c3e137e4e58c397c59ce4d68aa30 100644 --- a/drivers/iio/light/veml6030.c +++ b/drivers/iio/light/veml6030.c @@ -821,7 +821,7 @@ static int veml6030_read_interrupt_config(struct iio_dev *indio_dev, */ static int veml6030_write_interrupt_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { int ret; struct veml6030_data *data = iio_priv(indio_dev); diff --git a/drivers/iio/position/iqs624-pos.c b/drivers/iio/position/iqs624-pos.c index 4d7452314209fedd2e41e52764c6d036535cbbb1..8239239c6ee272f7dd6c4a615a29dd7f28d4be51 100644 --- a/drivers/iio/position/iqs624-pos.c +++ b/drivers/iio/position/iqs624-pos.c @@ -181,7 +181,7 @@ static int iqs624_pos_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct iqs624_pos_private *iqs624_pos = iio_priv(indio_dev); struct iqs62x_core *iqs62x = iqs624_pos->iqs62x; diff --git a/drivers/iio/proximity/aw96103.c b/drivers/iio/proximity/aw96103.c index 707ba0a510aa5f2a30d3fa70ae81fa58b8dfbc33..cdd254da9e5035e3c3e062fe27982b4108cc6a45 100644 --- a/drivers/iio/proximity/aw96103.c +++ b/drivers/iio/proximity/aw96103.c @@ -422,7 +422,7 @@ static int aw96103_read_event_config(struct iio_dev *indio_dev, static int aw96103_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct aw96103 *aw96103 = iio_priv(indio_dev); diff --git a/drivers/iio/proximity/cros_ec_mkbp_proximity.c b/drivers/iio/proximity/cros_ec_mkbp_proximity.c index b1a4a923e788949b583eca68ebd878e33e385f16..667369be05553ea668bfcd79695645dbf1e56a25 100644 --- a/drivers/iio/proximity/cros_ec_mkbp_proximity.c +++ b/drivers/iio/proximity/cros_ec_mkbp_proximity.c @@ -167,7 +167,7 @@ static int cros_ec_mkbp_proximity_read_event_config(struct iio_dev *indio_dev, static int cros_ec_mkbp_proximity_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct cros_ec_mkbp_proximity_data *data = iio_priv(indio_dev); diff --git a/drivers/iio/proximity/hx9023s.c b/drivers/iio/proximity/hx9023s.c index 38441b1ee040c7c26047b0cb2ac443ecb8396df3..4021feb7a7ac70a135fb5fdcb832b9218b961fdc 100644 --- a/drivers/iio/proximity/hx9023s.c +++ b/drivers/iio/proximity/hx9023s.c @@ -874,7 +874,7 @@ static int hx9023s_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct hx9023s_data *data = iio_priv(indio_dev); diff --git a/drivers/iio/proximity/irsd200.c b/drivers/iio/proximity/irsd200.c index fb0691da99ee621e19013a64d122f097e793efd9..b09d15230111e6e5bbaae189adc26059a5a19f7a 100644 --- a/drivers/iio/proximity/irsd200.c +++ b/drivers/iio/proximity/irsd200.c @@ -648,7 +648,8 @@ static int irsd200_read_event_config(struct iio_dev *indio_dev, static int irsd200_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, + bool state) { struct irsd200_data *data = iio_priv(indio_dev); unsigned int tmp; diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c index e3da709424d5b2bd4e746df7adc4a4969e62f2a6..c4e94d0fb163740e5acb9bd1a3afd694023b04fa 100644 --- a/drivers/iio/proximity/sx9500.c +++ b/drivers/iio/proximity/sx9500.c @@ -540,7 +540,7 @@ static int sx9500_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct sx9500_data *data = iio_priv(indio_dev); int ret; diff --git a/drivers/iio/proximity/sx_common.c b/drivers/iio/proximity/sx_common.c index bcf502e0234236e2362c1eb63da3bc488b0178a1..76384c74fe0120e9d004ecad28b4339793edb414 100644 --- a/drivers/iio/proximity/sx_common.c +++ b/drivers/iio/proximity/sx_common.c @@ -268,7 +268,7 @@ EXPORT_SYMBOL_NS_GPL(sx_common_read_event_config, SEMTECH_PROX); int sx_common_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct sx_common_data *data = iio_priv(indio_dev); unsigned int eventirq = SX_COMMON_FAR_IRQ | SX_COMMON_CLOSE_IRQ; diff --git a/drivers/iio/proximity/sx_common.h b/drivers/iio/proximity/sx_common.h index da53268201a9fcdec9469fb5798d049146b08329..fb14e6f06a6de3485e0b817e4a069d5300ddfb6c 100644 --- a/drivers/iio/proximity/sx_common.h +++ b/drivers/iio/proximity/sx_common.h @@ -143,7 +143,7 @@ int sx_common_read_event_config(struct iio_dev *indio_dev, int sx_common_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state); + enum iio_event_direction dir, bool state); int sx_common_probe(struct i2c_client *client, const struct sx_common_chip_info *chip_info, diff --git a/drivers/iio/proximity/vcnl3020.c b/drivers/iio/proximity/vcnl3020.c index d1ddf85f53836ec34464d382426b187804964a57..bb6c9cc88b358de098543df8a0da7d22914c5e47 100644 --- a/drivers/iio/proximity/vcnl3020.c +++ b/drivers/iio/proximity/vcnl3020.c @@ -449,7 +449,7 @@ static int vcnl3020_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { switch (chan->type) { case IIO_PROXIMITY: diff --git a/drivers/iio/temperature/mcp9600.c b/drivers/iio/temperature/mcp9600.c index f1bb0976273d37fd662ed4e7e3f43c9ae82e2aaf..c2447860adfd6f4b1a9f4d61e3de301271fe05d9 100644 --- a/drivers/iio/temperature/mcp9600.c +++ b/drivers/iio/temperature/mcp9600.c @@ -200,7 +200,7 @@ static int mcp9600_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state) + bool state) { struct mcp9600_data *data = iio_priv(indio_dev); struct i2c_client *client = data->client; diff --git a/drivers/iio/temperature/tmp007.c b/drivers/iio/temperature/tmp007.c index 9bdfa94234929c35f3e4871bc291be21bbfba82e..fd4d389ce1dfec031652d4f7881ec0b72a015998 100644 --- a/drivers/iio/temperature/tmp007.c +++ b/drivers/iio/temperature/tmp007.c @@ -216,7 +216,7 @@ static irqreturn_t tmp007_interrupt_handler(int irq, void *private) static int tmp007_write_event_config(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, enum iio_event_type type, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { struct tmp007_data *data = iio_priv(indio_dev); unsigned int status_mask; diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index 747e89975d369f3c76aa49a96a7dc09f185e2557..409c417daa0cfeb5f7d90d10fe6f637a8e9fa5fe 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h @@ -518,7 +518,7 @@ struct iio_info { const struct iio_chan_spec *chan, enum iio_event_type type, enum iio_event_direction dir, - int state); + bool state); int (*read_event_value)(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, From patchwork Thu Oct 31 15:27:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858162 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 59C83D767DF for ; Thu, 31 Oct 2024 16:05:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=DGlZIwMvz6c7bRFXG/zclkCMmlIDWe/JH5j5KVgG3hQ=; b=gN7/qIYF2GQdANb69lKxj6vNSM 6aqmndjhg7fXPvvaLCrbGtngDj1tBAZ5HekMC61fzVdwAgLToV2MarMIJmvNenkv8sYVNJH28BbqP sTzvSm7b4CQHmbp7QnfBL5bj7x9jY4RKoXKg0/Wi1sNUCW+fJ+P/VJ4Lc7FaQY8jAOlpOHNQN+ygE 59rDH17iP0X4ekM40hAMoIXh/A/sSe4GGnVYNAExEr4QIgC0ILT0rCyCBbruK95cLzMyvLQzfzYJa aABmN2m2uL4J3ooVS9SlFf/EZ/DZ/1cLi99bzg5rPUUP8VIqdmjiG7GHOdEni/s6CUPjgu34+QVSf sLxzzRCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6Xfk-00000004860-1NKw; Thu, 31 Oct 2024 16:05:20 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4v-00000003zHB-1MTE for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:18 +0000 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-43161e7bb25so8583765e9.2 for ; Thu, 31 Oct 2024 08:27:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388436; x=1730993236; 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=DGlZIwMvz6c7bRFXG/zclkCMmlIDWe/JH5j5KVgG3hQ=; b=yjsxM6J5y0x/+bE6j62Q/lbVSoEkhfe+35sVafiMpSPV+ESIHHjU+lyj8Xp0AjKtoU RbgcQRA6KXhUNz4ftNrfA4WWknxbFiK1Ps5/CqNFooxUcR728NhwnpsvrdDk2c0ACMMu F8oNF/SMR6JhoR0+Tjqs2Yvk687HgoDbfjPZxqdLWVBTSz57TD7LcX5EanQqyeHhs9a4 MRDd0TR+jAtyXerVJsVyZSwKy0Dk06ZXrnl/LBL5U/0EdezLZKWDFACKSPzoXwgHzJ1C iyIwNgsGxyG4iJK54xaJTlGO5pzYJxqwTfx7UEI4EF3SL2iRAAJM+s8XBM0sOR0Xqmk2 6M8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388436; x=1730993236; 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=DGlZIwMvz6c7bRFXG/zclkCMmlIDWe/JH5j5KVgG3hQ=; b=h8PFjjqa0ALKGLsxLwpNFGbi8sZ8emh1kQZ52EiOzlWagKwp+OabvHRodU+bhq+abQ Kw+MHZhr6nbzqAne/SUpn2z2wFBDtsSwIUh3W+owpLGODlS8b9M90G8bTodOCVJbpOHc 3Y2v6e+RijH+bofIt9FWUV51P+JTe+tX+DlQHf/MTJ4HrggcF0+0E2V1wJ9EMkdL8gz1 9BiEtManwVWU+iJaRBl8LAFr/ezJvAEW5SwVtWbuqzS3B7so3SvD+ck50Ft3zYmkFD34 clbfP0x9ILJdig50hqB3MDpV2qMCOm+MoygHSNzZW5qe7Yek0CdY0GsOP/+IjTLEM/Fd Y7kA== X-Forwarded-Encrypted: i=1; AJvYcCUqRf/TilfFxW6pzk51afJ92ilkywSuiknI9kqwbp/lH5M4cuJByXn8hUfvINYw/rxqb5Sj7uurJgKfH6aRFxuz@lists.infradead.org X-Gm-Message-State: AOJu0Yw8TlGiXqwnzrgAZNJhXrp5MTZN2AnwleViyEprO++nD6y5upL8 iTmcI+2rDyZ7cQmB+3TQttlGpyHmeaa43UMsiuPhMQ+AEMElDrGN5eayIre0yYs= X-Google-Smtp-Source: AGHT+IHlxC61R96I9SqIUQT7uQ6GYz6mwcgP7vSir2EsAglaq5XnaVblxKW0wQCsPc9q6MdamJ1CIQ== X-Received: by 2002:a05:600c:458f:b0:431:5ed4:7e7d with SMTP id 5b1f17b1804b1-4327a82f755mr47859695e9.18.1730388435648; Thu, 31 Oct 2024 08:27:15 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:15 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:03 +0100 Subject: [PATCH v2 08/15] iio: accel: mma9551: use bool for event state MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-8-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082717_414558_DDAE754E X-CRM114-Status: GOOD ( 14.14 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the write_event_config callback now uses a bool for the state parameter, update the signature of the function it calls accordingly, and use a bool array for event_enabled. Signed-off-by: Julien Stephan --- drivers/iio/accel/mma9551.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/accel/mma9551.c b/drivers/iio/accel/mma9551.c index 605022f5239a6412827f4ba059aa18d490908720..6d73eec951263956f314f82542becbbae933de91 100644 --- a/drivers/iio/accel/mma9551.c +++ b/drivers/iio/accel/mma9551.c @@ -45,7 +45,7 @@ enum mma9551_tilt_axis { struct mma9551_data { struct i2c_client *client; struct mutex mutex; - int event_enabled[3]; + bool event_enabled[3]; int irqs[MMA9551_GPIO_COUNT]; }; @@ -162,7 +162,7 @@ static int mma9551_read_event_config(struct iio_dev *indio_dev, static int mma9551_config_incli_event(struct iio_dev *indio_dev, enum iio_modifier axis, - int state) + bool state) { struct mma9551_data *data = iio_priv(indio_dev); enum mma9551_tilt_axis mma_axis; @@ -174,7 +174,7 @@ static int mma9551_config_incli_event(struct iio_dev *indio_dev, if (data->event_enabled[mma_axis] == state) return 0; - if (state == 0) { + if (!state) { ret = mma9551_gpio_config(data->client, (enum mma9551_gpio_pin)mma_axis, MMA9551_APPID_NONE, 0, 0); From patchwork Thu Oct 31 15:27:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858166 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 12B7ED767DF for ; Thu, 31 Oct 2024 16:08:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=91AV8uDRorYbhW21+smtHmhnNIXchkEJXBaZcxgDOnE=; b=RR+pJW7n0ANwRBgmktKuQEN8T8 nIV5h7DK6N/4eYk4qQPmeJYlJh7lc4KC7AnrR/Pc2TQnVIxms8qVo+cFR9h8cuEcdIzmlwhicz5zL OW+eipAqKrKNE/DEqfRFE8GG2g9px/KXq7joPz4ZZemN+jEmtlNK6IFH63KE4fRbo8NJobBo279RT 6y2PXku694fNTFWLvvRSxQ9cZS21JOiu7FZ6QVG4l3BAIRTVAvv/tugKlvUgOy+xo1WtNJ3/Ot2Wn rslc/84OVAuiVRownNbIha/qPXzwsbxLv1EAqmw0inROFT4cFNAnGMrCQwosO+MILi+sboNLrmbJv WXYk4R+w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6Xj0-000000048Yx-2Gq8; Thu, 31 Oct 2024 16:08:42 +0000 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4w-00000003zHa-1zeA for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:20 +0000 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-37d6ff1cbe1so780042f8f.3 for ; Thu, 31 Oct 2024 08:27:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388436; x=1730993236; 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=91AV8uDRorYbhW21+smtHmhnNIXchkEJXBaZcxgDOnE=; b=vdi4yLhXZiHyFKX7Pqug6JqzazIbnJ3Zf5rjB5xMRbg7+nntUHmVPpYPFgNL0Rw2sj 2v4g71ulnYHGq8vD+v04lFE7K79pAeEW/fbZ3wOz7jQdWFdpzq8YHJm8RL8DlZYDettp j+fd5aHIzHitI+DBax+e9GmDqmu+xvGeAeisrmoScNTx6pbZRPVoOoDU6LaKF17nm/Pf KMQwsIl5sk+T8bYKyQ4F4lEsWZCGrQikuamlmimM8w6hBuZpmyQjVfqgOYJ+ENZHXaGP po/5mSdi5CAGbN2fdhnvDmgzEWdRVt55hXI7w5w+OSuc7YUR+Nq6GrMbh9MY9qts8CW2 lxug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388436; x=1730993236; 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=91AV8uDRorYbhW21+smtHmhnNIXchkEJXBaZcxgDOnE=; b=ajdMbrKZxpvEaZo23BrcM3Zo/mT+DXyWd0tkJsBzeyghY4/SZ4S6om5SqEkGOrlEww UVuYCpBlbjyHZY4Ns1wQPQKO7hZPPOuk1rrjwmvK/PHtCtFhzjPJz8p6fTPSbXGUakJR abTJk/pFbTQLbHrw/LFL4q/cDGQqv6CWlnYE/MvpIiEZqVHexAr8WuylCaZuI/+9YdsX jKEF8dGrJpZQN+lDp2jaUaCSW29rIV4Wa6Bibdqhe4Ohwar1tUxFlxCOBmck6P7diCZg 1UmwrXmElOccp69345dRLuFmQJzKlxq+O0i6Fp+TGhLBHqJ2NNcLEAJU7G8aqlN6Jdl0 dSzQ== X-Forwarded-Encrypted: i=1; AJvYcCXuJBfqaO6BQjfu3R2+3D3sI3V4ZOE+fczxDs4CzlGs4HW0nT527pU0odBGOBLmfPhkn0euPtKBRfqru1oQun1w@lists.infradead.org X-Gm-Message-State: AOJu0YyNRpxktxCcfA5DWOb7sghRs/CzD7I3hMf5RWNvVLr21CHCXuqC njXBauu8JsAAC0jtHyfzaaMgBSYWQntJg6d1jXxw2ru4hkPgh7oi/vLeib+tOMA= X-Google-Smtp-Source: AGHT+IF/NKLNlGsRd/1UMFl9TQ3C8cdSO5qCxZ9mwQG+PgwUSTDjp5JjuM36PcnisykqTLYhpsYWjA== X-Received: by 2002:a05:6000:4006:b0:37d:3171:f2d4 with SMTP id ffacd0b85a97d-381bea1c0f9mr3497430f8f.43.1730388436559; Thu, 31 Oct 2024 08:27:16 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:16 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:04 +0100 Subject: [PATCH v2 09/15] iio: accel: sca3000: use bool for event state MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-9-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082718_551970_5F615CB2 X-CRM114-Status: GOOD ( 12.22 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the write_event_config callback now uses a bool for the state parameter, update the signatures of the functions it calls accordingly. Signed-off-by: Julien Stephan --- drivers/iio/accel/sca3000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c index 36cbfcbba04d6920ba68bebd70d21bc3898a044d..3fb0f386c3db603714a746c28be36ee78d1b2a6a 100644 --- a/drivers/iio/accel/sca3000.c +++ b/drivers/iio/accel/sca3000.c @@ -1158,7 +1158,7 @@ static int sca3000_read_event_config(struct iio_dev *indio_dev, return ret; } -static int sca3000_freefall_set_state(struct iio_dev *indio_dev, int state) +static int sca3000_freefall_set_state(struct iio_dev *indio_dev, bool state) { struct sca3000_state *st = iio_priv(indio_dev); int ret; @@ -1181,7 +1181,7 @@ static int sca3000_freefall_set_state(struct iio_dev *indio_dev, int state) } static int sca3000_motion_detect_set_state(struct iio_dev *indio_dev, int axis, - int state) + bool state) { struct sca3000_state *st = iio_priv(indio_dev); int ret, ctrlval; From patchwork Thu Oct 31 15:27:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858167 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 A17F7D767DF for ; Thu, 31 Oct 2024 16:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=YFsb0303PjNI48V2V72P3jKH8c+L4bxDvzzJkb075Z8=; b=U7A2QPOmwMmJUsa1OLM35YgLCU epnCX1Z38nb9wcz0nXGRjaHTqbyjwXDDGrbVGAGh7u9/NqPJF9lNJF+olVDbxWo5PtrqOdYszOBed 6khwXdezbltu7jmTND5ujZot8EooIYNSpPRvdjACP+DyBYeI0KL9s3GIJPy+A+7Is5XQ5yzCNNwNg +Ul2Fyjzlz6tw0XajGZ9MglDUDeqY63LsRpAcmurx/iEeQfOZCrMgr4u2RHId39lGJs0oIQKl6+Xw Btycg/sDfXjjbwgDoZAnRZAPN9Q28PzbuC5Ym0+zhLqtKNmiwL+kWdHpRjKPYt1ZIvzFBlE55HCMM nuvOBwlg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6Xkd-000000048m8-1FUO; Thu, 31 Oct 2024 16:10:23 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4x-00000003zHx-3nJN for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:21 +0000 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-539e8607c2aso1153345e87.3 for ; Thu, 31 Oct 2024 08:27:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388438; x=1730993238; 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=YFsb0303PjNI48V2V72P3jKH8c+L4bxDvzzJkb075Z8=; b=BkTGB9UOupnL7zaUwf75zUVnNIDRNQcbfoVre2lTJSK8KUGNFwvqvlR44Wx8tlChig o3qyBZtAq/O+BUai/6ZAcrKvIlN3B3iJwaQvCGkGMPrrnayBg/s+AZcePcPdFdugk01u BgcS1kz8adAle+5YjLJhHGyNRTla6Ip27qzfPvsodcBoCY4jNqyz0BkHZXJH3k5WCceF m5P51Fq4tKUt+gahbMmt9Nfe9NjNgp80tdXPMdGVMaotetGh7nJ1s8+Vf/wg8o1c5s+p tY3XbZAL3mm+oY4N8e+R6bcMuA7vhRDqW36nq5cY0F5IyiXZZXafZjnoj/7voW0sWZ+o lMGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388438; x=1730993238; 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=YFsb0303PjNI48V2V72P3jKH8c+L4bxDvzzJkb075Z8=; b=vtOvYeAA84nHFFx636rnLJ0lBG7jAspwt/V5ZcP4Gwa6K9LoQ4S2UOi//vGSBIydLT vDVTOfdAsp9d7gs1N2SFgfQnhCdiDrWf56nMk0Uk4McZAqGJRnrZEourjgHbd5xpjocD ReXUIoi2OPr9EaaQi3kihTQn6FjyK4+5CglyhqWYnHvLRKa/3zl4/CXoKFQcoXG9lXXr mbPrstRqw1yyIAQuwsOU5JYj50UeSY4OHSC5ISb05osWFsj/WEh9K9ryWdrPFbTO+7aR SXFtlvB73UJUJ654jOSTIst3DUyYp1MKd+npjt/KsijH8ctYjPY7SOGOQc9eSiJdCYof 2H+A== X-Forwarded-Encrypted: i=1; AJvYcCWuHIQnzRTECeyZbAOIUmyHfM6SdTl6/kaVLV8ktrbBUXMfnwlaSz2dhdBhpZFvxwV37j7k/QvFg4FMaKWX2Kex@lists.infradead.org X-Gm-Message-State: AOJu0Yw3JKLlO38wyEgpg08w+AwKyYvgZO/rrojzK3a71LYu4SNNFFG9 suuS7B6OPmPWRM72ZB2yocoxe6pPR8Ym80ndnNMzf28ISfqSBFTX296Lrf4aMd0= X-Google-Smtp-Source: AGHT+IGZJyt5pS0YUa3i9kFlv6G7+rYaLlulmcGcSn6EUiy6VmRiBhyhHkSniuvcZZRqwpxExeJiyg== X-Received: by 2002:a05:6512:1255:b0:539:dca9:19a2 with SMTP id 2adb3069b0e04-53b3491c152mr9322585e87.39.1730388437575; Thu, 31 Oct 2024 08:27:17 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:17 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:05 +0100 Subject: [PATCH v2 10/15] iio: imu: bmi323: use bool for event state MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-10-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082719_984003_74ACE74A X-CRM114-Status: GOOD ( 11.16 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the write_event_config callback now uses a bool for the state parameter, update the signatures of the functions it calls accordingly. Signed-off-by: Julien Stephan --- drivers/iio/imu/bmi323/bmi323_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c index 76a88e1ccc1d89988eb52d6b1be8da0f5005f0e6..161bb1d2e761688dd740635f8a2830e9562d1b59 100644 --- a/drivers/iio/imu/bmi323/bmi323_core.c +++ b/drivers/iio/imu/bmi323/bmi323_core.c @@ -467,7 +467,7 @@ static int bmi323_feature_engine_events(struct bmi323_data *data, BMI323_FEAT_IO_STATUS_MSK); } -static int bmi323_step_wtrmrk_en(struct bmi323_data *data, int state) +static int bmi323_step_wtrmrk_en(struct bmi323_data *data, bool state) { enum bmi323_irq_pin step_irq; int ret; @@ -484,7 +484,7 @@ static int bmi323_step_wtrmrk_en(struct bmi323_data *data, int state) ret = bmi323_update_ext_reg(data, BMI323_STEP_SC1_REG, BMI323_STEP_SC1_WTRMRK_MSK, FIELD_PREP(BMI323_STEP_SC1_WTRMRK_MSK, - state ? 1 : 0)); + state)); if (ret) return ret; @@ -506,7 +506,7 @@ static int bmi323_motion_config_reg(enum iio_event_direction dir) } static int bmi323_motion_event_en(struct bmi323_data *data, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { unsigned int state_value = state ? BMI323_FEAT_XYZ_MSK : 0; int config, ret, msk, raw, field_value; @@ -570,7 +570,7 @@ static int bmi323_motion_event_en(struct bmi323_data *data, } static int bmi323_tap_event_en(struct bmi323_data *data, - enum iio_event_direction dir, int state) + enum iio_event_direction dir, bool state) { enum bmi323_irq_pin tap_irq; int ret, tap_enabled; From patchwork Thu Oct 31 15:27:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858094 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 AA526D767DB for ; Thu, 31 Oct 2024 15:35:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=E+Wt5gEXGTTMFhAf0TDuO7kCimt1FNZkZpqrNk88/+4=; b=ETaf/wgj6/mVYfMH9DjqE2zWEP GRjuF3iDOnGgXSMNn+mDOlN91no0MhrFjIE48y8KbKhMUS2SKyAqN9LCwYVda4JdAO33kFEWTo32H h3FNwWlAx74oJfFvaTuVjEGHVkOi4zGdZMzpu7A/F4a6zxCRYQnBIaflqtg5Z3FUzRHpdk99t4MbA tNgVVbGVrD5LTaaNv7o3qWHeTYX61/mEB21bx+VJ8xLf/LTtLsNFzRI/UROIIG8vXTBV0PIc99HlW 2fdAGJ1bvhQ36MrCR64xLQZa5xzKSdbmm/Zi+PNvW8LtAoKI/mnQ5QND0irdJnLB1WjqUZrs2syYQ H4dC6DbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6XD2-000000041hA-0u30; Thu, 31 Oct 2024 15:35:40 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4y-00000003zIJ-3tue for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:22 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-43158625112so8768785e9.3 for ; Thu, 31 Oct 2024 08:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388439; x=1730993239; 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=E+Wt5gEXGTTMFhAf0TDuO7kCimt1FNZkZpqrNk88/+4=; b=AvBxOmY0QKigk07D50AWtG5iHiw8fAq991Biyo+9AMpjEU7B31eKzGSZfNipRelqe2 HswYsa3a9kpbohxGwRo3srgV7xEP3PbqH2rR9RmVHJKK5Oogb5l0OIwaly/Zst5tbX7b DLrbdUdO4fO2Cze8Hn0KRuiSZQrq87MHzgD9vv367ulexdvqQAiilKeLCXNsyoVHpBUl sCY83BxouLxaF7+KW3kCy0h0V91c+RHU1q7fJGGb6jMgtys8qaRfvbC/ebuBG7BKdFuR mJLcNJy39bk0OoTh4gBJBYgqqkasUF6aAM0z4DkKIa/0EsQkS19zE1BMPcbQTjCfTo+d LJag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388439; x=1730993239; 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=E+Wt5gEXGTTMFhAf0TDuO7kCimt1FNZkZpqrNk88/+4=; b=v6xNaekLgXTNlsOqZelsNIbAEg4Hw224JMnIDOXLrO1K65vBZrXXnIAw00fpIcDTWw doflFgGv0urnHchpHIyt8OQCmes9tEhyxbI8AZAt0bVjYIICtb5PkkmJ8LsaV4SgHGjZ 6WGwlE1QNHklgtIxQ6RKOuS3oEaZb0KuZOzMNcAdqtMhXhehfD2VcecB7mnv/7FhgYcF QFemX1krc+NQNI4MLPfUNOqs3cb0pl4bWLQ6Fg+qkussW5UpyFemIIXMqO9wdC8/Cv0N FqcE7KTsow16QhdNjHcYLJsnTrdaUaNtpBgwYDn1TZ+8s8aJoaHGqS3OiUUW0X6CQlWe Dl8g== X-Forwarded-Encrypted: i=1; AJvYcCV+3KsbVQgfpeBw074wdB1pHs88uz2DFiIugYfcOQwQpno8zxEOO+i5rHntxuskOmqpoiXHMXThWj+ob4lzW575@lists.infradead.org X-Gm-Message-State: AOJu0YyUmnjGGRGz+P+vcSoB5SvwS4W2AvfJdjqyj9BtTHcUalf+t2ol 98n0IsyzqHrAp7Z1YuVuP/f/e+nLtKV2NHwRmy7SaF/MxG2pQ6d9yaRQxR5C78w= X-Google-Smtp-Source: AGHT+IEyu6FJS8+aBQtlI/2iMWr0qg8SLYMIc2U9veyCeAFrXBtLbW2/W+xR+K+a9Ow41bs7++cXAQ== X-Received: by 2002:a05:600c:3ca1:b0:425:80d5:b8b2 with SMTP id 5b1f17b1804b1-43283255489mr2254255e9.16.1730388438884; Thu, 31 Oct 2024 08:27:18 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:18 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:06 +0100 Subject: [PATCH v2 11/15] iio: imu: st_lsm6dsx: use bool for event state MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-11-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082721_000417_980FDC40 X-CRM114-Status: GOOD ( 12.60 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the write_event_config callback now uses a bool for the state parameter, update the signature of the function it calls accordingly. Signed-off-by: Julien Stephan --- drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c index caefa15e559b8808051ff1c7f82c3f36c947933c..509e0169dcd54e773540c4e3f1b56e5b737f80c3 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -1865,7 +1865,7 @@ static int st_lsm6dsx_write_raw(struct iio_dev *iio_dev, return err; } -static int st_lsm6dsx_event_setup(struct st_lsm6dsx_hw *hw, int state) +static int st_lsm6dsx_event_setup(struct st_lsm6dsx_hw *hw, bool state) { const struct st_lsm6dsx_reg *reg; unsigned int data; From patchwork Thu Oct 31 15:27:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858095 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 F3BA5D767DB for ; Thu, 31 Oct 2024 15:37:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=CuKYisz+WfuMrY46Ard53ju2b4imnRFwr+IipE+GsB0=; b=mmeyT7E9QqUaAFymxMkTsApLDy DUdVez7ZuuDP5FB2h3mJnvRzPC7FPC60/H2F4NViO7o8BvXFhjKWAYj7fQYMb3FJsoD2tMXdcUrTW MDohcmT+LgVnYGqM/zgfZaBLWxNGG9PRHQtBuIGhBNOR+e3t7I+FZuhZjYQzNIrUyTnS3XGUWTYBB /CrsOhwriDHgt2FudRM/gwysgzAOsdrhrUW/cu4aK2NKftPiXTqDRTcMAt7O4JKidVzPH3M4HymTL 7d2FGJ13c2kdqQnZKO6+nFcZ3ttJ8vHlRuSdvy9mavd5vIZnpteTjkzfJGuHHwXXISfS/+1IhqkcS yw5L3c6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6XEg-000000041xw-21RS; Thu, 31 Oct 2024 15:37:22 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X4z-00000003zIa-3lsj for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:23 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-43161e7bb25so8584505e9.2 for ; Thu, 31 Oct 2024 08:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388440; x=1730993240; 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=CuKYisz+WfuMrY46Ard53ju2b4imnRFwr+IipE+GsB0=; b=y0S3PnMR3Q0sTWM9oY+2fOfG05Upz1QGMEOmtx09FWiowdfafL3rYnNZdVEICOOpa/ JdocxWX9MtIA29nOZHCKpbq5MQoVBx3onc98h7Q12pi95qCQcNbzHgO1lnppDyB5jU6K 4VvFPIDwbQN4lZyK+zgyasJGdApfSFohD5D/DRn+N5XdrxbJ5G2+cOYxAoPQyDqHy9Ge bt4cv2XPli8WSC9lTmlDCZl1Gz+KRUiHdYXWsVsK7mV1KKHyn3QAqOONVhYJbk2huCDh 470PQUP9AFoJl9dlnBFO+A46RNfAH4gOI6k5h263JfCp7LDw7utOnR8dp33XNX/r8LLD uncQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388440; x=1730993240; 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=CuKYisz+WfuMrY46Ard53ju2b4imnRFwr+IipE+GsB0=; b=i66xBHtghvCD5daDPIj9K1u4S2c/mct2NbCWeULKjaCdD7R0Jrt5k3K2Dnmtewl5cJ ITYPjZMiQH9MHNuzNVlNset7vYdGJ8Eo16nCqQ7i7/0P4e85TdEN9xv86/18s5vxG12O VQ3s7BNOLjiakOqDdWAuwwcx/OrdOjNKmdWpRT/nNC6xj8VKrrZDkM2Ii2sJwSj695vQ XP7BA5gqjgV9Exv2x0tMuzFYc00S49R9gEKfj6CpPuK5RlpT+cVLoElBPkO0BPqULBoK nSbvcAQwQysXdvFqhFNz2SoWi8xaG2fmY/4241bmCuAr6TdOW9VG4u8qivucPjNdTV1z Tuqw== X-Forwarded-Encrypted: i=1; AJvYcCUXzx46Jo0qu96CU3d1dqGd/nTrIirVPGwqUIIoGQS/VBac8H2mlGvpZMIogk43+jKCsNrneQbpJjud4kLdEASo@lists.infradead.org X-Gm-Message-State: AOJu0YxZsdkr1eE3NJAZnWJIGnu42HaqU1R1dt4RjZ8mCm3PMml3mZW3 7B7HzsmUJut/dWRnj4Ts7Q6/GjiJk8M/oQkVwI0zip0HY/QQZ0QkJ3m11uBRkdE= X-Google-Smtp-Source: AGHT+IF6/i3o0ia+iwTXrJkK/PpU7s5AqPYFhPt+pBzmwQ1VaBg1134R2wQ1oOCceXnLNgNRe+dsWA== X-Received: by 2002:a05:600c:a04:b0:42c:b80e:5e50 with SMTP id 5b1f17b1804b1-431bb8a01dfmr64636815e9.0.1730388439775; Thu, 31 Oct 2024 08:27:19 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:19 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:07 +0100 Subject: [PATCH v2 12/15] iio: light: apds9300: use bool for event state MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-12-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082721_971940_040101C7 X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the write_event_config callback now uses a bool for the state parameter, update apds9300_set_intr_state accordingly and change intr_en to bool. Also update apds9300_set_power_state and power_state for consistency. Signed-off-by: Julien Stephan --- drivers/iio/light/apds9300.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/light/apds9300.c b/drivers/iio/light/apds9300.c index 95861b2a5b2d94011d894959289c5c4f06cc1efe..98bdf8bc298b664aba71d3c38d7f224808e5997d 100644 --- a/drivers/iio/light/apds9300.c +++ b/drivers/iio/light/apds9300.c @@ -46,10 +46,10 @@ struct apds9300_data { struct i2c_client *client; struct mutex mutex; - int power_state; + bool power_state; int thresh_low; int thresh_hi; - int intr_en; + bool intr_en; }; /* Lux calculation */ @@ -148,7 +148,7 @@ static int apds9300_set_thresh_hi(struct apds9300_data *data, int value) return 0; } -static int apds9300_set_intr_state(struct apds9300_data *data, int state) +static int apds9300_set_intr_state(struct apds9300_data *data, bool state) { int ret; u8 cmd; @@ -169,7 +169,7 @@ static int apds9300_set_intr_state(struct apds9300_data *data, int state) return 0; } -static int apds9300_set_power_state(struct apds9300_data *data, int state) +static int apds9300_set_power_state(struct apds9300_data *data, bool state) { int ret; u8 cmd; From patchwork Thu Oct 31 15:27:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858096 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 D2682D767D8 for ; Thu, 31 Oct 2024 15:39:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=zQxEAbikG832i9VGoZJgFYk9AEf9LJDD4S/9KzYjDMo=; b=OH+FdQRU83LzNYmBmNAsoRyjTb tf3oAHS3kgwL93Cm47b4nV8FwqfDs1fFeQRVRTm50SpLkFLCWr4iXYnJE1zEDupIZldyh8p9qwsCl F+yQ5Pd7KYmX7hOdTYeoXf+qI/SreEFqlGexDYI9f2bNin28Y8BqwNJwv1Uz9TLu57JRuN4Vf5TSD K0pF4EVGhQDAPHuqwx0idcWPrHi+axYHJvyPEdQqcNpndGSJRuMrSet+W+uPCDQzRf3C4gciV4pzP TwXGNPIFjGNZ46HVv+h1WXHEtfH0rYZ2KPp0fOK02zBNwm0Mzf6alUfkcHUt6bBMJe1/El8wttPMo NBMVNpaQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6XGI-0000000428c-3Jx5; Thu, 31 Oct 2024 15:39:02 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X50-00000003zJ0-1Zrj for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:23 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4315baa51d8so9620745e9.0 for ; Thu, 31 Oct 2024 08:27:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388441; x=1730993241; 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=zQxEAbikG832i9VGoZJgFYk9AEf9LJDD4S/9KzYjDMo=; b=tBpw9IYIMdm2F0hw677o/90CratfyhIqX1ZfShSUDOLb4o670hO0weiORK4J1jtJ1Q 3xwS4eZPQlFds5qR1HK12AOkqgPK55CBIJl3XCRxS3EttotOPkgS3LDrRBcxFtOvBO96 YxaLT0714+mTyUk1bJAkf33JlHzE/rDY+gfE1wTjWKPBvZ/C9Uo+4+kgzZgds2dVTv88 RKfSgoY1kC2bRSILZVuzuzsoR+KMMu4IlHrIk0dLzfo4L5lMsEuEzQIQumamhNmt5XOA DrwbzkXznSAWP3pZWb//qwysxQauBzBKXUNPvwlqwmTOwr7z7Pu1Gn9bRYx2OBrlivl3 WjUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388441; x=1730993241; 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=zQxEAbikG832i9VGoZJgFYk9AEf9LJDD4S/9KzYjDMo=; b=v0VXfN1dfV3V4+KWN1VWPzFZ5kEZTHB/XQ794jkXNS3pWTTRs51KkPL88khgVpvUkd m4iX8ATAaCATuqx6O4ceJbKhWu2sE3DNfUJtasA6MNyowugibw5LVlxrGiDieyBRi5rS +tqA0/He6kkhAry0ezUnWQ1EMh0aS9HnSy6UkI9CnhGotYpScad2gXa13JfyAO/90A6r UD3blGOuSnZDIuC5H1S2SyuN4Wy8kWkrgZUflovWnNEsxTbxvNzgrnuh3S+B03HSeT/F WFQKM8p4iJpQzLcmnN7htRPBPUcIRqlo3LliK0ibbM1uEcXfqZIicCsXT4Dyye6Ix9vS +n2A== X-Forwarded-Encrypted: i=1; AJvYcCVtOLDqoHzsC315QEv2JPyMpn9tln9dE56O0psCv0nvNpOjPkHVXZMiDr+xCgZ5LyLPVNIQJONjxAbs6IIMtL2o@lists.infradead.org X-Gm-Message-State: AOJu0YxBuPv0jipYZjZ2yJ8nTij9xn1WJJLtgk+N3T6SYt/2MFZzjU3J 7iwJdAcK/0nxolNh+mFRPjR7a0srOlbBD1chf4LYRQxRcpEGSMzqG0KKzYqFq/U= X-Google-Smtp-Source: AGHT+IGjIoWlwinfZhKBEIrRl3MA4S88J1QJFbpNcM59olLwoOacmA/yBDxxHNOfzvA4r4tdWOJ2fw== X-Received: by 2002:a7b:c848:0:b0:431:53db:3d29 with SMTP id 5b1f17b1804b1-4327b7019f5mr37167515e9.18.1730388440670; Thu, 31 Oct 2024 08:27:20 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:20 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:08 +0100 Subject: [PATCH v2 13/15] iio: light: apds9306: simplifies if branch in apds9306_write_event_config MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-13-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082722_459388_89E32613 X-CRM114-Status: GOOD ( 10.01 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Simplifies the regmap_wite if branch in apds9306_write_event_config. Signed-off-by: Julien Stephan --- drivers/iio/light/apds9306.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iio/light/apds9306.c b/drivers/iio/light/apds9306.c index 8adc74040db2bddf93fbb773e3519abcc726b9a6..9c08e7c3ad0c17519689a630d42fe9b90438dfe8 100644 --- a/drivers/iio/light/apds9306.c +++ b/drivers/iio/light/apds9306.c @@ -1125,10 +1125,7 @@ static int apds9306_write_event_config(struct iio_dev *indio_dev, } } case IIO_EV_TYPE_THRESH_ADAPTIVE: - if (state) - return regmap_field_write(rf->int_thresh_var_en, 1); - else - return regmap_field_write(rf->int_thresh_var_en, 0); + return regmap_field_write(rf->int_thresh_var_en, state); default: return -EINVAL; } From patchwork Thu Oct 31 15:27:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858097 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 2350DD767D8 for ; Thu, 31 Oct 2024 15:40:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=3YCxmOEeimQsWbxSuJOXydqCcdjHVKIXSn+X4nwfNto=; b=BvMd/10zQ71xwKmZleRnJyQd7+ 0hPru9TdJGN7ruuBOUIDjy+jvr9KjctjgxxebVONSzB0ZoVhw0JezrjWtrkOKt41uRZlInj42VepL WeM6aAznCNT3CGWhMFnm9qHeK0vOBec1XlTYAHFhM7nHOwefB32V3h/F0Tghy8D83pdZQJNFuHA1Z U2q8S6iQfziJ4ZGV9ksAoSO3bZDnbaCA4MUebW1SOM6Ah0LUVZU79MDzcOiQV1xa7mTMFqbt5aJ1W nRA1z7Qk3/hy68nGUEVLHN9NK1NJcMDOXgYWyTFbYdST7gQ2Fv47+Cxr4jVBRnxOh7QpJRkfnxbzZ Jb4OSkCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6XHy-000000042ZD-2Dfa; Thu, 31 Oct 2024 15:40:46 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X51-00000003zJM-1Roa for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:25 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43169902057so8739645e9.0 for ; Thu, 31 Oct 2024 08:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388442; x=1730993242; 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=3YCxmOEeimQsWbxSuJOXydqCcdjHVKIXSn+X4nwfNto=; b=GzOb6qsipR+WCKT5UsRrvmVbhwF3gwrnnveWaSQZCGliYfWQNCdjVM4jXJFSLlmyqi GraNaHmtuxXy+QxoruTpyJJwd/Bu2c5JgdnMjW+DpHS1SQqk0nOMRNgu30pvUxiudzfO Ttypu7HTxvSUVC1OIAl1mUMjrfEpl0WIfCp/xWg7b05F++tUQm7WEPcWaPTtuXCD2Ci8 N2EN7+4levTsSBMWKKm4c4OawrxCmwlkWxxQosVhXr7tz1tZWeKqIdMKDfrUmQ2pfL4D mp6uvid8vYfXaOXiNSEMfXBuwPtMI9T063ee53cvFeSvWYivc5KjayF6OR1Fa9TKyCMJ ckKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388442; x=1730993242; 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=3YCxmOEeimQsWbxSuJOXydqCcdjHVKIXSn+X4nwfNto=; b=xM7AeEt8Kfdbk2lkYeF2lGQO/wX2DGIALfhiz2PyCBljuVhTgrM5yakCup1Tl21bWI NAcS+nTGiSBez++A34nE+xSfTLrs30/WJNF10yeAlV2lWjBkyEQ8P8O4Ls7MO2M4lAVo rmX61Y2CA/JlZKOpACBulKXe0yFY7QR8V94ltryeYFhpAhMqi868jLTjnCcfPBmNPCLT Q+CQ/RREplzHdbb/qj/oIiLJef9Ns/x/+MBpDPyYhLHDo9cUc8synJQQ5cFN1rZFafm+ UW0ULBZm0WsflYaTdlEBucuP3dyj5LIM4xuBpRLLl6iO6GDQ7qnxzPrLEDncQfdX70xn uRSw== X-Forwarded-Encrypted: i=1; AJvYcCV4IL3ighK3xzSYJ9rL0Euw3IQfjMfBXzJNZQ8NIDPSbsmTJHdif/y3K3SJAOML83D4ItI85iDuSrez2BKwXm4g@lists.infradead.org X-Gm-Message-State: AOJu0YzoWTeV3/AaZzwbn8BdKvOlBsFd7PgsKKBesu+UGumknmDrQ00V 1AIJ1wys41VDswnzXWDdAL1GuhIZdgzmwRAi3gM+LSQ82eyTT6K1h1awiITt1uo= X-Google-Smtp-Source: AGHT+IGGmHVzwn16NX5EZfe8eqBf1qzHN/yW4gKwcafvrQsBbKKrxU9ApLBrOxE39bgUdtUYNo0xBQ== X-Received: by 2002:a05:600c:354e:b0:431:55c1:f440 with SMTP id 5b1f17b1804b1-431bb9de8a9mr66687935e9.30.1730388441668; Thu, 31 Oct 2024 08:27:21 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:21 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:09 +0100 Subject: [PATCH v2 14/15] iio: light: apds9960: convert als_int and pxs_int to bool MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-14-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082723_476903_367E8C73 X-CRM114-Status: GOOD ( 12.09 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Since the write_event_config callback now uses a bool for the state parameter, update type of als_int and pxs_int to bool. Signed-off-by: Julien Stephan --- drivers/iio/light/apds9960.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index a7f0cc99f236685900f89fbc48de3be0e9a40704..7b3da88885693c488807da459ceaa1cbb3881bcd 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -133,8 +133,8 @@ struct apds9960_data { struct regmap_field *reg_enable_pxs; /* state */ - int als_int; - int pxs_int; + bool als_int; + bool pxs_int; int gesture_mode_running; /* gain values */ From patchwork Thu Oct 31 15:27:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 13858098 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 D7FCFD767D8 for ; Thu, 31 Oct 2024 15:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type: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=+eFpuHm2y8IhduDZB/M513Whn86C6+1mG/A5c4wAVb0=; b=HI8CUk7PADlDX2vikrVxj9iXcA RZSrioS1UILRykfvhpAWboJWrdAh7Lv1aP+Au49+gupTNmtMV8hiRg7g3DtMi8oQFsuzwUjLG0nQR Q+me49geIifBN/Ga5mSmXmTFCUHzw3c21du6SAEIDtHqjcV7jECAHC/IrBZ51vdKBixanQt6IV/Jw EXv3rrFYSNiccADhoh8cigX0GDKwPUK3HfrCLuIrrmd7LHNReHOSgNb/0+7zbFEc70B6tbPLF1d5J GrgV4LNGNqBcOSPl9ZCyVlFThO2m/6XyOuo4eGE0fnApnkt49ve/6Pk8JOgChxst3jrlMNXYjnN3C jGID9/jg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t6XJa-000000042nQ-3Gxt; Thu, 31 Oct 2024 15:42:26 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t6X52-00000003zJh-3p3a for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2024 15:27:26 +0000 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-53b34ed38easo985003e87.0 for ; Thu, 31 Oct 2024 08:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730388443; x=1730993243; 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=+eFpuHm2y8IhduDZB/M513Whn86C6+1mG/A5c4wAVb0=; b=ZMsUxvkWNPk4NkBGZobVmR+PsX36YN5GJZD5oqmJPGcG3kJCsJuk8Qsr5MaRus0BBa sz/0PCbSKrdIqgB8mwQjfohrR51U5aTXHxRgst7Ijs2AHbEhTqgd2kGON2DcU8WirLOW TcQ3gzsJJWzN6oPAJXL7EWGLA3N9BTtD74zZCCBgQVcVzZ+kp+9FzFathFnRJVXSa1Sy qV1tQzcnlhN9NhGXJenq5rbrpyub7ewJOlEOwG8TVg6ub+rWLnnPw3i3qacYqgh109+g IFGzIQKlDPfPBT5mgQuI5hnxMvojadYP6OQ/ZqMjFW0EY+OHJSk5O4FXCqoOIdNOWeQh XjFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730388443; x=1730993243; 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=+eFpuHm2y8IhduDZB/M513Whn86C6+1mG/A5c4wAVb0=; b=FHGIsVzJ242zlIit1HT9PJH07xqiqam/FeVOJHg3Cj0EirL3DHkYQfefB6vJjCc2CZ M5NLh23zxii1dKYNIUXMHOxUozS6bwKyVzq+S7ud2boiFduIh5tjQK1YwjpYEQezgG1c D9IYISvB34yu9Y5mt3azu0ZDltiPRE1vvhjG5BBMxZlfythlc8A9TikWhXfAC/pVuIbo 9o3vR2q0CupnfuxS1BWLKKAArUvDYqXz5o881D0JvkFrnfktkKjAjO6JNaigZUOsjzt4 FHJHosXTw3NdXny4ekSG6kToCUT/JejeUhxOoLcpI4vIxFK/Hz28ztAaStm8nECPdGi9 FEng== X-Forwarded-Encrypted: i=1; AJvYcCV+SjVhcWkU4FEgdvCdwbgH0TmIfHPD3Y7a9rwyH8HmkY00patkgmQmXt/J623UtAQEzjZrhiBqVHYS0YrDyk8z@lists.infradead.org X-Gm-Message-State: AOJu0YxNfqMgtOHALPmzbNHSqUoSmZ8J7yXxCwxB0BoOgfUADbec5mBa T6COLFcv9H6qAIaGOU9fWXVPh8Du7N8OIEzu67y4wzlH/cJyH3WJVtsH/5AuSPc= X-Google-Smtp-Source: AGHT+IH9GtPIDfEpLZ8dUQUUPpUuX42GuH32Iyi1Pg0JcJazEapLSrEjVmA9nEmKnKLQDMdChJoKlg== X-Received: by 2002:a05:6512:2341:b0:536:554a:24c2 with SMTP id 2adb3069b0e04-53b348c8978mr10450230e87.13.1730388442599; Thu, 31 Oct 2024 08:27:22 -0700 (PDT) Received: from [192.168.1.64] (2a02-8428-e55b-1101-1e41-304e-170b-482f.rev.sfr.net. [2a02:8428:e55b:1101:1e41:304e:170b:482f]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf429sm29399475e9.12.2024.10.31.08.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2024 08:27:22 -0700 (PDT) From: Julien Stephan Date: Thu, 31 Oct 2024 16:27:10 +0100 Subject: [PATCH v2 15/15] iio: light: apds9960: remove useless return MIME-Version: 1.0 Message-Id: <20241031-iio-fix-write-event-config-signature-v2-15-2bcacbb517a2@baylibre.com> References: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> In-Reply-To: <20241031-iio-fix-write-event-config-signature-v2-0-2bcacbb517a2@baylibre.com> To: Mudit Sharma , Jonathan Cameron , Lars-Peter Clausen , Anshul Dalal , Javier Carrasco , Jean-Baptiste Maneyrol , Michael Hennerich , Cosmin Tanislav , Ramona Gradinariu , Antoniu Miclaus , Dan Robertson , Marcelo Schmitt , Matteo Martelli , Anand Ashok Dumbre , Michal Simek , Mariel Tinaco , Jagath Jog J , Lorenzo Bianconi , Subhajit Ghosh , Kevin Tsai , Linus Walleij , Benson Leung , Guenter Roeck Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, chrome-platform@lists.linux.dev, Julien Stephan X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241031_082725_014507_18F2DF6C X-CRM114-Status: UNSURE ( 9.73 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org return 0 statement at the end of apds9960_read_event_config is useless. Remove it. Signed-off-by: Julien Stephan --- drivers/iio/light/apds9960.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index 7b3da88885693c488807da459ceaa1cbb3881bcd..d30441d3370309fce9d6c717d42b829ff1db3174 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -749,8 +749,6 @@ static int apds9960_read_event_config(struct iio_dev *indio_dev, default: return -EINVAL; } - - return 0; } static int apds9960_write_event_config(struct iio_dev *indio_dev,