<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/gpio, branch v6.13</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.13</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.13'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-01-14T13:04:38Z</updated>
<entry>
<title>gpio: xilinx: Convert gpio_lock to raw spinlock</title>
<updated>2025-01-14T13:04:38Z</updated>
<author>
<name>Sean Anderson</name>
<email>sean.anderson@linux.dev</email>
</author>
<published>2025-01-10T16:33:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9860370c2172704b6b4f0075a0c2a29fd84af96a'/>
<id>urn:sha1:9860370c2172704b6b4f0075a0c2a29fd84af96a</id>
<content type='text'>
irq_chip functions may be called in raw spinlock context. Therefore, we
must also use a raw spinlock for our own internal locking.

This fixes the following lockdep splat:

[    5.349336] =============================
[    5.353349] [ BUG: Invalid wait context ]
[    5.357361] 6.13.0-rc5+ #69 Tainted: G        W
[    5.363031] -----------------------------
[    5.367045] kworker/u17:1/44 is trying to lock:
[    5.371587] ffffff88018b02c0 (&amp;chip-&gt;gpio_lock){....}-{3:3}, at: xgpio_irq_unmask (drivers/gpio/gpio-xilinx.c:433 (discriminator 8))
[    5.380079] other info that might help us debug this:
[    5.385138] context-{5:5}
[    5.387762] 5 locks held by kworker/u17:1/44:
[    5.392123] #0: ffffff8800014958 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work (kernel/workqueue.c:3204)
[    5.402260] #1: ffffffc082fcbdd8 (deferred_probe_work){+.+.}-{0:0}, at: process_one_work (kernel/workqueue.c:3205)
[    5.411528] #2: ffffff880172c900 (&amp;dev-&gt;mutex){....}-{4:4}, at: __device_attach (drivers/base/dd.c:1006)
[    5.419929] #3: ffffff88039c8268 (request_class#2){+.+.}-{4:4}, at: __setup_irq (kernel/irq/internals.h:156 kernel/irq/manage.c:1596)
[    5.428331] #4: ffffff88039c80c8 (lock_class#2){....}-{2:2}, at: __setup_irq (kernel/irq/manage.c:1614)
[    5.436472] stack backtrace:
[    5.439359] CPU: 2 UID: 0 PID: 44 Comm: kworker/u17:1 Tainted: G        W          6.13.0-rc5+ #69
[    5.448690] Tainted: [W]=WARN
[    5.451656] Hardware name: xlnx,zynqmp (DT)
[    5.455845] Workqueue: events_unbound deferred_probe_work_func
[    5.461699] Call trace:
[    5.464147] show_stack+0x18/0x24 C
[    5.467821] dump_stack_lvl (lib/dump_stack.c:123)
[    5.471501] dump_stack (lib/dump_stack.c:130)
[    5.474824] __lock_acquire (kernel/locking/lockdep.c:4828 kernel/locking/lockdep.c:4898 kernel/locking/lockdep.c:5176)
[    5.478758] lock_acquire (arch/arm64/include/asm/percpu.h:40 kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851 kernel/locking/lockdep.c:5814)
[    5.482429] _raw_spin_lock_irqsave (include/linux/spinlock_api_smp.h:111 kernel/locking/spinlock.c:162)
[    5.486797] xgpio_irq_unmask (drivers/gpio/gpio-xilinx.c:433 (discriminator 8))
[    5.490737] irq_enable (kernel/irq/internals.h:236 kernel/irq/chip.c:170 kernel/irq/chip.c:439 kernel/irq/chip.c:432 kernel/irq/chip.c:345)
[    5.494060] __irq_startup (kernel/irq/internals.h:241 kernel/irq/chip.c:180 kernel/irq/chip.c:250)
[    5.497645] irq_startup (kernel/irq/chip.c:270)
[    5.501143] __setup_irq (kernel/irq/manage.c:1807)
[    5.504728] request_threaded_irq (kernel/irq/manage.c:2208)

