Skip to content

Commit

Permalink
pinctrl: ingenic: Get rid of repetitive data
Browse files Browse the repository at this point in the history
Abuse the pin function pointer to store the pin function value directly,
when all the pins of a group have the same function value. Now when the
pointer value is <= 3 (unsigned), the pointer value is used as the pin
function; otherwise it is used as a regular pointer.

This drastically reduces the number of pin function tables needed, and
drops .data usage by about 2 KiB. Additionally, the few pin function
tables that are still around now contain u8 instead of int, since the
largest number that will be stored is 3.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Tested-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Link: https://lore.kernel.org/r/20201101090104.5088-2-paul@crapouillou.net
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Paul Cercueil authored and Linus Walleij committed Nov 10, 2020
1 parent 5797264 commit bb42b59
Showing 1 changed file with 447 additions and 811 deletions.
Loading

0 comments on commit bb42b59

Please sign in to comment.