]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pinctrl: eyeq5: Use match data
authorBenoît Monin <benoit.monin@bootlin.com>
Mon, 16 Mar 2026 15:25:42 +0000 (16:25 +0100)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 13 Apr 2026 13:31:40 +0000 (15:31 +0200)
commit7cfa9474b91e8ed53f7d4f7b9ac42358929dc2eb
treea51745151a41b343c26196b9adeebc539fac8722
parent36cab4bd8ba3145b3c4e197cdf20596279036ab7
pinctrl: eyeq5: Use match data

Instead of using the pin descriptions, pin functions and register offsets
of the EyeQ5 directly, access those via a pointer to a newly introduced
struct eq5p_match_data.

This structure contains, in addition to the pin descriptions and pin
functions, an array of pin banks. Each bank holds the number of pins
and the register offsets.

All functions accessing a pin now use a pointer to a bank structure and
an offset inside that bank. The conversion from a pin number to a bank
and an offset is done in the new function eq5p_pin_to_bank_offset(),
which replace eq5p_pin_to_bank() and eq5p_pin_to_offset().

All the data related to the EyeQ5 is declared with the eq5p_eyeq5_
prefix to distinguish it from the common code.

During the probe, we use the parent OF node to get the match data.
We cannot directly use an OF node since pinctrl-eyeq5 is an auxiliary
device of clk-eyeq.

Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
drivers/pinctrl/pinctrl-eyeq5.c