lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR12MB337391664F21D198A17A5894C43C0@MN2PR12MB3373.namprd12.prod.outlook.com>
Date:   Mon, 6 Jan 2020 16:13:39 +0000
From:   Jean-Baptiste Maneyrol <JManeyrol@...ensense.com>
To:     Michał Mirosław <mirq-linux@...e.qmqm.pl>,
        Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Lars-Peter Clausen <lars@...afoo.de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>
CC:     "linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] iio: imu/mpu6050: support dual-edge IRQ

Hello,

looks good for me.

Acked-by: Jean-Baptiste Maneyrol <jmaneyrol@...ensense.com>

Thanks,
JB



From: linux-iio-owner@...r.kernel.org <linux-iio-owner@...r.kernel.org> on behalf of Michał Mirosław <mirq-linux@...e.qmqm.pl>

Sent: Monday, January 6, 2020 12:17

To: Jonathan Cameron <jic23@...nel.org>; Hartmut Knaack <knaack.h@....de>; Lars-Peter Clausen <lars@...afoo.de>; Peter Meerwald-Stadler <pmeerw@...erw.net>; Jean-Baptiste Maneyrol <JManeyrol@...ensense.com>

Cc: linux-iio@...r.kernel.org <linux-iio@...r.kernel.org>; linux-kernel@...r.kernel.org <linux-kernel@...r.kernel.org>

Subject: [PATCH v2] iio: imu/mpu6050: support dual-edge IRQ

 


 CAUTION: This email originated from outside of the organization. Please make sure the sender is who they say they are and do not click links or open attachments unless you recognize the sender and know the content is safe.



Make mpu6050 usable on platforms which provide only any-edge interrupts.

This also covers shared interrupt case.



Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>



---

v2:

   just remove the dev_warn() message



Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>

---

 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 2 +-

 drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c | 5 +----

 2 files changed, 2 insertions(+), 5 deletions(-)



diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c

index 0686e41bb8a1..b3d138091f89 100644

--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c

+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c

@@ -1241,7 +1241,7 @@ int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name,

         irq_type = irqd_get_trigger_type(desc);

         if (!irq_type)

                 irq_type = IRQF_TRIGGER_RISING;

-       if (irq_type == IRQF_TRIGGER_RISING)

+       if (irq_type & IRQF_TRIGGER_RISING)     // rising or both-edge

                 st->irq_mask = INV_MPU6050_ACTIVE_HIGH;

         else if (irq_type == IRQF_TRIGGER_FALLING)

                 st->irq_mask = INV_MPU6050_ACTIVE_LOW;

diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c

index 10d16ec5104b..a4dc2c4a3ca5 100644

--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c

+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_ring.c

@@ -183,11 +183,8 @@ irqreturn_t inv_mpu6050_read_fifo(int irq, void *p)

                         "failed to ack interrupt\n");

                 goto flush_fifo;

         }

-       if (!(int_status & INV_MPU6050_BIT_RAW_DATA_RDY_INT)) {

-               dev_warn(regmap_get_device(st->map),

-                       "spurious interrupt with status 0x%x\n", int_status);

+       if (!(int_status & INV_MPU6050_BIT_RAW_DATA_RDY_INT))

                 goto end_session;

-       }

 

         if (!(st->chip_config.accl_fifo_enable |

                 st->chip_config.gyro_fifo_enable |

-- 

2.20.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