Source-Changes-D archive

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

Re: CVS commit: src/sys/arch/arm/sunxi



On Tue, Apr 03, 2018 at 09:55:40AM -0300, Jared McNeill wrote:
> Hi Manuel --
> 
> On Tue, 3 Apr 2018, Manuel Bouyer wrote:
> 
> > Log Message:
> > external interrupt functions are named "eint<n>" in the sunxi_gpio_pins[]
> > arrays, while sunxi_gpio_establish() looks for "eint".
> > Rename eint<n> to eint in sunxi_gpio_pins[]. Tested with an external interrupt
> > on PH0 on an A20.
> 
> I checked the Linux driver this morning as this was never (afaik) clearly
> defined in the binding docs. Linux uses the name "irq" for these pins -- we
> should do the same to be compatible with upstream dts files.

But, AFAIK these names do not appear in the dts file.

Here's how I define my i2c device whose interrupt line is connected to PH0:

&i2c1 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c1_pins_a>;
        status = "okay";

        dsrtc: dsrtc@68 {
                reg = <0x68>;
        };

        picbmc: picbmc@69 {
                reg = <0x69>;
                interrupt-parent = <&pio>;
                interrupts = <7 0 IRQ_TYPE_EDGE_RISING>; /* PH0 */
        };
};

and from what I've understood reading the docs, this is how it should be.
We're not supposed to have pinctrl entries for this. The pin is switched to
interrupt function when the interrupt handler is registered.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index