]> www.infradead.org Git - users/hch/misc.git/commit
gpio: tqmx86: consistently refer to IRQs by hwirq numbers
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
Thu, 12 Dec 2024 14:08:06 +0000 (15:08 +0100)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 16 Dec 2024 09:00:46 +0000 (10:00 +0100)
commit0ccf314304ed5b83df7470a8ed0fe1b6ed48fc03
tree64c04780cff14488c0f15e8bd3c7ee4ab6ff3cee
parent2a485c83787723671b7ad215e4e141315e46b311
gpio: tqmx86: consistently refer to IRQs by hwirq numbers

On currently supported variants of the TQMx86 GPIO controller, only
GPIOs 4-7 have IRQ support; in the interrupt status and config
registers, position 0 therefore corresponds to GPIO 4, position 1 to
GPIO 5, etc. This was made even more confusing by sometimes using the
term "offset" to refer to GPIO numbers (which are equavalent to hwirq
numbers), and sometimes to bit positions in the hardware registers.

With this change, the whole driver consistently uses hwirq numbers (==
GPIO numbers) when referring to the IRQs, and only the two pieces of
code that interact with the hardware registers (tqmx86_gpio_irq_config()
and tqmx86_gpio_irq_handler()) deal with bit positions. Space for hwirq
numbers 0-3 is reserved in the irq_type array, but remains unused for
existing (COM Express) TQMx86 variants; support for TQMx86 variants that
support IRQs on all GPIO lines will be added in the future.

No functional change intended.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/94b78f4a9500bb71e66c0f7d3b084fec5cfe42ca.1734001247.git.matthias.schiffer@ew.tq-group.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-tqmx86.c