All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: ssbi: promote the driver to subsys level
@ 2014-09-17  0:59 Srinivas Kandagatla
  2014-09-17 16:03 ` Lee Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Srinivas Kandagatla @ 2014-09-17  0:59 UTC (permalink / raw)
  To: David Brown
  Cc: Daniel Walker, Samuel Ortiz, Lee Jones, linux-arm-msm,
	linux-kernel, Srinivas Kandagatla

This patch promtes the driver to be at subsystem level as this driver
will be used by gpio controller drivers which inturn are used by many
platform drivers.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/mfd/ssbi.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c
index b78942e..4fbe02e 100644
--- a/drivers/mfd/ssbi.c
+++ b/drivers/mfd/ssbi.c
@@ -331,7 +331,12 @@ static struct platform_driver ssbi_driver = {
 		.of_match_table = ssbi_match_table,
 	},
 };
-module_platform_driver(ssbi_driver);
+
+static int ssbi_init(void)
+{
+	return platform_driver_register(&ssbi_driver);
+}
+subsys_initcall(ssbi_init);
 
 MODULE_LICENSE("GPL v2");
 MODULE_VERSION("1.0");
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mfd: ssbi: promote the driver to subsys level
  2014-09-17  0:59 [PATCH] mfd: ssbi: promote the driver to subsys level Srinivas Kandagatla
@ 2014-09-17 16:03 ` Lee Jones
       [not found]   ` <CAGkH4DOPHQWBVZgiLZugcoTZNJiS-ar8KNvq96W5UmX8C6GCTg@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Lee Jones @ 2014-09-17 16:03 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: David Brown, Daniel Walker, Samuel Ortiz, linux-arm-msm, linux-kernel

On Wed, 17 Sep 2014, Srinivas Kandagatla wrote:

> This patch promtes the driver to be at subsystem level as this driver
> will be used by gpio controller drivers which inturn are used by many
> platform drivers.

Any reason why you're not using -EPROBE?

> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  drivers/mfd/ssbi.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c
> index b78942e..4fbe02e 100644
> --- a/drivers/mfd/ssbi.c
> +++ b/drivers/mfd/ssbi.c
> @@ -331,7 +331,12 @@ static struct platform_driver ssbi_driver = {
>  		.of_match_table = ssbi_match_table,
>  	},
>  };
> -module_platform_driver(ssbi_driver);
> +
> +static int ssbi_init(void)
> +{
> +	return platform_driver_register(&ssbi_driver);
> +}
> +subsys_initcall(ssbi_init);
>  
>  MODULE_LICENSE("GPL v2");
>  MODULE_VERSION("1.0");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mfd: ssbi: promote the driver to subsys level
       [not found]   ` <CAGkH4DOPHQWBVZgiLZugcoTZNJiS-ar8KNvq96W5UmX8C6GCTg@mail.gmail.com>
@ 2014-09-17 16:49     ` Lee Jones
  2014-09-17 22:25       ` Lee Jones
  0 siblings, 1 reply; 5+ messages in thread
From: Lee Jones @ 2014-09-17 16:49 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: linux-arm-msm, Samuel Ortiz, Daniel Walker, David Brown, linux-kernel

On Wed, 17 Sep 2014, Srinivas Kandagatla wrote:

> On 17 Sep 2014 09:03, "Lee Jones" <lee.jones@linaro.org> wrote:
> >
> > On Wed, 17 Sep 2014, Srinivas Kandagatla wrote:
> >
> > > This patch promtes the driver to be at subsystem level as this driver
> > > will be used by gpio controller drivers which inturn are used by many
> > > platform drivers.
> >
> > Any reason why you're not using -EPROBE?
> >
> EPROBE is possible but it's going to add few more cycles to boot time.
> 
> As this driver is a very basic driver on which other drivers depend
> ensuring the sequence would improve the boot time.

We only tend to promote drivers' init level as a last resort.  If
-EPROBE_DEFER is possible, please use that instead.

> > > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > > ---
> > >  drivers/mfd/ssbi.c | 7 ++++++-
> > >  1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c
> > > index b78942e..4fbe02e 100644
> > > --- a/drivers/mfd/ssbi.c
> > > +++ b/drivers/mfd/ssbi.c
> > > @@ -331,7 +331,12 @@ static struct platform_driver ssbi_driver = {
> > >               .of_match_table = ssbi_match_table,
> > >       },
> > >  };
> > > -module_platform_driver(ssbi_driver);
> > > +
> > > +static int ssbi_init(void)
> > > +{
> > > +     return platform_driver_register(&ssbi_driver);
> > > +}
> > > +subsys_initcall(ssbi_init);
> > >
> > >  MODULE_LICENSE("GPL v2");
> > >  MODULE_VERSION("1.0");
> >

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mfd: ssbi: promote the driver to subsys level
  2014-09-17 16:49     ` Lee Jones
@ 2014-09-17 22:25       ` Lee Jones
  2014-09-17 22:34         ` Srinivas Kandagatla
  0 siblings, 1 reply; 5+ messages in thread
From: Lee Jones @ 2014-09-17 22:25 UTC (permalink / raw)
  To: Srinivas Kandagatla
  Cc: linux-arm-msm, Samuel Ortiz, Daniel Walker, David Brown, linux-kernel

On Wed, 17 Sep 2014, Lee Jones wrote:

> On Wed, 17 Sep 2014, Srinivas Kandagatla wrote:
> 
> > On 17 Sep 2014 09:03, "Lee Jones" <lee.jones@linaro.org> wrote:
> > >
> > > On Wed, 17 Sep 2014, Srinivas Kandagatla wrote:
> > >
> > > > This patch promtes the driver to be at subsystem level as this driver
> > > > will be used by gpio controller drivers which inturn are used by many
> > > > platform drivers.
> > >
> > > Any reason why you're not using -EPROBE?
> > >
> > EPROBE is possible but it's going to add few more cycles to boot time.
> > 
> > As this driver is a very basic driver on which other drivers depend
> > ensuring the sequence would improve the boot time.
> 
> We only tend to promote drivers' init level as a last resort.  If
> -EPROBE_DEFER is possible, please use that instead.

To conclude for any casual/interested observers; I'd be willing to
accept the patch if you can provide some metrics that prove boot-time
is sufficiently increased as a result of using -EPROBE_DEFER.

> > > > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > > > ---
> > > >  drivers/mfd/ssbi.c | 7 ++++++-
> > > >  1 file changed, 6 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c
> > > > index b78942e..4fbe02e 100644
> > > > --- a/drivers/mfd/ssbi.c
> > > > +++ b/drivers/mfd/ssbi.c
> > > > @@ -331,7 +331,12 @@ static struct platform_driver ssbi_driver = {
> > > >               .of_match_table = ssbi_match_table,
> > > >       },
> > > >  };
> > > > -module_platform_driver(ssbi_driver);
> > > > +
> > > > +static int ssbi_init(void)
> > > > +{
> > > > +     return platform_driver_register(&ssbi_driver);
> > > > +}
> > > > +subsys_initcall(ssbi_init);

Also, as a nasty side-effect of this patch, this module will no longer
be unloadable, which is probably not what you want.

> > > >  MODULE_LICENSE("GPL v2");
> > > >  MODULE_VERSION("1.0");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mfd: ssbi: promote the driver to subsys level
  2014-09-17 22:25       ` Lee Jones
@ 2014-09-17 22:34         ` Srinivas Kandagatla
  0 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2014-09-17 22:34 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-msm, Samuel Ortiz, Daniel Walker, David Brown, linux-kernel



On 17/09/14 23:25, Lee Jones wrote:
> On Wed, 17 Sep 2014, Lee Jones wrote:
>
>> On Wed, 17 Sep 2014, Srinivas Kandagatla wrote:
>>
>>> On 17 Sep 2014 09:03, "Lee Jones" <lee.jones@linaro.org> wrote:
>>>>
>>>> On Wed, 17 Sep 2014, Srinivas Kandagatla wrote:
>>>>
>>>>> This patch promtes the driver to be at subsystem level as this driver
>>>>> will be used by gpio controller drivers which inturn are used by many
>>>>> platform drivers.
>>>>
>>>> Any reason why you're not using -EPROBE?
>>>>
>>> EPROBE is possible but it's going to add few more cycles to boot time.
>>>
>>> As this driver is a very basic driver on which other drivers depend
>>> ensuring the sequence would improve the boot time.
>>
>> We only tend to promote drivers' init level as a last resort.  If
>> -EPROBE_DEFER is possible, please use that instead.
>
> To conclude for any casual/interested observers; I'd be willing to
> accept the patch if you can provide some metrics that prove boot-time
> is sufficiently increased as a result of using -EPROBE_DEFER.

That's fair enough I will get the details..

>
>>>>> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>>>>> ---
>>>>>   drivers/mfd/ssbi.c | 7 ++++++-
>>>>>   1 file changed, 6 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/mfd/ssbi.c b/drivers/mfd/ssbi.c
>>>>> index b78942e..4fbe02e 100644
>>>>> --- a/drivers/mfd/ssbi.c
>>>>> +++ b/drivers/mfd/ssbi.c
>>>>> @@ -331,7 +331,12 @@ static struct platform_driver ssbi_driver = {
>>>>>                .of_match_table = ssbi_match_table,
>>>>>        },
>>>>>   };
>>>>> -module_platform_driver(ssbi_driver);
>>>>> +
>>>>> +static int ssbi_init(void)
>>>>> +{
>>>>> +     return platform_driver_register(&ssbi_driver);
>>>>> +}
>>>>> +subsys_initcall(ssbi_init);
>
> Also, as a nasty side-effect of this patch, this module will no longer
> be unloadable, which is probably not what you want.
>
>>>>>   MODULE_LICENSE("GPL v2");
>>>>>   MODULE_VERSION("1.0");
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-17 22:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-17  0:59 [PATCH] mfd: ssbi: promote the driver to subsys level Srinivas Kandagatla
2014-09-17 16:03 ` Lee Jones
     [not found]   ` <CAGkH4DOPHQWBVZgiLZugcoTZNJiS-ar8KNvq96W5UmX8C6GCTg@mail.gmail.com>
2014-09-17 16:49     ` Lee Jones
2014-09-17 22:25       ` Lee Jones
2014-09-17 22:34         ` Srinivas Kandagatla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.