Re: [PATCH v3 0/2] ACPI: Add irq_type to gpio interrupt

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

 



On Tue, Dec 01, 2015 at 01:25:50PM +0100, Christophe Ricard wrote:
>    For example during an i2c_device_probe where an i2c slave device
>    describe in devicetree has an interrupts property.
>    i2c_device_probe (drivers/i2c/i2c-core.c), retrieves irq property from
>    of_irq_get which will looks for an "interrupts" property in
>    of_irq_parse_of (drivers/of/irq.c).
>    of_irq_get will then call irq_create_mapping (kernel/irq/irqdomain.c)
>    which will set the irq_type retrieved during the interrupts node
>    parsing.

Found it now thanks.

>    This will allow from an i2c slave drivers to configure an interrupt
>    handler matching the exact devicetree data for the interrupts property
>    of the i2c slave node.

Makes sense.

>    Now for the same kind of i2c driver using acpi description, the GpioInt
>    polarity/type is at the moment never kept in the irq property.
>    It is possible to check that following about the same path...
>    i2c_device_probe (drivers/i2c/i2c-core.c), retrieves irq property from
>    acpi_dev_gpio_irq_get but does not save the irq_type.
>    This would allow not to have to use an additional gpio field and all
>    the configuration step to configure the gpio interrupt correctly in a
>    device driver and taking a real benefit of the GpioInt acpi keyword
>    compare to GpioIo keyword.
>    Most the of the drivers based on acpi description retrieve gpio number
>    to assign an interrupt and a fix polarity. I believe my patchset
>    proposal would improve this and allow to
>    be much closer with devicetree.
>    Do you see any issue with this ?

No, but I wonder if it would be better to do this in acpi_dev_gpio_irq_get()
instead of acpi_find_gpio() which gets called everytime a GPIO is looked up?
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux