Re: [PATCH v2] hwmon/sht15: Root out platform data

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

 



Hi Fabio,

On Wed, 22 Nov 2017 20:53:33 -0200
Fabio Estevam <festevam@xxxxxxxxx> wrote:

> Hi Davide,
> 
> On Wed, Nov 22, 2017 at 8:45 PM, Davide Hug <d@xxxxxxxxxx> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux