[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-iio
Subject:    Re: [RFC PATCH 2/4] iio: accel: fxls8962af: add interrupt support
From:       Andy Shevchenko <andy.shevchenko () gmail ! com>
Date:       2021-04-30 8:54:40
Message-ID: CAHp75VdBxVbPnxk1uh_DaCw56x0qCn9CgcrLt0uvJp-hFUyiRQ () mail ! gmail ! com
[Download RAW message or body]

On Thu, Apr 29, 2021 at 10:19 PM Lars-Peter Clausen <lars@metafoo.de> wrote:
> On 4/29/21 1:35 PM, Andy Shevchenko wrote:
> > On Thu, Apr 29, 2021 at 12:37 PM Lars-Peter Clausen <lars@metafoo.de> wrote:
> >> On 4/29/21 11:35 AM, Andy Shevchenko wrote:
> >>> On Thu, Apr 29, 2021 at 11:58 AM Lars-Peter Clausen <lars@metafoo.de> wrote:
> >>>> On 4/28/21 10:22 AM, Sean Nyekjaer wrote:
> >>>>> Preparation commit for the next that adds hw buffered sampling
> >>> ...
> >>>
> >>>>> +     irq = of_irq_get_byname(of_node, "INT2");
> >>>> For this I'd use device_property_match_string(dev, "interrupt-names",
> >>>> "INT2"). Means it won't try to map the interrupt again, and also this is
> >>>> the only place where the driver directly depends on OF, everything else
> >>>> already uses the device_ API.
> >>> Why not platform_get_irq_byname_optional() ?
> >> Because it is not a platform device :)
> > Then device_property reading like this isn't really needed.
> Why?

Because it doesn't bring any value in this case and actually makes
readers confused. ACPI doesn't have properties started with # (they
are special for OF and hiding it behind device property API is not
correct).

So, either leave it OF, or introduce the above API (or use existing
fwnode_get_irq() by index).

-- 
With Best Regards,
Andy Shevchenko
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic