Hi,
* Tony Lindgren <tony@xxxxxxxxxxx> [181119 16:19]:
* Peter Ujfalusi <peter.ujfalusi@xxxxxx> [181119 10:16]:Well so commit 7e9d474954f4 ("ARM: tegra: Correct polarity for
On 2018-11-13 20:06, Tony Lindgren wrote:But it's not. I'm now wondering if wakeupgen is inverting the
Looks like the IRQ_TYPE_NONE issue still is there for omap5 andNo, I don't.
should be fixed with IRQ_TYPE_HIGH.
No idea about why palmas interrupts would stop working though,
Peter, do you have any ideas on this one?
The INT polarity can be changed in Palmas.
based on the pdata->irq_flags (queried via irqd_get_trigger_type())
the code configures it:
if (pdata->irq_flags & IRQ_TYPE_LEVEL_HIGH)
reg = PALMAS_POLARITY_CTRL_INT_POLARITY;
else
reg = 0;
and we pass the same irq_flags to the regmap_add_irq_chip()
IRQ_TYPE_LEVEL_HIGH == IRQF_TRIGGER_HIGH == 0x00000004
A change in DT should be enough, no need to patch palmas.c, imho.
polarity for this interrupt?
GIC docs say this about SPI interrupts:
"SPI is triggered on a rising edge or is active-HIGH level-sensitive."
So when setting IRQ_TYPE_LEVEL_HIGH in dts, we still must not
invert the polarity in palmas while tegra needs to. So either
tegra114 hardware is inverting the polarity, or omap5 wakeupgen
is.
Does the palmas trm say which way PALMAS_POLARITY_CTRL
triggers if PALMAS_POLARITY_CTRL_INT_POLARITY is set?
Also note that dra7 is using a gpio for palmas interrupt.
Tegra114 PMIC interrupt") states that tegra114 inverts the
polarity of the PMIC interrupt. So adding Jon and Thierry to Cc.
So it seems that commit df545d1cd01a ("mfd: palmas: Provide
irq flags through DT/platform data") wrongly sets the
PALMAS_POLARITY_CTRL_INT_POLARITY on IRQ_TYPE_LEVEL_HIGH
while it should set it on IRQ_TYPE_LEVEL_LOW.