[Letux-kernel] Bug in i2c_device_probe

H. Nikolaus Schaller hns at goldelico.com
Tue Jun 19 13:36:11 CEST 2018


Hi Marek,

> Am 19.06.2018 um 13:17 schrieb Belisko Marek <marek.belisko at gmail.com>:
> 
> Hi Tony,
> On Mon, Jun 18, 2018 at 9:20 AM Tony Lindgren <tony at atomide.com> wrote:
>> 
>> * Belisko Marek <marek.belisko at gmail.com> [180618 07:09]:
>>> I can but after applying this patch gpadc module seems to stop working
>>> so I need to fix this first (no idea how yet ;))
>> 
>> Oh OK. Maybe check if that module or it's GPIO parent
>> also needs matching level configured in the dts file?
>> Maybe it's connected via I2C GPIO module or via PMIC
>> GPIO?
> Nope I checked gpadc driver and from platform data can get 3 iqr's (at
> leat they are defined in omap5-board-common.dtsi) but drievr just gran
> EOC irq directly from palmas.
> I also checked palmas probe and there is code like:
>  /* Change interrupt line output polarity */
>                             | 19 #include <linux/delay.h>
>        if (pdata->irq_flags & IRQ_TYPE_LEVEL_HIGH)
>                                   | 20 #include <linux/i2c.h>
>                reg = PALMAS_POLARITY_CTRL_INT_POLARITY;
>                                   | 21 #include <linux/pm.h>
>        else
>                                   | 22 #include <linux/mfd/palmas.h>
>                reg = 0;
> 
> so when it was none reg = 0 (with IRQ_TYPE_LEVEL_LOW it was not
> mounting rootfs at all but works with IRQ_TYPE_LEVEL_HIGH). So I'm
> still puzzled how to fix this issue. Any ideas what else to check?
> Also one thing which puzzles me is why gpadc in dts have 3 interrupts?:
> gpadc: gpadc {
>                        compatible = "ti,palmas-gpadc";
>                        interrupts = <18 0
>                                      16 0
>                                      17 0>;
>                        #io-channel-cells = <1>;
>                        ti,channel0-current-microamp = <5>;
>                        ti,channel3-current-microamp = <10>;
>                };
> 
> Thanks.

Some more ideas:
* the issue we are hunting did AFAIR appear first in 4.17-rc. It might just be better checks
  or something has really changed.
* how is the twl4030 madc set up? It is likely not extremely different.

BR,
Nikolaus






More information about the Letux-kernel mailing list