Fixes: a32c7caea292 ("gpio: gpio-xilinx: Add interrupt support")
Signed-off-by: Sean Anderson &lt;sean.anderson@linux.dev&gt;
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250110163354.2012654-1-sean.anderson@linux.dev
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: loongson: Fix Loongson-2K2000 ACPI GPIO register offset</title>
<updated>2025-01-08T08:54:20Z</updated>
<author>
<name>Binbin Zhou</name>
<email>zhoubinbin@loongson.cn</email>
</author>
<published>2025-01-07T10:38:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e59f4c97172de0c302894cfd5616161c1f0c4d85'/>
<id>urn:sha1:e59f4c97172de0c302894cfd5616161c1f0c4d85</id>
<content type='text'>
Since commit 3feb70a61740 ("gpio: loongson: add more gpio chip
support"), the Loongson-2K2000 GPIO is supported.

However, according to the firmware development specification, the
Loongson-2K2000 ACPI GPIO register offsets in the driver do not match
the register base addresses in the firmware, resulting in the registers
not being accessed properly.

Now, we fix it to ensure the GPIO function works properly.

Cc: stable@vger.kernel.org
Cc: Yinbo Zhu &lt;zhuyinbo@loongson.cn&gt;
Fixes: 3feb70a61740 ("gpio: loongson: add more gpio chip support")
Co-developed-by: Hongliang Wang &lt;wanghongliang@loongson.cn&gt;
Signed-off-by: Hongliang Wang &lt;wanghongliang@loongson.cn&gt;
Signed-off-by: Binbin Zhou &lt;zhoubinbin@loongson.cn&gt;
Link: https://lore.kernel.org/r/20250107103856.1037222-1-zhoubinbin@loongson.cn
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: sim: lock up configfs that an instantiated device depends on</title>
<updated>2025-01-03T16:15:04Z</updated>
<author>
<name>Koichiro Den</name>
<email>koichiro.den@canonical.com</email>
</author>
<published>2025-01-03T14:18:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8bd76b3d3f3af7ac2898b6a27ad90c444fec418f'/>
<id>urn:sha1:8bd76b3d3f3af7ac2898b6a27ad90c444fec418f</id>
<content type='text'>
Once a sim device is instantiated and actively used, allowing rmdir for
its configfs serves no purpose and can be confusing. Effectively,
arbitrary users start depending on its existence.

Make the subsystem itself depend on the configfs entry for a sim device
while it is in active use.

Signed-off-by: Koichiro Den &lt;koichiro.den@canonical.com&gt;
Link: https://lore.kernel.org/r/20250103141829.430662-5-koichiro.den@canonical.com
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: virtuser: lock up configfs that an instantiated device depends on</title>
<updated>2025-01-03T16:15:04Z</updated>
<author>
<name>Koichiro Den</name>
<email>koichiro.den@canonical.com</email>
</author>
<published>2025-01-03T14:18:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c7c434c1dba955005f5161dae73f09c0a922cfa7'/>
<id>urn:sha1:c7c434c1dba955005f5161dae73f09c0a922cfa7</id>
<content type='text'>
Once a virtuser device is instantiated and actively used, allowing rmdir
for its configfs serves no purpose and can be confusing. Userspace
interacts with the virtual consumer at arbitrary times, meaning it
depends on its existence.

Make the subsystem itself depend on the configfs entry for a virtuser
device while it is in active use.

Signed-off-by: Koichiro Den &lt;koichiro.den@canonical.com&gt;
Link: https://lore.kernel.org/r/20250103141829.430662-4-koichiro.den@canonical.com
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: virtuser: fix handling of multiple conn_ids in lookup table</title>
<updated>2025-01-03T16:15:03Z</updated>
<author>
<name>Koichiro Den</name>
<email>koichiro.den@canonical.com</email>
</author>
<published>2025-01-03T14:18:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=656cc2e892f128b03ea9ef19bd11d70f71d5472b'/>
<id>urn:sha1:656cc2e892f128b03ea9ef19bd11d70f71d5472b</id>
<content type='text'>
Creating a virtuser device via configfs with multiple conn_ids fails due
to incorrect indexing of lookup entries. Correct the indexing logic to
ensure proper functionality when multiple gpio_virtuser_lookup are
created.

Fixes: 91581c4b3f29 ("gpio: virtuser: new virtual testing driver for the GPIO API")
Signed-off-by: Koichiro Den &lt;koichiro.den@canonical.com&gt;
Link: https://lore.kernel.org/r/20250103141829.430662-3-koichiro.den@canonical.com
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: virtuser: fix missing lookup table cleanups</title>
<updated>2025-01-03T16:15:03Z</updated>
<author>
<name>Koichiro Den</name>
<email>koichiro.den@canonical.com</email>
</author>
<published>2025-01-03T14:18:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a619cba8c69c434258ff4101d463322cd63e1bdc'/>
<id>urn:sha1:a619cba8c69c434258ff4101d463322cd63e1bdc</id>
<content type='text'>
When a virtuser device is created via configfs and the probe fails due
to an incorrect lookup table, the table is not removed. This prevents
subsequent probe attempts from succeeding, even if the issue is
corrected, unless the device is released. Additionally, cleanup is also
needed in the less likely case of platform_device_register_full()
failure.

Besides, a consistent memory leak in lookup_table-&gt;dev_id was spotted
using kmemleak by toggling the live state between 0 and 1 with a correct
lookup table.

Introduce gpio_virtuser_remove_lookup_table() as the counterpart to the
existing gpio_virtuser_make_lookup_table() and call it from all
necessary points to ensure proper cleanup.

Fixes: 91581c4b3f29 ("gpio: virtuser: new virtual testing driver for the GPIO API")
Signed-off-by: Koichiro Den &lt;koichiro.den@canonical.com&gt;
Link: https://lore.kernel.org/r/20250103141829.430662-2-koichiro.den@canonical.com
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: idio-16: Actually make use of the GPIO_IDIO_16 symbol namespace</title>
<updated>2024-12-10T10:38:57Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2024-12-03T17:26:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9ac4b58fcef0f9fc03fa6e126a5f53c1c71ada8a'/>
<id>urn:sha1:9ac4b58fcef0f9fc03fa6e126a5f53c1c71ada8a</id>
<content type='text'>
DEFAULT_SYMBOL_NAMESPACE must already be defined when &lt;linux/export.h&gt;
is included. So move the define above the include block.

Fixes: b9b1fc1ae119 ("gpio: idio-16: Introduce the ACCES IDIO-16 GPIO library module")
Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@baylibre.com&gt;
Acked-by: William Breathitt Gray &lt;wbg@kernel.org&gt;
Link: https://lore.kernel.org/r/20241203172631.1647792-2-u.kleine-koenig@baylibre.com
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v6.13-rc2' into gpio/for-current</title>
<updated>2024-12-10T10:38:38Z</updated>
<author>
<name>Bartosz Golaszewski</name>
<email>bartosz.golaszewski@linaro.org</email>
</author>
<published>2024-12-10T10:38:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dd4d315f38272688edea0611a11cadf6a445f61a'/>
<id>urn:sha1:dd4d315f38272688edea0611a11cadf6a445f61a</id>
<content type='text'>
Linux 6.13-rc2
</content>
</entry>
<entry>
<title>gpio: graniterapids: Fix GPIO Ack functionality</title>
<updated>2024-12-10T09:35:13Z</updated>
<author>
<name>Alan Borzeszkowski</name>
<email>alan.borzeszkowski@linux.intel.com</email>
</author>
<published>2024-12-04T07:04:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0bb18e34abdde7bf58fca8542e2dcf621924ea19'/>
<id>urn:sha1:0bb18e34abdde7bf58fca8542e2dcf621924ea19</id>
<content type='text'>
Interrupt status (GPI_IS) register is cleared by writing 1 to it, not 0.

Cc: stable@vger.kernel.org
Signed-off-by: Alan Borzeszkowski &lt;alan.borzeszkowski@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://lore.kernel.org/r/20241204070415.1034449-8-mika.westerberg@linux.intel.com
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
<entry>
<title>gpio: graniterapids: Check if GPIO line can be used for IRQs</title>
<updated>2024-12-10T09:35:13Z</updated>
<author>
<name>Alan Borzeszkowski</name>
<email>alan.borzeszkowski@linux.intel.com</email>
</author>
<published>2024-12-04T07:04:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c0ec4890d6454980c53c3cc164140115c4a671f2'/>
<id>urn:sha1:c0ec4890d6454980c53c3cc164140115c4a671f2</id>
<content type='text'>
GPIO line can only be used as interrupt if its INTSEL register is
programmed by the BIOS.

Cc: stable@vger.kernel.org
Signed-off-by: Alan Borzeszkowski &lt;alan.borzeszkowski@linux.intel.com&gt;
Signed-off-by: Mika Westerberg &lt;mika.westerberg@linux.intel.com&gt;
Acked-by: Andy Shevchenko &lt;andy@kernel.org&gt;
Link: https://lore.kernel.org/r/20241204070415.1034449-7-mika.westerberg@linux.intel.com
Signed-off-by: Bartosz Golaszewski &lt;bartosz.golaszewski@linaro.org&gt;
</content>
</entry>
</feed>
