Re: [PATCH] regulator: s5m8767: add support for GPIO descriptors
From: Krzysztof Kozlowski
Date: Tue Apr 15 2025 - 05:44:10 EST
On 15/04/2025 10:12, He Yong wrote:
> This patch converts the S5M8767 PMIC driver to use GPIO descriptors
> instead of the legacy GPIO interface. The changes include:
>
> 1. Replace integer GPIO numbers with struct gpio_desc pointers in the
> platform data structure
> 2. Use devm_gpiod_get_index() to get GPIO descriptors from device tree
> 3. Replace gpio_set_value() with gpiod_set_value() for GPIO control
> 4. Remove manual GPIO request and direction setting code
> 5. Simplify GPIO error handling
>
> The conversion to GPIO descriptors provides several benefits:
> - Better integration with the device tree
> - Automatic GPIO resource management
> - More consistent GPIO handling across the kernel
> - Reduced boilerplate code
>
> This change maintains backward compatibility with existing device trees
> while modernizing the driver to use the preferred GPIO interface
There are already patches on the lists for this or something similar, so
double check if you are not duplicating effort.
In any case:
<form letter>
Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC (and consider --no-git-fallback argument, so you will
not CC people just because they made one commit years ago). It might
happen, that command when run on an older kernel, gives you outdated
entries. Therefore please be sure you base your patches on recent Linux
kernel.
Tools like b4 or scripts/get_maintainer.pl provide you proper list of
people, so fix your workflow. Tools might also fail if you work on some
ancient tree (don't, instead use mainline) or work on fork of kernel
(don't, instead use mainline). Just use b4 and everything should be
fine, although remember about `b4 prep --auto-to-cc` if you added new
patches to the patchset.
</form letter>
Best regards,
Krzysztof