[PATCH v3 0/4] gpio: sifive: Module support

Samuel Holland posted 4 patches 2 years, 1 month ago
drivers/gpio/Kconfig       |  2 +-
drivers/gpio/gpio-sifive.c | 47 ++++++++++++++++----------------------
2 files changed, 21 insertions(+), 28 deletions(-)
[PATCH v3 0/4] gpio: sifive: Module support
Posted by Samuel Holland 2 years, 1 month ago
With the call to of_irq_count() removed, the SiFive GPIO driver can be
built as a module. This helps to minimize the size of a multiplatform
kernel, and is required by some downstream distributions (Android GKI).

This series removes the rest of the of_* API usage in the process.

Changes in v3:
 - Use dev_fwnode() instead of member access
 - Mention the SIFIVE_GPIO_MAX check in the commit message
 - Keep the variable for the parent IRQ domain
 - Add a comment explaining why the IRQ data lookup will succeed

Changes in v2:
 - Add 3 new patches removing of_* API usage
 - Add MODULE_AUTHOR and MODULE_DESCRIPTION

Samuel Holland (4):
  gpio: sifive: Directly use the device's fwnode
  gpio: sifive: Look up IRQs only once during probe
  gpio: sifive: Get the parent IRQ's domain from its irq_data
  gpio: sifive: Allow building the driver as a module

 drivers/gpio/Kconfig       |  2 +-
 drivers/gpio/gpio-sifive.c | 47 ++++++++++++++++----------------------
 2 files changed, 21 insertions(+), 28 deletions(-)

-- 
2.40.1
Re: [PATCH v3 0/4] gpio: sifive: Module support
Posted by Bartosz Golaszewski 2 years, 1 month ago
On Tue, Jul 25, 2023 at 2:40 AM Samuel Holland
<samuel.holland@sifive.com> wrote:
>
> With the call to of_irq_count() removed, the SiFive GPIO driver can be
> built as a module. This helps to minimize the size of a multiplatform
> kernel, and is required by some downstream distributions (Android GKI).
>
> This series removes the rest of the of_* API usage in the process.
>
> Changes in v3:
>  - Use dev_fwnode() instead of member access
>  - Mention the SIFIVE_GPIO_MAX check in the commit message
>  - Keep the variable for the parent IRQ domain
>  - Add a comment explaining why the IRQ data lookup will succeed
>
> Changes in v2:
>  - Add 3 new patches removing of_* API usage
>  - Add MODULE_AUTHOR and MODULE_DESCRIPTION
>
> Samuel Holland (4):
>   gpio: sifive: Directly use the device's fwnode
>   gpio: sifive: Look up IRQs only once during probe
>   gpio: sifive: Get the parent IRQ's domain from its irq_data
>   gpio: sifive: Allow building the driver as a module
>
>  drivers/gpio/Kconfig       |  2 +-
>  drivers/gpio/gpio-sifive.c | 47 ++++++++++++++++----------------------
>  2 files changed, 21 insertions(+), 28 deletions(-)
>
> --
> 2.40.1
>

Applied, thanks!

Bartosz
Re: [PATCH v3 0/4] gpio: sifive: Module support
Posted by Andy Shevchenko 2 years, 1 month ago
On Tue, Jul 25, 2023 at 3:40 AM Samuel Holland
<samuel.holland@sifive.com> wrote:
>
> With the call to of_irq_count() removed, the SiFive GPIO driver can be
> built as a module. This helps to minimize the size of a multiplatform
> kernel, and is required by some downstream distributions (Android GKI).
>
> This series removes the rest of the of_* API usage in the process.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
for unreviewed (by me) patches.

Thank you!

> Changes in v3:
>  - Use dev_fwnode() instead of member access
>  - Mention the SIFIVE_GPIO_MAX check in the commit message
>  - Keep the variable for the parent IRQ domain
>  - Add a comment explaining why the IRQ data lookup will succeed
>
> Changes in v2:
>  - Add 3 new patches removing of_* API usage
>  - Add MODULE_AUTHOR and MODULE_DESCRIPTION
>
> Samuel Holland (4):
>   gpio: sifive: Directly use the device's fwnode
>   gpio: sifive: Look up IRQs only once during probe
>   gpio: sifive: Get the parent IRQ's domain from its irq_data
>   gpio: sifive: Allow building the driver as a module
>
>  drivers/gpio/Kconfig       |  2 +-
>  drivers/gpio/gpio-sifive.c | 47 ++++++++++++++++----------------------
>  2 files changed, 21 insertions(+), 28 deletions(-)
>
> --
> 2.40.1
>


-- 
With Best Regards,
Andy Shevchenko