Skip to contentSkip to conversation

iio: adis16480: Use irq types instead of flags

PATCH Applied Nuno Sá 2 participants 2 messages Jul 1, 2020 – Jul 4, 2020

Subsystems (2)
lore
Share & tools
lore

Nuno Sá

author maintainer
#0 lore raw

PATCH 1/1 iio: adis16480: Use irq types instead of flags

The value retrieved by irqd_get_trigger_type() is not an irq flag. While the values are the same, the meaning is different.

---
 drivers/iio/imu/adis16480.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/imu/adis16480.c +3 -3
index 5163749f568e..1eb4f98076f1 100644
@@ -1102,12 +1102,12 @@ static int adis16480_config_irq_pin(struct device_node *of_node,
 	/*
 	 * Get the interrupt line behaviour. The data ready polarity can be
 	 * configured as positive or negative, corresponding to
-	 * IRQF_TRIGGER_RISING or IRQF_TRIGGER_FALLING respectively.
+	 * IRQ_TYPE_EDGE_RISING or IRQ_TYPE_EDGE_FALLING respectively.
 	 */
 	irq_type = irqd_get_trigger_type(desc);
-	if (irq_type == IRQF_TRIGGER_RISING) { /* Default */
+	if (irq_type == IRQ_TYPE_EDGE_RISING) { /* Default */
 		val |= ADIS16480_DRDY_POL(1);
-	} else if (irq_type == IRQF_TRIGGER_FALLING) {
+	} else if (irq_type == IRQ_TYPE_EDGE_FALLING) {
 		val |= ADIS16480_DRDY_POL(0);
 	} else {
 		dev_err(&st->adis.spi->dev,
Signature · 1 line
2.25.1
maintainer Applied
#1 lore raw
Quoted 4 lines · On Wed, 1 Jul 2020 14:07:02 +0200 Nuno Sá <[email protected]> wrote:

The value retrieved by irqd_get_trigger_type() is not an irq flag. While the values are the same, the meaning is different.

Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to poke at it.

Thanks,

Jonathan

Quoted 24 lines
---
 drivers/iio/imu/adis16480.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/iio/imu/adis16480.c +3 -3
index 5163749f568e..1eb4f98076f1 100644
@@ -1102,12 +1102,12 @@ static int adis16480_config_irq_pin(struct device_node *of_node,
 	/*
 	 * Get the interrupt line behaviour. The data ready polarity can be
 	 * configured as positive or negative, corresponding to
-	 * IRQF_TRIGGER_RISING or IRQF_TRIGGER_FALLING respectively.
+	 * IRQ_TYPE_EDGE_RISING or IRQ_TYPE_EDGE_FALLING respectively.
 	 */
 	irq_type = irqd_get_trigger_type(desc);
-	if (irq_type == IRQF_TRIGGER_RISING) { /* Default */
+	if (irq_type == IRQ_TYPE_EDGE_RISING) { /* Default */
 		val |= ADIS16480_DRDY_POL(1);
-	} else if (irq_type == IRQF_TRIGGER_FALLING) {
+	} else if (irq_type == IRQ_TYPE_EDGE_FALLING) {
 		val |= ADIS16480_DRDY_POL(0);
 	} else {
 		dev_err(&st->adis.spi->dev,