i2c: mux: demux-pinctrl: disable PM user interface
Subsystems (2)
Wolfram Sang
maintainerPATCH 1/1 i2c: mux: demux-pinctrl: disable PM user interface
The demux device is only a logical device with no children. So, no RuntimePM is needed, let's disable the sysfs interface for it.
---
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(+)
drivers/i2c/muxes/i2c-demux-pinctrl.c +3 -0
@@ -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 );
Signature · 1 line
2.11.0
Peter Rosin
AppliedQuoted 9 lines · 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 <[email protected]>---
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
Quoted 25 lines
drivers/i2c/muxes/i2c-demux-pinctrl.c | 3 +++ 1 file changed, 3 insertions(+)drivers/i2c/muxes/i2c-demux-pinctrl.c +3
-0@@ -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 );