Re: [PATCH 4/5] lmp92001: mfd: gpio: Add support LMP92001

From: Linus Walleij
Date: Tue Sep 12 2017 - 05:11:15 EST


On Wed, Aug 30, 2017 at 8:21 PM, <s.abhisit@xxxxxxxxx> wrote:

> From: Abhisit Sangjan <s.abhisit@xxxxxxxxx>
>
> TI LMP92001 Analog System Monitor and Controller
>
> 8-bit GPIOs.
> 12 DACs with 12-bit resolution.
>
> The GPIOs and DACs are shared port function with Cy function pin to
> take control the pin suddenly from external hardware.
> DAC's referance voltage selectable for Internal/External.
>
> 16 + 1 ADCs with 12-bit resolution.
>
> Built-in internal Temperature Sensor on channel 17.
> Window Comparator Function is supported on channel 1-3 and 9-11 for
> monitoring with interrupt signal (pending to implement for interrupt).
> ADC's referance voltage selectable for Internal/External.
>
> Signed-off-by: Abhisit Sangjan <s.abhisit@xxxxxxxxx>

Maybe you can trim the commit message to only be about
GPIO on this patch, since it is only about GPIO?

> +config GPIO_LMP92001
> + tristate "LMP92001 GPIOs"
> + depends on MFD_LMP92001

select GPIOLIB

> +static int __init lmp92001_gpio_init(void)
> +{
> + return platform_driver_register(&lmp92001_gpio_driver);
> +}
> +subsys_initcall(lmp92001_gpio_init);
> +
> +static void __exit lmp92001_gpio_exit(void)
> +{
> + platform_driver_unregister(&lmp92001_gpio_driver);
> +}
> +module_exit(lmp92001_gpio_exit);

Is this necessary? Can't you just have module_platform_driver() and be
done with it?

Yours,
Linus Walleij