From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baolin Wang Subject: Re: [PATCH 2/2] gpio: Add GPIO driver for Spreadtrum SC9860 platform Date: Thu, 1 Feb 2018 20:26:59 +0800 Message-ID: References: <2834309f69a1ec37b84a33f153a3d0b90336bcc6.1517313987.git.baolin.wang@linaro.org> <20180201122230.GC690@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <20180201122230.GC690@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: Marcus Folkesson Cc: Andy Shevchenko , Linus Walleij , Rob Herring , Mark Rutland , devicetree , Linux Kernel Mailing List , "open list:GPIO SUBSYSTEM" , Mark Brown List-Id: linux-gpio@vger.kernel.org On 1 February 2018 at 20:22, Marcus Folkesson wrote: > On Thu, Feb 01, 2018 at 11:08:46AM +0800, Baolin Wang wrote: >> On 31 January 2018 at 22:23, Andy Shevchenko wrote: >> > On Wed, Jan 31, 2018 at 4:01 AM, Baolin Wang wrote: >> >> On 31 January 2018 at 00:48, Andy Shevchenko wrote: >> >>> On Tue, Jan 30, 2018 at 2:07 PM, Baolin Wang wrote: >> >>>> The Spreadtrum SC9860 platform GPIO controller contains 16 groups and >> >>>> each group contains 16 GPIOs. Each GPIO can set input/output and has >> >>>> the interrupt capability. >> >>> >> >>>> +config GPIO_SPRD >> >>> >> >>>> + bool "Spreadtrum GPIO support" >> >>> >> >>> Either you have to put tristate here, or remove all redundant >> >>> module_*() and MODULE_*() macros. >> >> >> >> I will remove module_*() and MODULE_*() macros in next version. Thanks >> >> for your comments. >> > >> > In that case you need to explain why driver can't be module. (And >> > don't forget to replace module.h with init.h). >> >> After more investigation, I found most GPIO dependencies can be >> deferred to probe. So I will change the GPIO driver to module level >> and change bool to tristate in next version. > > Then you could replace > > +static int __init sprd_gpio_init(void) > +{ > + return platform_driver_register(&sprd_gpio_driver); > +} > +subsys_initcall(sprd_gpio_init); > + > +static void __exit sprd_gpio_exit(void) > +{ > + platform_driver_unregister(&sprd_gpio_driver); > +} > +module_exit(sprd_gpio_exit); > > with > > module_platform_driver(sprd_gpio_driver); Yes, I already did this in V2 patch set, you can refer to the V2 patch set. Thanks. -- Baolin.wang Best Regards