From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Sean Nyekjaer <sean@geanix.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
linux-iio <linux-iio@vger.kernel.org>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Nuno Sá" <Nuno.Sa@analog.com>,
"Rob Herring" <robh+dt@kernel.org>,
devicetree <devicetree@vger.kernel.org>
Subject: Re: [PATCH v4 4/6] iio: accel: fxls8962af: add interrupt support
Date: Fri, 30 Apr 2021 12:02:36 +0300 [thread overview]
Message-ID: <CAHp75Vf7-5EOpsP8u4rfcjceoKFwQH+U90+JazsLJvmARXmEBQ@mail.gmail.com> (raw)
In-Reply-To: <20210429122806.3814330-4-sean@geanix.com>
On Thu, Apr 29, 2021 at 3:28 PM Sean Nyekjaer <sean@geanix.com> wrote:
>
> Preparation commit for the next that adds hw buffered sampling
It misses a better description of what's going on here.
It misses the period at the end of the line.
...
> +#include <linux/of_irq.h>
See below.
...
> +static irqreturn_t fxls8962af_interrupt(int irq, void *p)
> +{
> + struct iio_dev *indio_dev = p;
> + struct fxls8962af_data *data = iio_priv(indio_dev);
> + unsigned int reg;
> + int ret;
> +
> + ret = regmap_read(data->regmap, FXLS8962AF_INT_STATUS, ®);
> + if (ret < 0)
> + return IRQ_NONE;
> +
> + return IRQ_NONE;
And how is it handled?
> +}
...
> +static void fxls8962af_get_irq(struct device *dev, enum fxls8962af_int_pin *pin)
> +{
> + if (!device_property_match_string(dev, "interrupt-names", "INT2")) {
This doesn't feel right.
You should use fwnode_get_irq() or introduce fwnode_get_irq_by_name().
Since ACPI has no given names for Interrupt resources (and moreover
there are two types of them), it also needs a support from the
software like we have for GPIOs with struct acpi_gpio_table (luckily
it's part of _DSD() nowadays, but in general it's not required by the
spec).
> + *pin = FXLS8962AF_PIN_INT2;
> + return;
> + }
> +
> + *pin = FXLS8962AF_PIN_INT1;
> +}
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-04-30 9:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 12:28 [PATCH v4 1/6] iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers Sean Nyekjaer
2021-04-29 12:28 ` [PATCH v4 2/6] dt-bindings: iio: accel: fxls8962af: add bindings Sean Nyekjaer
2021-04-29 15:25 ` Rob Herring
2021-04-29 12:28 ` [PATCH v4 3/6] iio: accel: fxls8962af: add set/get of samplerate Sean Nyekjaer
2021-04-29 12:28 ` [PATCH v4 4/6] iio: accel: fxls8962af: add interrupt support Sean Nyekjaer
2021-04-30 9:02 ` Andy Shevchenko [this message]
2021-05-03 11:19 ` Sean Nyekjaer
2021-04-29 12:28 ` [PATCH v4 5/6] iio: accel: fxls8962af: add hw buffered sampling Sean Nyekjaer
2021-04-30 9:10 ` Andy Shevchenko
2021-04-29 12:28 ` [PATCH v4 6/6] iio: accel: fxls8962af: fix errata bug E3 - I2C burst reads Sean Nyekjaer
2021-04-30 9:14 ` Andy Shevchenko
2021-04-30 9:25 ` [PATCH v4 1/6] iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers Tomas Melin
2021-05-02 17:46 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHp75Vf7-5EOpsP8u4rfcjceoKFwQH+U90+JazsLJvmARXmEBQ@mail.gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=Nuno.Sa@analog.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sean@geanix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).