[PATCH v5 2/5] pinctrl: mediatek: add MT7988 pinctrl driver
Frank Wunderlich (linux)
linux at fw-web.de
Wed Dec 11 00:43:58 PST 2024
Am 2024-12-10 19:45, schrieb Christophe JAILLET:
> Le 02/12/2024 à 12:00, Frank Wunderlich a écrit :
>> From: Daniel Golle <daniel at makrotopia.org>
>>
>> Add pinctrl driver for the MediaTek MT7988 SoC.
>>
>> Signed-off-by: Sam Shih <sam.shih at mediatek.com>
>> Signed-off-by: Daniel Golle <daniel at makrotopia.org>
>> [correctly initialise for the function_desc structure]
>> Signed-off-by: Arınç ÜNAL <arinc.unal at arinc9.com>
>> Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
>>
>> ---
>
> ...
>
>> +/* flash */
>> +static int mt7988_snfi_pins[] = { 22, 23, 24, 25, 26, 27 };
>> +static int mt7988_snfi_funcs[] = { 2, 2, 2, 2, 2, 2 };
>> +
>> +static int mt7988_emmc_45_pins[] = {
>> + 21, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37
>> +};
>> +static int mt7988_emmc_45_funcs[] = { 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
>> };
>> +
>> +static int mt7988_sdcard_pins[] = { 32, 33, 34, 35, 36, 37 };
>> +static int mt7988_sdcard_funcs[] = { 5, 5, 5, 5, 5, 5 };
>> +
>> +static int mt7988_emmc_51_pins[] = { 38, 39, 40, 41, 42, 43,
>> + 44, 45, 46, 47, 48, 49 };
>> +static int mt7988_emmc_51_funcs[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
>> 1, 1 };
>
> At least all the _pins arrays could be const.
> Maybe we could also make it possible to have _funcs const as well.
>
> ...
>
>> +static struct mtk_pin_soc mt7988_data = {
>
> const?
can do, but for funcs i see no clear way
angelo, can i keep the RB, when changing pins/mtk_pin_soc to const
(without changing macro in drivers/pinctrl/mediatek/pinctrl-moore.h)?
>> + .reg_cal = mt7988_reg_cals,
>> + .pins = mt7988_pins,
>> + .npins = ARRAY_SIZE(mt7988_pins),
>> + .grps = mt7988_groups,
>> + .ngrps = ARRAY_SIZE(mt7988_groups),
>> + .funcs = mt7988_functions,
>> + .nfuncs = ARRAY_SIZE(mt7988_functions),
>> + .eint_hw = &mt7988_eint_hw,
>> + .gpio_m = 0,
>> + .ies_present = false,
>> + .base_names = mt7988_pinctrl_register_base_names,
>> + .nbase_names = ARRAY_SIZE(mt7988_pinctrl_register_base_names),
>> + .bias_disable_set = mtk_pinconf_bias_disable_set,
>> + .bias_disable_get = mtk_pinconf_bias_disable_get,
>> + .bias_set = mtk_pinconf_bias_set,
>> + .bias_get = mtk_pinconf_bias_get,
>> + .pull_type = mt7988_pull_type,
>> + .bias_set_combo = mtk_pinconf_bias_set_combo,
>> + .bias_get_combo = mtk_pinconf_bias_get_combo,
>> + .drive_set = mtk_pinconf_drive_set_rev1,
>> + .drive_get = mtk_pinconf_drive_get_rev1,
>> + .adv_pull_get = mtk_pinconf_adv_pull_get,
>> + .adv_pull_set = mtk_pinconf_adv_pull_set,
>> +};
>
> ...
>
> CJ
More information about the Linux-mediatek
mailing list