[PATCH] pinctrl: mediatek: add airoha an7581/an7583 pinctrl driver
David Lechner
dlechner at baylibre.com
Mon Apr 27 21:12:11 CEST 2026
On 4/23/26 5:20 AM, Benjamin Larsson wrote:
> On 20/04/2026 21:54, David Lechner wrote:
>> On 4/20/26 12:21 PM, Mikhail Kshevetskiy wrote:
>>> The patch adds pinctrl and gpio drivers for an7581/an7583 SoCs.
>>> The code is based on linux airoha pinctrl driver.
>>>
>>> There are several '#if 0' .. '#endif' in the code. This was done
>> IMHO, `#if 0` is just noise and we should delete it.
>>
>>> to make it easier to compare Linux and U-Boot pinctrl drivers.
>>>
>>> Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy at iopsys.eu>
>>> ---
>>> drivers/pinctrl/mediatek/Kconfig | 22 +-
>>> drivers/pinctrl/mediatek/Makefile | 3 +
>>> drivers/pinctrl/mediatek/pinctrl-airoha.c | 3297 +++++++++++++++++++++
>> Wowsers! This is a lot of code for one file, let alone one patch. hopefully
>> we can split it up. For example, move the SoC-specific tables to separate
>> files.
> Hi, we have a split patch for linux here:
>
> https://sirherobrine23.com.br/airoha_an7523/kernel/pulls/17/files
>
> So the code could look something like that and it would make it easier to add more targets later.
Yes, splitting it up like this is what I had in mind.
>
> It would be nice if we could get pointed in a general direction where to take this. The AN7581 and AN7583 are very similar and the Linux kernel reuses lots of tables but I think that optimization makes it harder to add other targets and it adds complexity in the maintenance perspective.
>
> Any comments?
Personally, I don't have a problem with duplicating some tables in the
chip-specific files to make it easier to maintain.
>
> MvH
>
> Benjamin Larsson
>
More information about the U-Boot
mailing list