[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMWcpxacC30ME9Ew@sunspire>
Date: Sat, 13 Sep 2025 19:32:39 +0300
From: Petre Rodan <petre.rodan@...dimension.ro>
To: Jonathan Cameron <jic23@...nel.org>,
David Lechner <dlechner@...libre.com>,
Nuno S?? <nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 15/18] iio: accel: bma220: add interrupt trigger
On Sat, Sep 13, 2025 at 06:39:36PM +0300, Petre Rodan wrote:
> +static irqreturn_t bma220_irq_handler(int irq, void *private)
> +{
> + struct iio_dev *indio_dev = private;
> + struct bma220_data *data = iio_priv(indio_dev);
> + int rv;
> + unsigned int bma220_reg_if1;
> +
> + guard(mutex)(&data->lock);
> + rv = regmap_read(data->regmap, BMA220_REG_IF1, &bma220_reg_if1);
> + if (rv)
> + return IRQ_NONE;
> +
> + if (FIELD_GET(BMA220_IF_DRDY, bma220_reg_if1)) {
> + iio_trigger_poll_nested(data->trig);
> +
> + return IRQ_HANDLED;
> +}
sorry, errant '{' in FIELD_GET line throws compilation off, will fix in next rev.
best regards,
peter
Powered by blists - more mailing lists