Re: [PATCH v1 4/4] mfd: intel-ehl: Introduce Intel Elkhart Lake PSE GPIO and TIO
From: Andy Shevchenko
Date: Wed Feb 26 2025 - 08:20:47 EST
On Wed, Feb 26, 2025 at 11:45:27AM +0530, Raag Jadav wrote:
> Intel Elkhart Lake Programmable Service Engine (PSE) includes two PCI
> devices that expose two different capabilities of GPIO and Timed I/O
> as a single PCI function through shared MMIO.
...
> +config MFD_INTEL_EHL_PSE_GPIO
> + tristate "Intel Elkhart Lake PSE GPIO MFD"
> + depends on PCI && (X86 || COMPILE_TEST)
> + select MFD_CORE
> + help
> + This MFD provides support for GPIO and TIO that exist on Intel
> + Elkhart Lake PSE as a single PCI device. It splits the two I/O
> + devices to their respective I/O drivers.
Can you add a module name here?
...
> +++ b/drivers/mfd/intel-ehl-gpio.c
We are usually align the file name and Kconfig option, and I like Kconfig
choice, so intel_ehl_pse_gpio.c (also note the style with other intel_$SOC_*
files in the folder.
...
> +#include <linux/array_size.h>
> +#include <linux/ioport.h>
> +#include <linux/mfd/core.h>
> +#include <linux/mod_devicetable.h>
> +#include <linux/module.h>
> +#include <linux/platform_device.h>
> +#include <linux/pci.h>
+ stddef.h // for NULL
...
> + return mfd_add_devices(&pci->dev, PLATFORM_DEVID_AUTO, ehl_pse_gpio_devs,
> + ARRAY_SIZE(ehl_pse_gpio_devs), &pci->resource[0],
We have a helper pci_resource_n().
> + pci_irq_vector(pci, 0), NULL);
--
With Best Regards,
Andy Shevchenko