All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] i2c: mux: demux-pinctrl: disable PM user interface
@ 2018-04-30 12:08 Wolfram Sang
  2018-05-19 21:59 ` Peter Rosin
  0 siblings, 1 reply; 2+ messages in thread
From: Wolfram Sang @ 2018-04-30 12:08 UTC (permalink / raw)
  To: linux-i2c
  Cc: linux-renesas-soc, Peter Rosin, linux-pm, Rafael J. Wysocki,
	Wolfram Sang

The demux device is only a logical device with no children. So, no
RuntimePM is needed, let's disable the sysfs interface for it.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

I think it is proper to just disable the interface without enabling RPM at all.
USB and PCIE core do this as well. Still, adding PM and Rafael to CC in case we
all got it wrong.

 drivers/i2c/muxes/i2c-demux-pinctrl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c
index 61440a9507e4..d5e7d4aa6ee1 100644
--- a/drivers/i2c/muxes/i2c-demux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c
@@ -18,6 +18,7 @@
 #include <linux/of.h>
 #include <linux/pinctrl/consumer.h>
 #include <linux/platform_device.h>
+#include <linux/pm_runtime.h>
 #include <linux/slab.h>
 #include <linux/sysfs.h>
 
@@ -262,6 +263,8 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, priv);
 
+	pm_runtime_no_callbacks(&pdev->dev);
+
 	/* switch to first parent as active master */
 	i2c_demux_activate_master(priv, 0);
 
-- 
2.11.0

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

* Re: [PATCH] i2c: mux: demux-pinctrl: disable PM user interface
  2018-04-30 12:08 [PATCH] i2c: mux: demux-pinctrl: disable PM user interface Wolfram Sang
@ 2018-05-19 21:59 ` Peter Rosin
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Rosin @ 2018-05-19 21:59 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c; +Cc: linux-renesas-soc, linux-pm, Rafael J. Wysocki

On 2018-04-30 14:08, Wolfram Sang wrote:
> The demux device is only a logical device with no children. So, no
> RuntimePM is needed, let's disable the sysfs interface for it.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
> 
> I think it is proper to just disable the interface without enabling RPM at all.
> USB and PCIE core do this as well. Still, adding PM and Rafael to CC in case we
> all got it wrong.

Sounds ok to me. I'm not fluent with PM stuff, but I trust your judgement.

Applied to i2c-mux/for-next.

Cheers,
Peter

>  drivers/i2c/muxes/i2c-demux-pinctrl.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c
> index 61440a9507e4..d5e7d4aa6ee1 100644
> --- a/drivers/i2c/muxes/i2c-demux-pinctrl.c
> +++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c
> @@ -18,6 +18,7 @@
>  #include <linux/of.h>
>  #include <linux/pinctrl/consumer.h>
>  #include <linux/platform_device.h>
> +#include <linux/pm_runtime.h>
>  #include <linux/slab.h>
>  #include <linux/sysfs.h>
>  
> @@ -262,6 +263,8 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, priv);
>  
> +	pm_runtime_no_callbacks(&pdev->dev);
> +
>  	/* switch to first parent as active master */
>  	i2c_demux_activate_master(priv, 0);
>  
> 

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

end of thread, other threads:[~2018-05-19 22:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 12:08 [PATCH] i2c: mux: demux-pinctrl: disable PM user interface Wolfram Sang
2018-05-19 21:59 ` Peter Rosin

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.