Re: [PATCH 4/4 v4] iio: st_sensors: support open drain mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, Apr 14, 2016 at 10:36:53AM +0200, Linus Walleij wrote:
> On Wed, Apr 13, 2016 at 10:52 PM, Rob Herring <robh@xxxxxxxxxx> wrote:
> > On Tue, Apr 12, 2016 at 8:01 AM, Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> >> Some types of ST Sensors can be connected to the same IRQ line
> >> as other peripherals using open drain. Add a device tree binding
> >> and a sensor data property to flip the right bit in the interrupt
> >> control register to enable open drain mode on the INT line.
> >>
> >> If the line is set to be open drain, also tag on IRQF_SHARED
> >> to the IRQ flags when requesting the interrupt, as the whole
> >> point of using open drain interrupt lines is to share them with
> >> more than one peripheral (wire-or).
> >>
> >> Cc: devicetree@xxxxxxxxxxxxxxx
> >> Cc: Giuseppe Barba <giuseppe.barba@xxxxxx>
> >> Cc: Denis Ciocca <denis.ciocca@xxxxxx>
> >> Cc: Rob Herring <robh@xxxxxxxxxx>
> >> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> >> ---
> >> ChangeLog v3->v4:
> >> - Rename DT bool property st,int-pin-open-drain to int-pin-open-drain
> >> - Rob Herring ACKed st,int-pin-open-drain but not including his ACK
> >>   on this even though it's close
> >
> > We already have st,irq-open-drain, gpio-open-drain, linux,open-drain
> > and drive-open-drain (from pinctrl).
> >
> > If we want something common, then it should probably be part of
> > interrupt bindings, not something common to IIO.
> 
> I could agree to use the pin control drive-open-drain;
> 
> It has very little to do with the interrupt bindings, there are
> so many interrupt lines in the world, the fact that some of them
> go over open drain rails doesn't matter to the interrupt-controller
> devices, it needs to be below them.

Yes, but it is open drain because the interrupt is shared. That fact is 
enough to determine how to configure the pin. Unfortunately, it is a bit 
hard to determine an interrupt is shared based on how the interrupt 
bindings work. Adding a flag doesn't work because the cell contents are 
specific to the interrupt controller (though we have standardized them 
to some extent).

> I will resubmit using the pin control binding.

Given I don't have a better suggestion, that sounds fine.

Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux