<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/pinctrl/intel/pinctrl-cherryview.c, branch linux-5.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-01-24T00:12:45Z</updated>
<entry>
<title>pinctrl: cherryview: Trigger hwirq0 for interrupt-lines without a mapping</title>
<updated>2022-01-24T00:12:45Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2022-01-04T16:42:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa28514592d52043f4837a6457d6310452135ae1'/>
<id>urn:sha1:aa28514592d52043f4837a6457d6310452135ae1</id>
<content type='text'>
Commit bdfbef2d29dc ("pinctrl: cherryview: Don't use selection 0 to mark
an interrupt line as unused") made the code properly differentiate
between unset vs (hwirq) 0 entries in the GPIO-controller interrupt-line
to GPIO pinnumber/hwirq mapping.

This is causing some boards to not boot. This commit restores the old
behavior of triggering hwirq 0 when receiving an interrupt on an
interrupt-line for which there is no mapping.

Fixes: bdfbef2d29dc ("pinctrl: cherryview: Don't use selection 0 to mark an interrupt line as unused")
Reported-and-tested-by: Jarkko Nikula &lt;jarkko.nikula@linux.intel.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220104164238.253142-1-hdegoede@redhat.com
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Use temporary variable for struct device</title>
<updated>2021-11-26T20:37:41Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2021-11-26T20:35:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db1b2a8caf5b4954aa62ead5b0580948656eac43'/>
<id>urn:sha1:db1b2a8caf5b4954aa62ead5b0580948656eac43</id>
<content type='text'>
Use temporary variable for struct device to make code neater.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Do not allow the same interrupt line to be used by 2 pins</title>
<updated>2021-11-26T20:37:41Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2021-11-18T10:56:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07199dbf8cae36c973a89552fee83dd4e0a75972'/>
<id>urn:sha1:07199dbf8cae36c973a89552fee83dd4e0a75972</id>
<content type='text'>
It is impossible to use the same interrupt line for 2 pins, this will
result in the interrupts only being delivered to the IRQ handler for
the pin for which chv_gpio_irq_type() was called last.

The pinctrl-cherryview.c code relies on the BIOS to correctly setup the
interrupt line, but there is a BIOS bug on at least the Medion Akoya E1239T
and the GPD win models where both INT33FF:02 pin 8, used by the powerbutton
and INT33FF:02 pin 21 used as IRQ input for the accelerometer are mapped to
interrupt line 0.

This causes 2 problems:
1. The accelerometer IRQ does not work, since the power button is probed
later taking over the intr_lines[0] slot.

2. Since the accelerometer IRQ is not marked as wakeup, interrupt line 0
gets masked on suspend, causing the power button to not work to wake
the system from suspend.

Likewise on the Lenovo Yogabook, which has a touchscreen as keyboard
and the keyboard half of the tablet also has a Wacom digitizer, the BIOS
by default assigns the same interrupt line to the GPIOs used
for their interrupts.

Fix these problems by adding a check for this and assigning a new
interrupt line to the 2nd pin for which chv_gpio_irq_type() gets called.

With this fix in place the following 2 messages show up in dmesg on
the Medion Akoya E1239T and the GPD win:

 cherryview-pinctrl INT33FF:02: interrupt line 0 is used by both pin 21 and pin 8
 cherryview-pinctrl INT33FF:02: changing the interrupt line for pin 8 to 15

And the following gets logged on the Lenovo Yogabook:

 cherryview-pinctrl INT33FF:01: interrupt-line 0 is used by both pin 49 and pin 56
 cherryview-pinctrl INT33FF:01: changing the interrupt line for pin 56 to 7

Note commit 9747070c11d6 ("Input: axp20x-pek - always register interrupt
handlers") was added as a work around for the power button not being able
to wakeup the system. This relies on using the PMIC's connection to the
power button but that only works on systems with the AXP288 PMIC.
Once this fix has been merged that workaround can be removed.

Cc: Yauhen Kharuzhy &lt;jekhor@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Don't use selection 0 to mark an interrupt line as unused</title>
<updated>2021-11-26T20:37:41Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2021-11-18T10:56:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bdfbef2d29dcdc79e2abf3085d4be6a844a06e34'/>
<id>urn:sha1:bdfbef2d29dcdc79e2abf3085d4be6a844a06e34</id>
<content type='text'>
The selection 0 is a perfectly valid, so stop using it to have
the special meaning of interrupt line not used in the intr_lines.

Instead introduce a special CHV_INVALID_HWIRQ value, derived
from INVALID_HWIRQ. which is never a valid selection and use
that to indicate unused interrupt lines.

Cc: Yauhen Kharuzhy &lt;jekhor@gmail.com&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: Bulk conversion to generic_handle_domain_irq()</title>
<updated>2021-08-12T10:39:39Z</updated>
<author>
<name>Marc Zyngier</name>
</author>
<published>2021-05-04T16:42:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a9cb09b7be84a7adc9e6f4aaf8d770933d65f953'/>
<id>urn:sha1:a9cb09b7be84a7adc9e6f4aaf8d770933d65f953</id>
<content type='text'>
Wherever possible, replace constructs that match either
generic_handle_irq(irq_find_mapping()) or
generic_handle_irq(irq_linear_revmap()) to a single call to
generic_handle_domain_irq().

Acked-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@canonical.com&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Marc Zyngier &lt;maz@kernel.org&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Preserve CHV_PADCTRL1_INVRXTX_TXDATA flag on GPIOs</title>
<updated>2020-09-07T08:57:19Z</updated>
<author>
<name>Hans de Goede</name>
</author>
<published>2020-09-04T17:21:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a0bf06dc51dbbc5ad182b1bcf4d879db8d297c5e'/>
<id>urn:sha1:a0bf06dc51dbbc5ad182b1bcf4d879db8d297c5e</id>
<content type='text'>
One some devices the GPIO should output the inverted value from what
device-drivers / ACPI code expects. The reason for this is unknown,
perhaps these systems use an external buffer chip on the GPIO which
inverts the signal. The BIOS makes this work by setting the
CHV_PADCTRL1_INVRXTX_TXDATA flag.

Before this commit we would unconditionally clear all INVRXTX flags,
including the CHV_PADCTRL1_INVRXTX_TXDATA flag when a GPIO is requested
by a driver (from chv_gpio_request_enable()).

This breaks systems using this setup. Specifically it is causing
problems for systems with a goodix touchscreen, where the BIOS sets the
INVRXTX_TXDATA flag on the GPIO used for the touchscreen's reset pin.

The goodix touchscreen driver by defaults configures this pin as input
(relying on the pull-up to keep it high), but the clearing of the
INVRXTX_TXDATA flag done by chv_gpio_request_enable() causes it to be
driven low for a brief time before the GPIO gets set to input mode.

This causes the touchscreen controller to get reset. On most CHT devs
with this touchscreen this leads to:

[   31.596534] Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -121

The driver retries this though and then everything is fine. But during
reset the touchscreen uses its interrupt pin as bootstrap to determine
which i2c address to use and on the Acer One S1003 the spurious reset
caused by the clearing of the INVRXTX_TXDATA flag causes the controller
to come back up again on the wrong i2c address, breaking things.

This commit fixes both the -121 errors, as well as the total breakage
on the Acer One S1003, by making chv_gpio_clear_triggering() not clear
the INVRXTX_TXDATA flag if the pin is already configured as a GPIO.

Note that chv_pinmux_set_mux() does still unconditionally clear the
flag, so this only affects GPIO usage.

Fixes: a7d4b171660c ("Input: goodix - add support for getting IRQ + reset GPIOs on Cherry Trail devices")
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Switch to use intel_pinctrl_get_soc_data()</title>
<updated>2020-08-20T09:37:07Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2020-07-29T11:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=10c857f063fc63902160755a6e23fa594290c6d3'/>
<id>urn:sha1:10c857f063fc63902160755a6e23fa594290c6d3</id>
<content type='text'>
Since we have common helper to retrieve SoC data from driver data
we may switch to use it.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Utilize temporary variable to hold device pointer</title>
<updated>2020-08-18T12:10:43Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2020-07-29T12:02:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=359164fa730c45641ec597f48ab33c03d955e824'/>
<id>urn:sha1:359164fa730c45641ec597f48ab33c03d955e824</id>
<content type='text'>
By one of the previous clean up change we got a temporary variable to hold
a device pointer. It can be utilized in other calls in the -&gt;probe() and
save a bit of LOCs.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Switch to use struct intel_pinctrl</title>
<updated>2020-08-18T12:03:33Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2020-07-27T16:12:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ea2e2cabd2dc749d866887a8eaab9fd9536ca0b'/>
<id>urn:sha1:3ea2e2cabd2dc749d866887a8eaab9fd9536ca0b</id>
<content type='text'>
Now when all preparations are done we may easily switch to use
struct intel_pinctrl instead of custom one.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>pinctrl: cherryview: Move custom community members to separate data struct</title>
<updated>2020-08-18T12:03:33Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2020-07-27T16:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8a82857077804b03be3a64fc5204ebc49a53dd95'/>
<id>urn:sha1:8a82857077804b03be3a64fc5204ebc49a53dd95</id>
<content type='text'>
This is a preparatory patch for bigger clean up pending for Cherryview driver.
There is no functional change intended.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Acked-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
</content>
</entry>
</feed>
