Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1247635
| From | Mark Rutland <mark.rutland@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v3] iio: mma8452: support either of the available interrupt pins |
| Date | 2015-10-15 12:20 +0200 |
| Message-ID | <qjNND-3o4-1@gated-at.bofh.it> (permalink) |
| References | <qjurD-8nB-3@gated-at.bofh.it> <qjw0q-2n4-11@gated-at.bofh.it> <qjNaW-2o2-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Oct 15, 2015 at 11:32:59AM +0200, Martin Kepplinger wrote:
> Am 2015-10-14 um 17:12 schrieb Lars-Peter Clausen:
> > On 10/14/2015 03:15 PM, Martin Kepplinger wrote:
> > [...]
> >> + if (irq1 > 0)
> >> + client->irq = irq1;
> >
> > You must not overwrite client->irq, that field is manged by the I2C core and
> > is supposed to be read only for device drivers.
> >
>
> I thought about it again and before I implement it, let me show you:
>
> since interrupt-names would be "invented" anyways ("INT1", "INT2"),
> here's an idea for the bindings doc that would be a more long-term
> solution to implement:
>
> - interrupts: interrupt mapping for GPIO IRQ
>
> These devices have two interrupt pins called INT1 and INT2 they
> can route their different interrupt sources to:
This being the case, the binding should only talk about INT1 and INT2.
The names might be "invented", but they describe the physical pins on
the device, and thus describe a physical property of the device.
> IRQ Name Interrupt Source Wired Pin
> -------- ---------------- ---------
> DATA_READY_1 data ready INT1
> DATA_READY_2 INT2
> MOTION_1 motion events INT1
> MOTION_2 INT2
> INT1 all INT1
> INT2 INT2
>
> - interrupt-names: should contain IRQ Names in the order in which they
> were supplied in the interrupts property.
>
> Depending on how your chip is wired and what
> interrupt sources should be handled by the driver,
> choose one IRQ Name per Interrupt source, or
> INT1/INT2 for all sources to one pin here.
The configuration of logical interrupts to those physical pins is a
choice that can be made at runtime, and should not live in the DT. It is
not a property of the hardware.
Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v3] iio: mma8452: support either of the available interrupt pins Martin Kepplinger <martink@posteo.de> - 2015-10-14 15:40 +0200
Re: [PATCH v3] iio: mma8452: support either of the available interrupt pins Lars-Peter Clausen <lars@metafoo.de> - 2015-10-14 17:20 +0200
Re: [PATCH v3] iio: mma8452: support either of the available interrupt pins Martin Kepplinger <martink@posteo.de> - 2015-10-15 11:40 +0200
Re: [PATCH v3] iio: mma8452: support either of the available interrupt pins Mark Rutland <mark.rutland@arm.com> - 2015-10-15 12:20 +0200
Re: [PATCH v3] iio: mma8452: support either of the available interrupt pins Mark Rutland <mark.rutland@arm.com> - 2015-10-15 12:30 +0200
csiph-web