devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: syscon: Allow to using subdevices
@ 2013-11-14 12:52 Alexander Shiyan
  2013-11-14 14:44 ` Lee Jones
  2013-11-14 14:46 ` Mark Rutland
  0 siblings, 2 replies; 4+ messages in thread
From: Alexander Shiyan @ 2013-11-14 12:52 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Samuel Ortiz, Lee Jones,
	Grant Likely, Rob Herring, Alexander Shiyan

This patch adds support for using subdevices within syscon node.
Primary usage of this is describe all devices with same memory
region in one container.

Signed-off-by: Alexander Shiyan <shc_work-JGs/UdohzUI@public.gmane.org>
---
 drivers/mfd/syscon.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
index 71841f9..6e9244a 100644
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -152,6 +152,9 @@ static int syscon_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, syscon);
 
+	if (of_platform_populate(dev->of_node, NULL, NULL, dev))
+		dev_warn(dev, "Fail to create subdevices\n");
+
 	dev_info(dev, "regmap %pR registered\n", res);
 
 	return 0;
-- 
1.8.1.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] mfd: syscon: Allow to using subdevices
  2013-11-14 12:52 [PATCH] mfd: syscon: Allow to using subdevices Alexander Shiyan
@ 2013-11-14 14:44 ` Lee Jones
  2013-11-14 14:46 ` Mark Rutland
  1 sibling, 0 replies; 4+ messages in thread
From: Lee Jones @ 2013-11-14 14:44 UTC (permalink / raw)
  To: Alexander Shiyan
  Cc: linux-kernel, devicetree, Samuel Ortiz, Grant Likely, Rob Herring

> This patch adds support for using subdevices within syscon node.
> Primary usage of this is describe all devices with same memory
> region in one container.

Can you show me an example where people have placed devices as
children to syscon?

> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  drivers/mfd/syscon.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index 71841f9..6e9244a 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -152,6 +152,9 @@ static int syscon_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, syscon);
>  
> +	if (of_platform_populate(dev->of_node, NULL, NULL, dev))
> +		dev_warn(dev, "Fail to create subdevices\n");
> +
>  	dev_info(dev, "regmap %pR registered\n", res);
>  
>  	return 0;
> -- 
> 1.8.1.5
> 

-- 
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] 4+ messages in thread

* Re: [PATCH] mfd: syscon: Allow to using subdevices
  2013-11-14 12:52 [PATCH] mfd: syscon: Allow to using subdevices Alexander Shiyan
  2013-11-14 14:44 ` Lee Jones
@ 2013-11-14 14:46 ` Mark Rutland
       [not found]   ` <20131114144559.GC28328-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Rutland @ 2013-11-14 14:46 UTC (permalink / raw)
  To: Alexander Shiyan
  Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Samuel Ortiz, Lee Jones, grant.likely@linaro.org,
	rob.herring@calxeda.com

On Thu, Nov 14, 2013 at 12:52:03PM +0000, Alexander Shiyan wrote:
> This patch adds support for using subdevices within syscon node.
> Primary usage of this is describe all devices with same memory
> region in one container.

I think if you need to do this, you should not be using syscon. What
exactly is your use-case?

I don't like the idea of treating syscon like a bus or container in this
fashion.

Mark.

> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  drivers/mfd/syscon.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index 71841f9..6e9244a 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -152,6 +152,9 @@ static int syscon_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, syscon);
>  
> +	if (of_platform_populate(dev->of_node, NULL, NULL, dev))
> +		dev_warn(dev, "Fail to create subdevices\n");
> +
>  	dev_info(dev, "regmap %pR registered\n", res);
>  
>  	return 0;
> -- 
> 1.8.1.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH] mfd: syscon: Allow to using subdevices
       [not found]   ` <20131114144559.GC28328-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
@ 2013-11-14 14:58     ` Alexander Shiyan
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Shiyan @ 2013-11-14 14:58 UTC (permalink / raw)
  To: Mark Rutland
  Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Samuel Ortiz, Lee Jones, grant.likely@linaro.org,
	rob.herring@calxeda.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1388 bytes --]

Hello.

> On Thu, Nov 14, 2013 at 12:52:03PM +0000, Alexander Shiyan wrote:
> > This patch adds support for using subdevices within syscon node.
> > Primary usage of this is describe all devices with same memory
> > region in one container.
> 
> I think if you need to do this, you should not be using syscon. What
> exactly is your use-case?
> 
> I don't like the idea of treating syscon like a bus or container in this
> fashion.

Let me first show the new syscon-based driver. After a while, I'm going
to provide it. It will use the current way of getting syscon, i.e. through
syscon_regmap_lookup_by_phandle().

> > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > ---
> >  drivers/mfd/syscon.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> > index 71841f9..6e9244a 100644
> > --- a/drivers/mfd/syscon.c
> > +++ b/drivers/mfd/syscon.c
> > @@ -152,6 +152,9 @@ static int syscon_probe(struct platform_device *pdev)
> >  
> >  	platform_set_drvdata(pdev, syscon);
> >  
> > +	if (of_platform_populate(dev->of_node, NULL, NULL, dev))
> > +		dev_warn(dev, "Fail to create subdevices\n");
> > +
> >  	dev_info(dev, "regmap %pR registered\n", res);
> >  
> >  	return 0;
> > -- 

---
N‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·zøœzÚÞz)í…æèw*\x1fjg¬±¨\x1e¶‰šŽŠÝ¢j.ïÛ°\½½MŽúgjÌæa×\x02››–' ™©Þ¢¸\f¢·¦j:+v‰¨ŠwèjØm¶Ÿÿ¾\a«‘êçzZ+ƒùšŽŠÝ¢j"ú!¶i

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

end of thread, other threads:[~2013-11-14 14:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 12:52 [PATCH] mfd: syscon: Allow to using subdevices Alexander Shiyan
2013-11-14 14:44 ` Lee Jones
2013-11-14 14:46 ` Mark Rutland
     [not found]   ` <20131114144559.GC28328-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-11-14 14:58     ` Alexander Shiyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).