All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reset: stub out devm_reset_control_get()
@ 2014-05-13 15:34 Felipe Balbi
  2014-05-13 15:54 ` Maxime Ripard
  0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2014-05-13 15:34 UTC (permalink / raw)
  To: p.zabel, maxime.ripard, marex, wsa
  Cc: Linux Kernel Mailing List, Alan Stern, Felipe Balbi

without that stub, drivers will fail to build
when CONFIG_RESET_CONTROLLER=n.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 include/linux/reset.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/reset.h b/include/linux/reset.h
index c0eda50..aa94420 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(
 	return ERR_PTR(-ENOSYS);
 }
 
+static inline struct reset_control *devm_reset_control_get(
+					struct device *dev, const char *id)
+{
+	return ERR_PTR(-ENOSYS);
+}
+
 #endif /* CONFIG_RESET_CONTROLLER */
 
 #endif
-- 
2.0.0.rc1


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

* Re: [PATCH] reset: stub out devm_reset_control_get()
  2014-05-13 15:34 [PATCH] reset: stub out devm_reset_control_get() Felipe Balbi
@ 2014-05-13 15:54 ` Maxime Ripard
  2014-05-13 15:58   ` Felipe Balbi
  0 siblings, 1 reply; 3+ messages in thread
From: Maxime Ripard @ 2014-05-13 15:54 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: p.zabel, marex, wsa, Linux Kernel Mailing List, Alan Stern

[-- Attachment #1: Type: text/plain, Size: 1148 bytes --]

On Tue, May 13, 2014 at 10:34:05AM -0500, Felipe Balbi wrote:
> without that stub, drivers will fail to build
> when CONFIG_RESET_CONTROLLER=n.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---
>  include/linux/reset.h | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index c0eda50..aa94420 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(
>  	return ERR_PTR(-ENOSYS);
>  }
>  
> +static inline struct reset_control *devm_reset_control_get(
> +					struct device *dev, const char *id)
> +{
> +	return ERR_PTR(-ENOSYS);
> +}
> +

reset_control_get should only be used in cases where the reset
controller is mandatory for the driver to work, and hence, this driver
should select or depend on CONFIG_RESET_CONTROLLER

If the reset controller is optional, reset_control_get_optional should
be preferred, that is stubed out.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] reset: stub out devm_reset_control_get()
  2014-05-13 15:54 ` Maxime Ripard
@ 2014-05-13 15:58   ` Felipe Balbi
  0 siblings, 0 replies; 3+ messages in thread
From: Felipe Balbi @ 2014-05-13 15:58 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Felipe Balbi, p.zabel, marex, wsa, Linux Kernel Mailing List,
	Alan Stern

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]

On Tue, May 13, 2014 at 05:54:01PM +0200, Maxime Ripard wrote:
> On Tue, May 13, 2014 at 10:34:05AM -0500, Felipe Balbi wrote:
> > without that stub, drivers will fail to build
> > when CONFIG_RESET_CONTROLLER=n.
> > 
> > Signed-off-by: Felipe Balbi <balbi@ti.com>
> > ---
> >  include/linux/reset.h | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/include/linux/reset.h b/include/linux/reset.h
> > index c0eda50..aa94420 100644
> > --- a/include/linux/reset.h
> > +++ b/include/linux/reset.h
> > @@ -75,6 +75,12 @@ static inline struct reset_control *devm_reset_control_get_optional(
> >  	return ERR_PTR(-ENOSYS);
> >  }
> >  
> > +static inline struct reset_control *devm_reset_control_get(
> > +					struct device *dev, const char *id)
> > +{
> > +	return ERR_PTR(-ENOSYS);
> > +}
> > +
> 
> reset_control_get should only be used in cases where the reset
> controller is mandatory for the driver to work, and hence, this driver
> should select or depend on CONFIG_RESET_CONTROLLER
> 
> If the reset controller is optional, reset_control_get_optional should
> be preferred, that is stubed out.

fair enough, depends on it is

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2014-05-13 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13 15:34 [PATCH] reset: stub out devm_reset_control_get() Felipe Balbi
2014-05-13 15:54 ` Maxime Ripard
2014-05-13 15:58   ` Felipe Balbi

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.