Message ID | 20211109200840.135019-3-puranjay12@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | device property: Adding fwnode_irq_get_byname() | expand |
On Wed, Nov 10, 2021 at 01:38:40AM +0530, Puranjay Mohan wrote: > Use the generic fwnode_irq_get_byname() in place of of_irq_get_byname() > to get the IRQ number from the interrupt pin. Heads up, the fwnode_irq_get_byname() is in I2C tree and if Jonathan wants to apply this one, the PR [1] can be used. [1]: https://lore.kernel.org/linux-i2c/YfRiGR3AT8tzyweG@shikoro/T/#u
On Tue, 1 Feb 2022 18:25:54 +0200 Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > On Wed, Nov 10, 2021 at 01:38:40AM +0530, Puranjay Mohan wrote: > > Use the generic fwnode_irq_get_byname() in place of of_irq_get_byname() > > to get the IRQ number from the interrupt pin. > > Heads up, the fwnode_irq_get_byname() is in I2C tree and if Jonathan wants to > apply this one, the PR [1] can be used. > > [1]: https://lore.kernel.org/linux-i2c/YfRiGR3AT8tzyweG@shikoro/T/#u > Thanks Andy. I'm going to let this go the slow way and pick up this patch after the merge window when I can avoid pulling in that PR. Basically I'm feeling lazy today :) Jonathan
On Sun, 27 Feb 2022 12:41:34 +0000 Jonathan Cameron <jic23@kernel.org> wrote: > On Tue, 1 Feb 2022 18:25:54 +0200 > Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > > On Wed, Nov 10, 2021 at 01:38:40AM +0530, Puranjay Mohan wrote: > > > Use the generic fwnode_irq_get_byname() in place of of_irq_get_byname() > > > to get the IRQ number from the interrupt pin. > > > > Heads up, the fwnode_irq_get_byname() is in I2C tree and if Jonathan wants to > > apply this one, the PR [1] can be used. > > > > [1]: https://lore.kernel.org/linux-i2c/YfRiGR3AT8tzyweG@shikoro/T/#u > > > > Thanks Andy. > > I'm going to let this go the slow way and pick up this patch after the > merge window when I can avoid pulling in that PR. > > Basically I'm feeling lazy today :) Now applied to the togreg branch of iio.git and pushed out as testing to see if 0-day can find any problems. Thanks, Jonathan > > Jonathan
On Sun, Apr 10, 2022 at 06:13:06PM +0100, Jonathan Cameron wrote: > On Sun, 27 Feb 2022 12:41:34 +0000 > Jonathan Cameron <jic23@kernel.org> wrote: > > > On Tue, 1 Feb 2022 18:25:54 +0200 > > Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote: > > > > > On Wed, Nov 10, 2021 at 01:38:40AM +0530, Puranjay Mohan wrote: > > > > Use the generic fwnode_irq_get_byname() in place of of_irq_get_byname() > > > > to get the IRQ number from the interrupt pin. > > > > > > Heads up, the fwnode_irq_get_byname() is in I2C tree and if Jonathan wants to > > > apply this one, the PR [1] can be used. > > > > > > [1]: https://lore.kernel.org/linux-i2c/YfRiGR3AT8tzyweG@shikoro/T/#u > > > > > > > Thanks Andy. > > > > I'm going to let this go the slow way and pick up this patch after the > > merge window when I can avoid pulling in that PR. > > > > Basically I'm feeling lazy today :) > > Now applied to the togreg branch of iio.git and pushed out as testing to > see if 0-day can find any problems. Thanks for keeping an eye on it!
diff --git a/drivers/iio/accel/adxl355_core.c b/drivers/iio/accel/adxl355_core.c index 4f485909f459..7babb139bb92 100644 --- a/drivers/iio/accel/adxl355_core.c +++ b/drivers/iio/accel/adxl355_core.c @@ -18,7 +18,7 @@ #include <linux/math64.h> #include <linux/module.h> #include <linux/mod_devicetable.h> -#include <linux/of_irq.h> +#include <linux/property.h> #include <linux/regmap.h> #include <asm/unaligned.h> @@ -746,10 +746,7 @@ int adxl355_core_probe(struct device *dev, struct regmap *regmap, return ret; } - /* - * TODO: Would be good to move it to the generic version. - */ - irq = of_irq_get_byname(dev->of_node, "DRDY"); + irq = fwnode_irq_get_byname(dev_fwnode(dev), "DRDY"); if (irq > 0) { ret = adxl355_probe_trigger(indio_dev, irq); if (ret)
Use the generic fwnode_irq_get_byname() in place of of_irq_get_byname() to get the IRQ number from the interrupt pin. Signed-off-by: Puranjay Mohan <puranjay12@gmail.com> --- drivers/iio/accel/adxl355_core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)