Hi Fabio,

On Wed, 22 Nov 2017 20:53:33 -0200
Fabio Estevam <[email protected]> wrote:

> Hi Davide,
> 
> On Wed, Nov 22, 2017 at 8:45 PM, Davide Hug <[email protected]> wrote:
> 
> > Thanks. As I understand it imx7d-sdb-sht11.dts uses gpio4 specified in
> > arch/arm/boot/dts/imx7s.dtsi, which has compatible = "fsl,imx7d-gpio",
> > "fsl,imx35-gpio".
> > I don't find a driver compatible fsl,imx7d-gpio, so I guess it is the
> > gpio/gpio-mxc.c driver compatible fsl,imx35-gpio.
> 
> Correct.

Great. Thanks!

> 
> > This driver doesn't use GPIOLIB_IRQCHIP, so I would understand why 
> > hwmon/sht15
> > loads here.
> 
> We build the kernel with imx_v6_v7_defconfig. GPIOLIB_IRQCHIP is selected 
> there.

So the GPIOLIB_IRQCHIP code in gpiolib.c is enabled. But the driver
gpio-mxc doesn't use it. In particular it doesn't call gpiochip_add_irqchip
which assigns the .irq_request_resources/.irq_release_resources callbacks that
toggle the FLAG_USED_AS_IRQ.
So in the gpio-mxc driver the guard against setting a GPIO with active IRQ as
output is not in place. And it is this guard that makes the sht15 driver fail
to load when in place.

Thanks,
Davide
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to