From: Jonathan Cameron <jic23@kernel.org>
To: Rui Miguel Silva <rmfrfs@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: [PATCH v1 1/1] iio: gyro: fxas21002c: Make use of device properties
Date: Sat, 16 Apr 2022 12:20:50 +0100 [thread overview]
Message-ID: <20220416122050.72c88536@jic23-huawei> (raw)
In-Reply-To: <20220413162623.azoqoehu23kggk4x@arch-thunder>
On Wed, 13 Apr 2022 17:26:23 +0100
Rui Miguel Silva <rmfrfs@gmail.com> wrote:
> Hi Andy,
> Thanks for the patch.
>
> On Wed, Apr 13, 2022 at 04:15:13PM +0300, Andy Shevchenko wrote:
> > Convert the module to be property provider agnostic and allow
> > it to be used on non-OF platforms.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> This LGTM.
>
> Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
>
Applied to the togreg branch of iio.git and pushed out as testing
for 0-day to poke at it and see what we missed.
Thanks,
Jonathan
> Cheers,
> Rui
>
> > ---
> > drivers/iio/gyro/fxas21002c_core.c | 8 +++-----
> > 1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/iio/gyro/fxas21002c_core.c b/drivers/iio/gyro/fxas21002c_core.c
> > index 410e5e9f2672..0923fd793492 100644
> > --- a/drivers/iio/gyro/fxas21002c_core.c
> > +++ b/drivers/iio/gyro/fxas21002c_core.c
> > @@ -7,9 +7,9 @@
> >
> > #include <linux/interrupt.h>
> > #include <linux/module.h>
> > -#include <linux/of_irq.h>
> > #include <linux/pm.h>
> > #include <linux/pm_runtime.h>
> > +#include <linux/property.h>
> > #include <linux/regmap.h>
> > #include <linux/regulator/consumer.h>
> >
> > @@ -822,7 +822,6 @@ static int fxas21002c_trigger_probe(struct fxas21002c_data *data)
> > {
> > struct device *dev = regmap_get_device(data->regmap);
> > struct iio_dev *indio_dev = dev_get_drvdata(dev);
> > - struct device_node *np = indio_dev->dev.of_node;
> > unsigned long irq_trig;
> > bool irq_open_drain;
> > int irq1;
> > @@ -831,8 +830,7 @@ static int fxas21002c_trigger_probe(struct fxas21002c_data *data)
> > if (!data->irq)
> > return 0;
> >
> > - irq1 = of_irq_get_byname(np, "INT1");
> > -
> > + irq1 = fwnode_irq_get_byname(dev_fwnode(dev), "INT1");
> > if (irq1 == data->irq) {
> > dev_info(dev, "using interrupt line INT1\n");
> > ret = regmap_field_write(data->regmap_fields[F_INT_CFG_DRDY],
> > @@ -843,7 +841,7 @@ static int fxas21002c_trigger_probe(struct fxas21002c_data *data)
> >
> > dev_info(dev, "using interrupt line INT2\n");
> >
> > - irq_open_drain = of_property_read_bool(np, "drive-open-drain");
> > + irq_open_drain = device_property_read_bool(dev, "drive-open-drain");
> >
> > data->dready_trig = devm_iio_trigger_alloc(dev, "%s-dev%d",
> > indio_dev->name,
> > --
> > 2.35.1
> >
prev parent reply other threads:[~2022-04-16 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 13:15 [PATCH v1 1/1] iio: gyro: fxas21002c: Make use of device properties Andy Shevchenko
2022-04-13 16:26 ` Rui Miguel Silva
2022-04-16 11:20 ` Jonathan Cameron [this message]
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=20220416122050.72c88536@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rmfrfs@gmail.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