]> www.infradead.org Git - users/jedix/linux-maple.git/commit
pinctrl: qcom: Add test case for TLMM interrupt handling
authorBjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Thu, 27 Feb 2025 20:39:30 +0000 (12:39 -0800)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 28 Feb 2025 08:41:14 +0000 (09:41 +0100)
commitc7984dc0a2b93255bc8fb924754da8b3b263ed1d
tree0e2959f9c686c927ab316769bb52dc6cce3ac324
parent7da6a3578ab4bcff5f6bdea5fcef08a82139c868
pinctrl: qcom: Add test case for TLMM interrupt handling

While looking at the X1E PDC GPIO interrupts it became clear that we're
lacking a convenient and accessible way to validate if the TLMM
interrupt code performing as expected.

This introduces a kunit-based "hack" that relies on pin bias/pull
configuration to tickle the interrupt logic in non-connected pins to
allow us to evaluate that an expected number of interrupts are
delivered.

The bias/pull configuration is done with mmio accesses directly from the
test code, to avoid having to programmatically acquire and drive the
pinconf interface for the test pin. This limits the scalability of the
code to targets with a particular register layout, but serves our needs
for now.

The pin to be used for testing is specified by the tester using the
"tlmm-test.gpio" module parameter.

Worth mentioning is that some of the test cases currently fails for
GPIOs that is not backed by PDC (i.e. "non-wakeup" GPIOs), as lingering
latched interrupt state is being delivered at IRQ request time.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Link: https://lore.kernel.org/20250227-tlmm-test-v1-1-d18877b4a5db@oss.qualcomm.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/qcom/Kconfig.msm
drivers/pinctrl/qcom/Makefile
drivers/pinctrl/qcom/tlmm-test.c [new file with mode: 0644]