From patchwork Sun Sep 1 13:59:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786459 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3EAC01D1319 for ; Sun, 1 Sep 2024 14:00:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199208; cv=none; b=YmxvpibFnOFdFmbSPg4wpg4ReEJbyD/Dkm6Eb5mT4ryHGCz9WghK4tBxW2g20JvzI9FiP5/3cZn5Y7ycNod0iwIZ2+NgzZdSCPK2BXrfuiAOIjX5fQmaEDmF1fwvUj/Ifz8fymoJrMOiLI8WdiIywC9eAVNQ6oU21gtM0LG/2j8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199208; c=relaxed/simple; bh=n+XN5e57Uwqxf7KhwCyXQrxg/ejF/vX2alXXom/Uc60=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kAMm36SxLDVQBt7jmRduiASvSUuFuL4VLGcyOnAnyg7UzJYxOYG/CnLQxG3nzD1YHa+ba5fHPuLrvjb8cWJFrGH4vCRzfBTaPcLqaT6S+r8n77+NDcbNh9oeZSMc6qWdw1roGxKvmDE1ZOUuw4YjZ8oAlZJpoBHcserGPFDFICY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bXOSuf/1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bXOSuf/1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A811CC4CEC8; Sun, 1 Sep 2024 14:00:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199207; bh=n+XN5e57Uwqxf7KhwCyXQrxg/ejF/vX2alXXom/Uc60=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bXOSuf/1lHS/6RR7Ee3uJTT2MVVPjgcP3PrugGnhLJUbTBctHcEIxvuEN2HQ0QXDw skWgVupHu5vr34d7tJjg60KBY3qake+d0HdgjKfh58CPvFQGT9mq84ynL6g20g+7dq E0Q530dbOF1jvN/qrqQu5sbOWrPVtrd3tYzFS6hTzKIraFHwt8L4mLXuVJ06TiK5Cg T/oXvnAOrpBc+3nV7kbgAC6CfcM0Lpm2SoItwPu2xLOtSNqlE0hG41JwBO19p7guf8 b5mRkRvLtrR0omorua7Hf5dpQr+xgUBxpTpTzJcV96earpwr93bU38GCR3ay3u+D7a 9V2wc/9pyIHDg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 01/15] iio: accel: adxl380: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:36 +0100 Message-ID: <20240901135950.797396-2-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron --- drivers/iio/accel/adxl380.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/iio/accel/adxl380.c b/drivers/iio/accel/adxl380.c index 98863e22bb6b..9c9bee993fde 100644 --- a/drivers/iio/accel/adxl380.c +++ b/drivers/iio/accel/adxl380.c @@ -1719,7 +1719,6 @@ static int adxl380_config_irq(struct iio_dev *indio_dev) { struct adxl380_state *st = iio_priv(indio_dev); unsigned long irq_flag; - struct irq_data *desc; u32 irq_type; u8 polarity; int ret; @@ -1737,11 +1736,7 @@ static int adxl380_config_irq(struct iio_dev *indio_dev) st->int_map[1] = ADXL380_INT1_MAP1_REG; } - desc = irq_get_irq_data(st->irq); - if (!desc) - return dev_err_probe(st->dev, -EINVAL, "Could not find IRQ %d\n", st->irq); - - irq_type = irqd_get_trigger_type(desc); + irq_type = irq_get_trigger_type(st->irq); if (irq_type == IRQ_TYPE_LEVEL_HIGH) { polarity = 0; irq_flag = IRQF_TRIGGER_HIGH | IRQF_ONESHOT; From patchwork Sun Sep 1 13:59:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786460 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47DAF17F4F7 for ; Sun, 1 Sep 2024 14:00:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199212; cv=none; b=pnFWFp0x7cpfBJMjxQHkfyqho7rfdimnHiVZ/pWQ7PCGp4raBnux+wvNTguv4S4Hi3+JUT65c211R86p+rWkKFEEjKHUS/5gY92MP3ChioovHpEamlyd3j6CUq/GGrnHdTh+wuuIuKg0mE9gorzE/edGhsGiapnUQHX597Segi0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199212; c=relaxed/simple; bh=pUMWGNXOvuWoalJn9rzBb/WvYPyDxLDDF9d/TOrdWII=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jgwYag2yCScxzgoqbqsdOimszukNsbGwKlBOgpcDKn3POl8dTn/8uRkTxAwzixYDgDkkQ2zL6gt0t4uKhjPiUzfbZ2IbZNlauBaemXH+Mp9OOqD7VcMLY6atkp1yX2RWRcBlI6bLlA+rxxtTDyZmOOBKD9YoaHg8Sa6HEPz044Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SZPPOj4A; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SZPPOj4A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BC14C4CEC3; Sun, 1 Sep 2024 14:00:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199211; bh=pUMWGNXOvuWoalJn9rzBb/WvYPyDxLDDF9d/TOrdWII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SZPPOj4AaworO6OEpkmpUec/5dbOQR4tOF5HzYulTTyb8YlUXbjsD6CUxJdgrrV9M 5XPx4u1x8MshxXywNfCHdfs8AX/eTIRrbV+nOOx5CQbzA5sMzzauIw0oxXgGmxOGej ueeryaalMLGKJpfZTsIaWcpN2UB/20E5OSLb33vkfPudP7DPKRi/PuUFtQsZNCPyf7 Or5dIfHEBGCUxUP8xtbbHHLBwG9uovwUNiZRF83VrIRIhXFaYgLx8rok2pwrO8P245 QLmB3TBf0aEGYnk8uuYi/BUaQBT79CPrlqXl8MdtkGnLR1CIao0Sr/VMfvqn3mTzFw cdS2f1qcKab6Q== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 02/15] iio: accel: fxls8962af: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:37 +0100 Message-ID: <20240901135950.797396-3-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron Reviewed-by: Sean Nyekjaer --- drivers/iio/accel/fxls8962af-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c index acadabec4df7..a50c47f5179f 100644 --- a/drivers/iio/accel/fxls8962af-core.c +++ b/drivers/iio/accel/fxls8962af-core.c @@ -1103,7 +1103,7 @@ static int fxls8962af_irq_setup(struct iio_dev *indio_dev, int irq) if (ret) return ret; - irq_type = irqd_get_trigger_type(irq_get_irq_data(irq)); + irq_type = irq_get_trigger_type(irq); switch (irq_type) { case IRQF_TRIGGER_HIGH: From patchwork Sun Sep 1 13:59:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786461 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FFFE1D1319 for ; Sun, 1 Sep 2024 14:00:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199216; cv=none; b=DoO5D2ZrzSEdFLU96UT0+MJD8tRkgTCqsoRk7kJCkVAqXBaNiW1Wgjc6j1u1pClkqyQDQZfs/FByz80ljah4iN5t0cb9CNe9Pb9495ENjeWxVX6xpLDEgtVdg/9Srdbx80vvHCEUgc8pkPCo9BJIO2UKp+h182nkX+dWOGaTi24= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199216; c=relaxed/simple; bh=RohKoi9RNZkbwxqX0DvxllErixx47Hn4CoGLLIHaQmU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lgc70L3rBu4dOqLZKg7iYFvCLfLk1D+CYTbIFMawg09Very/M3E6ktBXwABEtlWuUQXAI3txarE6JyD+LVyD6ccTc0+/7avLnKL1tEZEuqZCXl/jVXGbcFrzw0v6rg0UGGnhjN1OE8Rs1ll1/yBV5Dp36w8Cy2bIKKZMVxjMFK0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D9hDtpqQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D9hDtpqQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AEC6C4CEC7; Sun, 1 Sep 2024 14:00:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199216; bh=RohKoi9RNZkbwxqX0DvxllErixx47Hn4CoGLLIHaQmU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D9hDtpqQq4EEhXETJ0PcsF1IAceRmnX9ftMMzchAnCXnYCLBcGg4nzoHm119p4KpZ kz0dP1zZzRf6Sfv7P1BlBN/Ik9reY4BSJujZm8TyD/fq4vmU1aYQhw5h4m9Qb/OKz8 YGDstpVPUn55Qaj69XFeU1lO6H1k98VBGGb/GqRhYMtVJZiPA5PDgUdx9v7XO36WOw vpvBm4JEdAtUi+/Ga6DaE7dYvnfOT3nvzr4gzH1x9I746IkVExvxAR3kXgiI5oItJh mgaJpMQOsYdECzZ1CMYJlcroiAFgWqWhI0ajGqDLV7l2jX+BTgisCyr69SgmuMLoJ5 euXAZpBu9vkyg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 03/15] iio: adc: ti-ads1015: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:38 +0100 Message-ID: <20240901135950.797396-4-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron --- drivers/iio/adc/ti-ads1015.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ti-ads1015.c b/drivers/iio/adc/ti-ads1015.c index ca432c49eab1..70f60d018049 100644 --- a/drivers/iio/adc/ti-ads1015.c +++ b/drivers/iio/adc/ti-ads1015.c @@ -1033,7 +1033,7 @@ static int ads1015_probe(struct i2c_client *client) if (client->irq && chip->has_comparator) { unsigned long irq_trig = - irqd_get_trigger_type(irq_get_irq_data(client->irq)); + irq_get_trigger_type(client->irq); unsigned int cfg_comp_mask = ADS1015_CFG_COMP_QUE_MASK | ADS1015_CFG_COMP_LAT_MASK | ADS1015_CFG_COMP_POL_MASK; unsigned int cfg_comp = From patchwork Sun Sep 1 13:59:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786462 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E9BF1CFB9 for ; Sun, 1 Sep 2024 14:00:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199222; cv=none; b=WafUXKultYCHkipZA00r4d1LKuq26H6z847Kxc8SbDPAIoC96EiSNwuXqPxfhTiNSPKatFKyDWzFGNsfXexf7r0RdOx+OhIICqwDEqRHsaSIt7AXhzKdMe5k+3SgOvg3DKVN+CLDq2tkC5LZSRnx++fcZ0OYUT90kEC12qUYc8A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199222; c=relaxed/simple; bh=sTvmqCgKGsf9SLpV6XscDCdQVEBV+z+GGIOKOWfIsIw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NY/dTxergW6XM22IWrneB6XinNhiUOwPYjmW2poJjfi8pEC6N2BTujkHVOdWbRQ1TI8hF7+lVVuPNGMGgum71Q9i3QFUrdeklLpvgxInE8tyPvzHR3hInSdfIpI3E8KLmKMH+j1OODuJSwivrg1yv7Zy7IDgaYdozvAcEsI7UmY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N99nca3n; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N99nca3n" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3C39C4CEC3; Sun, 1 Sep 2024 14:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199222; bh=sTvmqCgKGsf9SLpV6XscDCdQVEBV+z+GGIOKOWfIsIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N99nca3n/3ZqCVZIWz5pSSfG1bkv2ihnt5A4cq+apza3cY0c4tCk8d4EwH4Ik5j82 zGks3T9Dp3XLvDxMJ9l4SPew38cxXT3ivJtIIuNRARzHumiIOJqYE0qJV/bXPQXTdw ijqoGAgkzOILwB49lqY+scoPlyHNl5WdsvO3QvFTrHYl9nVEhtWsXV5h10lpdIy9xa C8h1FazrxYSjKAGWepBHQP4f7xvGIlOBQm0hiJAY3loaoY3cd6c9/GsEjfu6UYyoOb kE0rh7PTxiTEHCvVSq4QfJBnBXttNEFAGpNgm7O6Xyn3f6NAOYLBr4uUv8oq7vChex yV/BDvZshwzqA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 04/15] iio: common: st: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:39 +0100 Message-ID: <20240901135950.797396-5-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron --- drivers/iio/common/st_sensors/st_sensors_trigger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/common/st_sensors/st_sensors_trigger.c b/drivers/iio/common/st_sensors/st_sensors_trigger.c index a0df9250a69f..1c51ac110078 100644 --- a/drivers/iio/common/st_sensors/st_sensors_trigger.c +++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c @@ -134,7 +134,7 @@ int st_sensors_allocate_trigger(struct iio_dev *indio_dev, iio_trigger_set_drvdata(sdata->trig, indio_dev); sdata->trig->ops = trigger_ops; - irq_trig = irqd_get_trigger_type(irq_get_irq_data(sdata->irq)); + irq_trig = irq_get_trigger_type(sdata->irq); /* * If the IRQ is triggered on falling edge, we need to mark the * interrupt as active low, if the hardware supports this. From patchwork Sun Sep 1 13:59:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786463 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A1691CFB9 for ; Sun, 1 Sep 2024 14:00:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199225; cv=none; b=Mg9V4Iadd2TQ0+urMKJJD2qfdtaTlUvQmdtQqKpnS+r4zYbbit0w4aDBqFMjGT05/aP+MMei0Ntzjh3PeWHvyGhU92/WrtlCGSoDn6s7UdaNV1wxxkbEEeukYG25B0nV8J314FqFldOc6RrDgoZ2NcQtrWVbI+odWun9sXpfoxg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199225; c=relaxed/simple; bh=Mhp6HRs/zBD+oOWJXdm4KkwZHLx7N9HeFcqIWsTbHLg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Q6JIPMN8wIx+dwIg07HmJXN3tKNJnuK79GXmwKG5bPsOTSL3WDhFDbcigaSkRfTSEAqrkawBeG81Nzt8Skdkm1WHPmOMxuGb6eCodMz7WrE/zsrNRKZE0oc9HEE1MoRxuPLq0R7w2GWEoBaiVgpa4K4h+Am/Rb/VM3Z9bYZlrPA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bQbBm3bZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bQbBm3bZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78A27C4CEC8; Sun, 1 Sep 2024 14:00:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199225; bh=Mhp6HRs/zBD+oOWJXdm4KkwZHLx7N9HeFcqIWsTbHLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bQbBm3bZcCkZWnMc9Gr/a4SF9VJgrvSneFyyDm6TuoZhHOEVgwYM+5azHLnEkI0G2 w9qbSO+HIDkU67c7Dwh6h5ip82cTTa5icwSgvZrj140kNsXpoJnedU7Ji+0U0nqXWZ mmv+Bvizs4+B5CuMHjQnmPfa4szJ947gXb06KizoL7rVpM2+Qif6kyUhYQ2diSSBYY WSiHxqp8VrrxpmEB+aI2yr7QrKjyj6alwu/7X1I0nHbp9eGofg6V+G7IkJ0IOTmCh9 +TAnGtcnIRMoCXDArLJ7F8UwWE1Srw/p4D4giJng/dQxKX7N+CLd01a6PsCvpEf29a jr+sQhg66/KhA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 05/15] iio: gyro: fxas21002c: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:40 +0100 Message-ID: <20240901135950.797396-6-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron --- drivers/iio/gyro/fxas21002c_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/gyro/fxas21002c_core.c b/drivers/iio/gyro/fxas21002c_core.c index c28d17ca6f5e..877a2b07cb23 100644 --- a/drivers/iio/gyro/fxas21002c_core.c +++ b/drivers/iio/gyro/fxas21002c_core.c @@ -849,7 +849,7 @@ static int fxas21002c_trigger_probe(struct fxas21002c_data *data) if (!data->dready_trig) return -ENOMEM; - irq_trig = irqd_get_trigger_type(irq_get_irq_data(data->irq)); + irq_trig = irq_get_trigger_type(data->irq); if (irq_trig == IRQF_TRIGGER_RISING) { ret = regmap_field_write(data->regmap_fields[F_IPOL], 1); From patchwork Sun Sep 1 13:59:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786464 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FADD14F9F5 for ; Sun, 1 Sep 2024 14:00:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199228; cv=none; b=RsPUrSzJIvzBsZnp7dr9127HqKYaCK+3/oQx1Iqggiu04FYd5x34mb2ENWZNNybxrxOB8TUPfalm92MimLptKiOeOc6dxM91Za1CzLh5M18MLgustkToXXifzg0i3sLRScxBvCJKuk6TF0O5XP0sVmp8dPApbEfBA9O8MXr+mOg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199228; c=relaxed/simple; bh=o5ye6VJcLFLbcvshdI/MyQUWelb5qkNqVLYB/v2VqiQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HhJNumOogkKq/27OdNVKbFjo+YQLC9n2hgaEcTGqxoC3QdOw9CC4FhBRBywnpSuo2lRm5DE3Q5qWyeeWxUSIoAbWYbxFmJ3dNWxHJwT7M07IWAtpLh4JoKV3LXUF+HNtjE3wWbInv450qce8XP1uMc+Znv9wdY7Q9nvscoHA0y0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LFdvCKkx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LFdvCKkx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67C26C4CEC3; Sun, 1 Sep 2024 14:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199227; bh=o5ye6VJcLFLbcvshdI/MyQUWelb5qkNqVLYB/v2VqiQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LFdvCKkxFiJmU7IstMO8w7i5HXIwH8KWSr/ZV8gHF3o5FejFx30arFk9hmwWo3gxD QakphDOyh4LvF2RkYYcvi7Puw/HuDo8J/MuHUEs2U+CQLwQQR7vlFbDZvCdtgDXFZ9 Xol+BH2XQKg62b9FK+f6zCD+JDP/yjM9fJlA9OPoo4JhsTv8u+j9RQvXW46DGn44eM YNv/ot68ivsKhjnfim/DSRJTMPwTA5y+dQR4udlJLaeDQTahf2xrFyAyqBIoCvV5qH Ht+RU8Ivr6xjjKawixIvLsPAJz4JI9o9lGaCtIZGfq5JW3121FxvR3wwdXSkOqZumu 4npP61DYOx/FA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 06/15] iio: gyro: mpu3050: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:41 +0100 Message-ID: <20240901135950.797396-7-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij --- drivers/iio/gyro/mpu3050-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c index 35af68b41408..b38d0678277e 100644 --- a/drivers/iio/gyro/mpu3050-core.c +++ b/drivers/iio/gyro/mpu3050-core.c @@ -1059,7 +1059,7 @@ static int mpu3050_trigger_probe(struct iio_dev *indio_dev, int irq) /* Check if IRQ is open drain */ mpu3050->irq_opendrain = device_property_read_bool(dev, "drive-open-drain"); - irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq)); + irq_trig = irq_get_trigger_type(irq); /* * Configure the interrupt generator hardware to supply whatever * the interrupt is configured for, edges low/high level low/high, From patchwork Sun Sep 1 13:59:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786465 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4788B1CFB9 for ; Sun, 1 Sep 2024 14:00:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199232; cv=none; b=AhiZ+5XM8BKlSOFAzEyTGqrWKw5F3VPkqj6x9gQsn2RZCCLPUC1OWg/MEspD6I1FrppyQCWQkvJjsMn/kUCzGQ4M9kkxiJjXWtpQ5QEwAfUrqAKlnkknr7OOpTOTddv8ldGd8bZ9O1XuBqe5FUP65BIvYdTy3FC3bEA5ncIL5qo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199232; c=relaxed/simple; bh=N5FRNBOwx7ymqBM7YDf6pM0TCRzhS/ZrguB2VGaDgw4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dYWWLGk5eVRVcc2JlOmNy46Du2xWZn589PEvReNuDrLbb2SWhJkdFlIy33S3BHm5gMLSsjIQE1tagvx8R2ir5T1GN+DFufAyQsT67tLccEKQ3KCOTXU3D9U7MC7XlAOiccsIaqsG818CSmyyZgkkHciBjUyQpPT0nwbD87F7WGM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QUAteJDI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QUAteJDI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52858C4CEC3; Sun, 1 Sep 2024 14:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199232; bh=N5FRNBOwx7ymqBM7YDf6pM0TCRzhS/ZrguB2VGaDgw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QUAteJDIjRVv68GDkHg4/IjkoetJfeeTdV3dKzRv2/xFDKo+oxiEfqFKQLyzoQkFn H5xggU1DKn0qu/asqA31pcHmEyuTFUN15ZWeO5tc64GuvrobFK5isHn0DgVvkhoKZ9 YB83HqBPqsZEdrrKIMwIwn3pAS+MROWhto0ERZTac1IWp5NRhszghyrpyDfdfksWH4 I9f+cGgBgphGnL18Ps6t6ypJlHExKemw7ovD899FHjbnWr4Qa7BHLduLubH+XuRMw8 oao8A0ldWrNpW68zNj2sWtu7lMkH/7DNTNq+aT9GBwE5O4kUWuOYcFhDX+GYJqqbxu tQwCmn2ZSZg5A== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 07/15] iio: humidity: hts221: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:42 +0100 Message-ID: <20240901135950.797396-8-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron Reviewed-by: Lorenzo Bianconi --- drivers/iio/humidity/hts221_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/humidity/hts221_buffer.c b/drivers/iio/humidity/hts221_buffer.c index 11ef38994a95..0272065cc44a 100644 --- a/drivers/iio/humidity/hts221_buffer.c +++ b/drivers/iio/humidity/hts221_buffer.c @@ -81,7 +81,7 @@ int hts221_allocate_trigger(struct iio_dev *iio_dev) unsigned long irq_type; int err; - irq_type = irqd_get_trigger_type(irq_get_irq_data(hw->irq)); + irq_type = irq_get_trigger_type(hw->irq); switch (irq_type) { case IRQF_TRIGGER_HIGH: From patchwork Sun Sep 1 13:59:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786466 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C3801CFB9 for ; Sun, 1 Sep 2024 14:00:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199237; cv=none; b=jp5yI+aHDCE9SEgctjRrd1AMwtLbVIfQX8k841vRfSk/jTeW7Z7d14bcTBDMn4LF4z8pcrk0z0UVN5juZ9x3E8PseVz6rL3q2g4rBRaGdG165lQUm8xT40xUqDKPwUeCmCWYuetbkYOaINoIL3yhOvM89essf6/7ZeqvuB1Hrqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199237; c=relaxed/simple; bh=OkPIf7ka597J+EvGJEVW26+i07cp/LZcdnwT3yS5yPE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QLnKnDt1AZMQB7E5XSYJnaWyzvpI76dnww5UdFUPn4ouOTQv67i+fUdpbZF9Zg4tLX/i9WvWrKkc4CxVBtpDm239/FVrwPsPEJDIm4s6ierDjPeTA0zAPfV7jOXoNOPS1acWC3b+8ZEUDLRKhkCbPyqm1CEJIcqtEIEYZFUnq+g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=s5ErDBN7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="s5ErDBN7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD708C4CEC8; Sun, 1 Sep 2024 14:00:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199236; bh=OkPIf7ka597J+EvGJEVW26+i07cp/LZcdnwT3yS5yPE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s5ErDBN7hmqturdF4b9SvIYx+sUQk1LGvRvr3026xeUoljvcBvI3Fg5b2gAH7OlP7 nQLTxvZkiXOAUbvCF1g1QvWXj7Ij7yPRZvY1bjlMMuiv7uJvJxCFAWFLZcho7ENeTG NrdmyvOIC+q2DfZ9RaGTJp9ynSYCj4CMmQ24WrwmY+PZjOnDlhQPQX28dLz6NLArP5 ruqOZiqPYshteRJzLtwTxWPti1EtkVuW+RUQEkwkwtI+a8NKHv/8XEPJWyEVa/vmR9 Pso0l8VPlwZWj2tW3y5lYFquIKv84Jq10Bxro1S4VOeQfcS1IsA2vvfgiBrxb8Yckk zXD41FTpKilCA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 08/15] iio: imu: bmi160: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:43 +0100 Message-ID: <20240901135950.797396-9-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron --- drivers/iio/imu/bmi160/bmi160_core.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/iio/imu/bmi160/bmi160_core.c b/drivers/iio/imu/bmi160/bmi160_core.c index 495e8a74ac67..3665fcd5ff0d 100644 --- a/drivers/iio/imu/bmi160/bmi160_core.c +++ b/drivers/iio/imu/bmi160/bmi160_core.c @@ -690,17 +690,8 @@ static int bmi160_config_device_irq(struct iio_dev *indio_dev, int irq_type, static int bmi160_setup_irq(struct iio_dev *indio_dev, int irq, enum bmi160_int_pin pin) { - struct irq_data *desc; - u32 irq_type; int ret; - - desc = irq_get_irq_data(irq); - if (!desc) { - dev_err(&indio_dev->dev, "Could not find IRQ %d\n", irq); - return -EINVAL; - } - - irq_type = irqd_get_trigger_type(desc); + u32 irq_type = irq_get_trigger_type(irq); ret = bmi160_config_device_irq(indio_dev, irq_type, pin); if (ret) From patchwork Sun Sep 1 13:59:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786467 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20AF91CFB9 for ; Sun, 1 Sep 2024 14:00:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199242; cv=none; b=V07XDueLfLaTeDPI8rnfm66lGHtd2oVY/U+gDc2po6sweN2f8BxmMt9wI8IIjNZmujGDQEvto3QVuyeoUXOUjcxvgz8D9NFiSvccCGwQZj3L4Gh0izjtHVUqHxleiAxOxG4vBuCSyDUuns+r/g9r7YIwD4q/Hkvm7toKwaSeaFI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199242; c=relaxed/simple; bh=iPAYHOG+gWjcUfaHXJtdksQmeN9rJXf5j9qduQJ1d/g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t5FlMTdNra7zCkGSo2n2Fte9hzjYh+CFzEUtmPHtuj0GUxXnKYyWGiUlHFISLJFuw0N4mw87x8a1q8Bbe3vbWqffjiLdUkpxzucC/zULRKxxPY0skFBTfqUT7ieaqDAgShwIytUq44EtxU1m2562FGvF6Q3otp5MQ35oV5r+uX4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lke6fgLC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lke6fgLC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DF02C4CEC3; Sun, 1 Sep 2024 14:00:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199241; bh=iPAYHOG+gWjcUfaHXJtdksQmeN9rJXf5j9qduQJ1d/g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lke6fgLCmZPvPa+2Lq+AciRbqaAuN0LSHH7G+hPpXVdHWC0C7GtZOKPMSacvxY0N2 CmXuq6bwpJyO6T8I7mW7Af4ZHNyIWq9W50NCbFlOqorWMSLhMJkcno5DQX4VDlF+sM kyWAoVrenwf8GZMVNlzeN5kziP4CG4wTnpFuoyOuAKZPqFH5XkQzkQh3MAmRk0bU5h AKdeci13yNdehZPIuUzR7/XnTnrH6258ktDgGKcFfUuZfQMPc0yMeipStgC5Z8clRW qz0qOECPgkKVMvpZa3Zfn9dbt3EtIegI+ePlQQiI9LHzOQSnDnqSgNiz7LYzHswWO0 QDsVuKLFN1JcA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 09/15] iio: imu: bmi323: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:44 +0100 Message-ID: <20240901135950.797396-10-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron --- drivers/iio/imu/bmi323/bmi323_core.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/iio/imu/bmi323/bmi323_core.c b/drivers/iio/imu/bmi323/bmi323_core.c index 671401ce80dc..89eab40bcfdf 100644 --- a/drivers/iio/imu/bmi323/bmi323_core.c +++ b/drivers/iio/imu/bmi323/bmi323_core.c @@ -1881,7 +1881,6 @@ static int bmi323_trigger_probe(struct bmi323_data *data, struct fwnode_handle *fwnode; enum bmi323_irq_pin irq_pin; int ret, irq, irq_type; - struct irq_data *desc; fwnode = dev_fwnode(data->dev); if (!fwnode) @@ -1898,12 +1897,7 @@ static int bmi323_trigger_probe(struct bmi323_data *data, irq_pin = BMI323_IRQ_INT2; } - desc = irq_get_irq_data(irq); - if (!desc) - return dev_err_probe(data->dev, -EINVAL, - "Could not find IRQ %d\n", irq); - - irq_type = irqd_get_trigger_type(desc); + irq_type = irq_get_trigger_type(irq); switch (irq_type) { case IRQF_TRIGGER_RISING: latch = false; From patchwork Sun Sep 1 13:59:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786468 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54DBC17E00F for ; Sun, 1 Sep 2024 14:00:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199246; cv=none; b=bsk15R896hlv3GHgETZRBmzT4izGHzXz7jomarV17nmGwt78/jU058tdN/ze1ETk/RLgpEfnfCVlK1CaQF9NYzUqAWYwxLVEd+8XK0kKTfzH5hgvLE/rl0XlyfnIv7byrNnEAidgzyClMagEhaNvgMry1ELuMoNPf2WaTljhGi0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199246; c=relaxed/simple; bh=grREwPn4HqEqjVVjEZ1YBZSER1V+zCXNmNiJUfppIO8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bpiTulNyBArpo2YoHeFqJYohGsaMgyB04wkQxW+QB6u2ETLOEf4OCg1k98HvIx8RpOYfXWQGCBRsvROrfF3alLQ/+zJC9DHmFAB0TnTxq6LOhJ9SbgDs6THzauUuF4x65CbzImK1o9nXrdovRKfuMS4ZKQE6qZRA5vfJq1uCPRU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=etA70p3T; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="etA70p3T" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CFE2C4CEC7; Sun, 1 Sep 2024 14:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199245; bh=grREwPn4HqEqjVVjEZ1YBZSER1V+zCXNmNiJUfppIO8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=etA70p3T8XBhyg2oP28rmw/SX2ytwiqXpCVrEiBK7ahLspd239wp/YT25D+BOWkIM 6dH5dsQ8Txk/VzSz5v5ZALt4MwIXWTwN8gZ9unYtuRRAlze93aIsAqvI736SC2eT2i e7wLt9DgUnDC9cMB6cZPKivzINSuaO/NW6bIdccPUkEKjPxq4ekUlEBJJPqud3sScP WmctZ6ETelvyCduT2CAoAcA+Qj4QfcTRJiTg9U2j2sCoRgzQEng+9HRN5w3LjIRLoL 8glzJvZC/H7Yn3m0SEKyBcwYtPG4k0Tf4089HNbowv3Vy3S+T+zd7kbsN6QgzNsEpW Gfi4KHdYpcG/w== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 10/15] iio: imu: inv_icm42600: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:45 +0100 Message-ID: <20240901135950.797396-11-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron --- drivers/iio/imu/inv_icm42600/inv_icm42600_core.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c index c3924cc6190e..93b5d7a3339c 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_core.c @@ -673,7 +673,6 @@ int inv_icm42600_core_probe(struct regmap *regmap, int chip, int irq, { struct device *dev = regmap_get_device(regmap); struct inv_icm42600_state *st; - struct irq_data *irq_desc; int irq_type; bool open_drain; int ret; @@ -683,14 +682,7 @@ int inv_icm42600_core_probe(struct regmap *regmap, int chip, int irq, return -ENODEV; } - /* get irq properties, set trigger falling by default */ - irq_desc = irq_get_irq_data(irq); - if (!irq_desc) { - dev_err(dev, "could not find IRQ %d\n", irq); - return -EINVAL; - } - - irq_type = irqd_get_trigger_type(irq_desc); + irq_type = irq_get_trigger_type(irq); if (!irq_type) irq_type = IRQF_TRIGGER_FALLING; From patchwork Sun Sep 1 13:59:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786469 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEDDE17E00F for ; Sun, 1 Sep 2024 14:00:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199249; cv=none; b=B74l18cRpChPYfVxGYn5VX30LgPak6hEoTRnFgdPBmsZtPh3jQ0lD6yTzBPjBl5IbrG7chagstHTzHGXB1yx5yhiN9Ikd84hUbaMb1AeLhxxJxr9FQEK6eUZO1iAfxLo5s6200s/DVhkFWsJfZJdafRvNteeV+AYIYCpfKoWPeU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199249; c=relaxed/simple; bh=eFKsplyC1bwfBfyxeBZZKcwmpB8mu+rVHwH4EC5UZrI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hux64HMt3/U/Oku+RCKtz8Iw+LazinL9xTzWv5TidDcpTUI6Up9X0Y2TEo5kOZXQy7VrgTAOExGRzFaF+3VBVZBpm2PkL5kNXrV6vuUUxczcF4Ad95kfLBKQwK+2zKjpdbW0KVaJADvPOSEtRzYuvJSDj/08k+xJLG1q9vgPaKs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cNDNZNoe; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cNDNZNoe" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9A178C4CEC3; Sun, 1 Sep 2024 14:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199249; bh=eFKsplyC1bwfBfyxeBZZKcwmpB8mu+rVHwH4EC5UZrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cNDNZNoeRCzUfIQJBdTRY0RQjhtqA+iZ/5xHR2k14kjlQrkZw5ly2tL+otOlyZ9WN BJjq2Tf0ioi67gwRypZHB1Rss1tsoFEmTwK0+3YQ5MsHsH75zl74w24Ys2jE7I1UeV BtAepr0F8hbxDI/ukF9wTKIFE15Lb7J8NsItqRmZ6ET5qib7isTTFWoIlws41wJBpW 0EMX6sFFeq4fwpSI3MM831V1Wxmh2NJXEVUTCFh+rjaFeaLMiupu2GGeWzlB9T2YOM DlbgG4HHPbCWm3w/OwSaVe4/g8IzgzzqHCKO1i2BMaHqfi0U1qmhRE/i9XBWJwVoUR +tTR2lVecUV9w== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 11/15] iio: imu: inv_mpu6050: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:46 +0100 Message-ID: <20240901135950.797396-12-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron --- drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c index 14d95f34e981..fdb48c5e5686 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c @@ -1859,7 +1859,6 @@ int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name, struct inv_mpu6050_platform_data *pdata; struct device *dev = regmap_get_device(regmap); int result; - struct irq_data *desc; int irq_type; indio_dev = devm_iio_device_alloc(dev, sizeof(*st)); @@ -1893,13 +1892,7 @@ int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name, } if (irq > 0) { - desc = irq_get_irq_data(irq); - if (!desc) { - dev_err(dev, "Could not find IRQ %d\n", irq); - return -EINVAL; - } - - irq_type = irqd_get_trigger_type(desc); + irq_type = irq_get_trigger_type(irq); if (!irq_type) irq_type = IRQF_TRIGGER_RISING; } else { From patchwork Sun Sep 1 13:59:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786470 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C762A17C211 for ; Sun, 1 Sep 2024 14:00:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199254; cv=none; b=evphvHTcBQFwQpZkGPftC5Rpga+sipZaUxEf3X9wWu1OQAt+HXxu+XcivCaSkZT0jfTzkKTFIcRJzv8JfkHBrRbZG38ag3zv8VAdBGxj23dPSlyPdFF5JmdQsE2sBbJMfZD38GC1HpvNGTIx7fan9VNTzPwhdnkp3omPkjin0Bg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199254; c=relaxed/simple; bh=a8peXB79CCP/+nOwan1Z0/NGi2flRPjmfiJfXgHWPpM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eT6y6Zo9bpaLcZwRHQJVpU+UhQNwcyRqHEG4E/iKOJYhuEksMlKVlr2TIi8TYp42DkPI6dbmyu8UFK8W3iwlEIdSmpbAhWsd/fG5DYXcyI8h1lnnCofzYA2YqBrLaiPF2kCx0s28Q8j71cNRuf8gMxLBwXO1PGwnauGpmmRrQ6w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jdfPz4JC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jdfPz4JC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 32FB5C4CEC3; Sun, 1 Sep 2024 14:00:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199254; bh=a8peXB79CCP/+nOwan1Z0/NGi2flRPjmfiJfXgHWPpM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jdfPz4JCYFU1/4mHgZaT8rWik/ohgxeKH2yzoV1WK4ZntrPGsvhbgtpmP5iVqhDgm +ukQx1FgG28tXR8oK934MTuv3KZXmxuKO/NPrpYK1VC5pFp8GSQZssQwEcp/2lkVvf DLru+omhCdzJhfAYIlZF60DXW5HeP9G3UeeW5Tut/WyQuAWbNIQaxIpcVR6foeZ9vN PK6fFGHkFRmXXlE06IApn/YuX+MkORzMXXZnpNGaadgR3GnXBe8mOY82FG9fsI902t FrY+nnfSBuZU79BXo1ew12HP7g7ZeAKq7GiJ2inLIY9jgcbYVye7qgmi+zWbkjANI5 R0eO2DMK1J1Vw== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 12/15] iio: imu: st_lsm6dsx: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:47 +0100 Message-ID: <20240901135950.797396-13-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron Reviewed-by: Lorenzo Bianconi --- 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 ed0267929725..ca1a2c24d7ce 100644 --- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c +++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c @@ -2531,7 +2531,7 @@ static int st_lsm6dsx_irq_setup(struct st_lsm6dsx_hw *hw) bool irq_active_low; int err; - irq_type = irqd_get_trigger_type(irq_get_irq_data(hw->irq)); + irq_type = irq_get_trigger_type(hw->irq); switch (irq_type) { case IRQF_TRIGGER_HIGH: From patchwork Sun Sep 1 13:59:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786471 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B791E17C211 for ; Sun, 1 Sep 2024 14:00:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199259; cv=none; b=dGb2tTUjm9+1HbzfjC37VNTRY3dnO89mrJmLQscHuOg89KV6ohjQuegcFo8ldpdzLCoS+l2E6wij2ITDOGCKufZcBVHvP/URnujE3i0JisbYD7B9kFTOzzHdvW1+Ckqi7yiIIzKgfvAkaNB1o6fNzJ546frh/ZcMSbp2nKppghI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199259; c=relaxed/simple; bh=95aVIy8fyTvQ69jAa90ET5aR2SZ5SowU/8OudCTKMLQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PcDhuia/+6Hqvpf4JYRWAWnMEdipi12VfubKy0HkX2nT3yQEC6BTCfRMh5tqaty0ttCPV+1KGqVHfZEB1Jeuku3mWf+v8soXgBjK+e4NUPaPr8D+yLt7XpqhL7G8o/KWajZ6orjeOhcujcU1Ym56ZJ7chSJJa9rythrXHi2A0XU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=np4/PGCN; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="np4/PGCN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8D02C4CEC9; Sun, 1 Sep 2024 14:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199259; bh=95aVIy8fyTvQ69jAa90ET5aR2SZ5SowU/8OudCTKMLQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=np4/PGCNlbRdipi6LyUVItwnDnBf6qZVeawkRNr2i6za4tk+XxsK0748lk2Hnlun2 5hndH8thSVeCXv0tee8yZ6pjdrd1U+qBM/p7WR2NUVGbtLpb0hAPBxvOQF6uElcWTg 4Uzi6JFenp/zMLFkagNTUbMdt3pJhZ1+LznslfymvenYQ0fCFdnuC9xh/fXgRuB0Gv NZEXryhcOUXgAw/ooiZdt7RibbUtntGPTvJ5u28vr2EAzE+CcIHHjkmUv5I9aipPRv vPfbek6VusIJrnbSz5on0XnLdF9XuSU7WAoBF6eassFkR2raFAI3p7x5Ob1Y+AvmBJ uUVeNBTQRxXuQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 13/15] iio: light: st_uvis25: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:48 +0100 Message-ID: <20240901135950.797396-14-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron Reviewed-by: Lorenzo Bianconi --- drivers/iio/light/st_uvis25_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/light/st_uvis25_core.c b/drivers/iio/light/st_uvis25_core.c index fba3997574bb..4a58591c3bea 100644 --- a/drivers/iio/light/st_uvis25_core.c +++ b/drivers/iio/light/st_uvis25_core.c @@ -174,7 +174,7 @@ static int st_uvis25_allocate_trigger(struct iio_dev *iio_dev) unsigned long irq_type; int err; - irq_type = irqd_get_trigger_type(irq_get_irq_data(hw->irq)); + irq_type = irq_get_trigger_type(hw->irq); switch (irq_type) { case IRQF_TRIGGER_HIGH: From patchwork Sun Sep 1 13:59:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786472 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B13017C211 for ; Sun, 1 Sep 2024 14:01:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199263; cv=none; b=rUiiFuBgG4cMorx1IxQdRXAHBqkrd89GShzdoqm5QFFJ/yym/y0JG7ho5KCtIknNKow+lQP4/ThjBdTpCLlglbmgZ6jqm02iHJGMo7Jh+kJVqvi7pyjlvfsFBID7wSGCbxXOeDU/2DNEALnXWsJt0IEJqPLaHF3NnV3ipwPaiLg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199263; c=relaxed/simple; bh=g8JuZv5hc41PQp8AhS2e5KtuIOdFwG819wzBMMn4p7s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s8bHVWpNubdcNIM3o6eOY5ZSA33NJi7qLLVCDGtcofykmWV4tZoLgY8K9l+YfEDRzP7pzBTJwxhz7fKMX/kKXu7xkkQza7VTqwfYLC6Gxu8eeOI16EUWX9D5D1gtRhw40/EWNpuFbIwpZNlQTM046FAXu2m0RvDCmi53LqobQ6M= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YR2Td05O; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YR2Td05O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B033C4CEC7; Sun, 1 Sep 2024 14:00:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199263; bh=g8JuZv5hc41PQp8AhS2e5KtuIOdFwG819wzBMMn4p7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YR2Td05Oe8a2uC1b/Wk2ZVg4u9qCWDL4vUPK1WZyhppBnTcmp66Kc/1U3CCRhZ4Ni Cynyfb13ysj2cqOeqKb/vdcLhM3Ab2EtYsPGaHoZ+UEf7upeKbsKxL4pFYO6IBoeak x6uaq2ogQHZW0I24aG3Eyn9fB3gv6qA0oUHsIE5HVzqmJWvFC8ceW5BbESaoJjwqIn gD8GPLWlL0kOe+/ZYknq+G/2pHsWAXuHTXrNC/bjXpLCvbI7aS1Ol52MC7apfoSCIK WsgFp3MsGdaUFRF4+0P0Nk/amvuoJmxcrXm6fzDlxXATt1eq+e0gLyOAd+bf2pERqK ygY1uUyCRavYQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 14/15] iio: magn: ak8974: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:49 +0100 Message-ID: <20240901135950.797396-15-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron Reviewed-by: Linus Walleij --- drivers/iio/magnetometer/ak8974.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/magnetometer/ak8974.c b/drivers/iio/magnetometer/ak8974.c index 961b1e0bfb13..8306a18706ac 100644 --- a/drivers/iio/magnetometer/ak8974.c +++ b/drivers/iio/magnetometer/ak8974.c @@ -910,7 +910,7 @@ static int ak8974_probe(struct i2c_client *i2c) /* If we have a valid DRDY IRQ, make use of it */ if (irq > 0) { - irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq)); + irq_trig = irq_get_trigger_type(irq); if (irq_trig == IRQF_TRIGGER_RISING) { dev_info(&i2c->dev, "enable rising edge DRDY IRQ\n"); } else if (irq_trig == IRQF_TRIGGER_FALLING) { From patchwork Sun Sep 1 13:59:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13786473 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E2AF17F394 for ; Sun, 1 Sep 2024 14:01:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199267; cv=none; b=EpssEgW0IMtEDd+nQpl6oD38S9TdrO59GoLav3znNvkze6yvCOt7yoqNSAwJ9lnxQeZoWpcvTXcNUbdLGThxB3CL3s4oCfamlIOPvSb0LNVLcBgaZxiM64hJd5c/KVIffMTte3GWeUnexCMGOE8bth8EneqNGTpStSBp/Y/9I/E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725199267; c=relaxed/simple; bh=6hM+i1uK1O0NW1sB+53GxLHcQUdWgFDhCaKu0Pva99g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FeCCEq8ErAJg1nUaY5sF6ifosDfSvLNGuFdFUtXUIUFSLzs7sAtlKQpJCU5muA4Of3PhEL9Hg7vJalSywVxwvz+0cH+bg0YA/qejwFrYMe8WWUD7DXklAq5GgEfkH9D2IY5nkV3q4tfOUmtCO4NN1z9jUVeH5L06Fh5MApY1xaU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Plr/gWpI; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Plr/gWpI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2019C4CEC3; Sun, 1 Sep 2024 14:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725199267; bh=6hM+i1uK1O0NW1sB+53GxLHcQUdWgFDhCaKu0Pva99g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Plr/gWpIf8b8TBPZnk68/+NT56FrlSGGIE9CfbEf8e2eISZdbUjzidormpGJjYpTg lFErqMc4GURYEU+l+NDiySxd5nRsqou85zrt1O4TJvXI44aynmbyJrn5h4kdtsyLN5 0T3R3Au1jHJveGngCEXLxNWVWm1xEfHkE4zxI9cDPoVWLaqJ8+SdOoeuBNk4jDrdo7 eoGz3j2m9LgvqghuTRYMYJPu8vrIb8x4NRV617WOP13mpJd/O74G0C9vMPwHOBvD6t uPmWpTd6EBgho81PCVrfnyaDcCzJwxumqlIjYy6DgBwtKnjlg9ZK7FNm/Pd1dTdyYE PAYFeSX3lzu0w== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Andy Shevchenko , Antoniu Miclaus , Sean Nyekjaer , Marek Vasut , Denis Ciocca , Rui Miguel Silva , Linus Walleij , Danila Tikhonov , Jagath Jog J , Jean-Baptiste Maneyrol , Lorenzo Bianconi , Vasileios Amoiridis , Jonathan Cameron Subject: [PATCH 15/15] iio: pressure: bmp280: use irq_get_trigger_type() Date: Sun, 1 Sep 2024 14:59:50 +0100 Message-ID: <20240901135950.797396-16-jic23@kernel.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240901135950.797396-1-jic23@kernel.org> References: <20240901135950.797396-1-jic23@kernel.org> Precedence: bulk X-Mailing-List: linux-iio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Jonathan Cameron Use irq_get_trigger_type() to replace getting the irq data then the type in two steps. Signed-off-by: Jonathan Cameron Tested-by: Vasileios Amoiridis --- drivers/iio/pressure/bmp280-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c index da379230c837..b156dd763cf3 100644 --- a/drivers/iio/pressure/bmp280-core.c +++ b/drivers/iio/pressure/bmp280-core.c @@ -2596,7 +2596,7 @@ static int bmp085_fetch_eoc_irq(struct device *dev, unsigned long irq_trig; int ret; - irq_trig = irqd_get_trigger_type(irq_get_irq_data(irq)); + irq_trig = irq_get_trigger_type(irq); if (irq_trig != IRQF_TRIGGER_RISING) { dev_err(dev, "non-rising trigger given for EOC interrupt, trying to enforce it\n"); irq_trig = IRQF_TRIGGER_RISING;