linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/3] regulator: bd9571mwv: Add support for toggle power switches
@ 2018-07-16 15:30 Geert Uytterhoeven
  2018-07-16 15:30 ` [PATCH v4 1/3] regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up" Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-07-16 15:30 UTC (permalink / raw)
  To: Marek Vasut, Liam Girdwood, Mark Brown
  Cc: Rafael J . Wysocki, Pavel Machek, Len Brown, linux-pm,
	linux-renesas-soc, linux-kernel, Geert Uytterhoeven

	Hi all,

The ROHM BD9571MWV PMIC on the Renesas Salvator-X(S) and ULCB
development boards supports DDR Backup Power, which means that the DDR
power rails can be kept powered while the main SoC is powered down.

This patch series extends the support for DDR backup mode (see commit
6eb0bfae6973eb6a ("regulator: bd9571mwv: Add support for backup mode"))
to systems with toggle instead of momentary power switches.

With a toggle power switch (or level signal), the following steps must
be followed exactly:
   1. Configure PMIC for backup mode, which changes the role of the
      power switch to a wake-up switch, 
   2. Switch accessory power switch off, to prepare for system suspend,
      which is a manual step not controlled by software,
   3. Suspend system,
   4. Switch accessory power switch on, to resume.

Unlike on systems with a momentary toggle switch, an additional step 2
must be performed in between step 1 and step 3.  Hence step 1 can no
longer be handled in the PMIC's suspend callback.

This patch series allows performing step 1 when the user writes
"on" to the PMIC's "backup_mode" virtual file in sysfs, e.g.

    echo on > /sys/bus/i2c/drivers/bd9571mwv/*/bd9571mwv-regulator*/backup_mode

Conversely, writing "off" reverts the role of the accessory switch to a
power switch.
Note that unlike with momentary switches, backup mode is not enabled by
default, as enabling it prevents the board from being powered off using
the power switch, which may confuse the user.

Changes compared to v3:
  - Fix build error and warning if !CONFIG_PM_SLEEP,
  - Improve patch description and comment,
  - Add Acked-by.

Changes compared to v2:
  - Drop 'PM / wakeup: Add callback for wake-up change notification',
  - New patch 'regulator: bd9571mwv: Use "backup_mode" sysfs file
    instead of "wake_up"',
  - Replace use of "wake_up" sysfs file and extra callback for wake-up
    change notification by custom "backup_mode" sysfs file,
  - New patch ;regulator: bd9571mwv: Document "backup_mode" sysfs file'.

Changes compared to v1:
  - Improve patch descriptions,
  - Drop "return;" at end of function.

This has been tested on Salvator-XS.

For testing, this series is also available in the
topic/bd9571-toggle-power-switch-v4 branch of my renesas-drivers git
repository at
git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git.

Thanks for applying!

Geert Uytterhoeven (3):
  regulator: bd9571mwv: Use "backup_mode" sysfs file instead of
    "wake_up"
  regulator: bd9571mwv: Add support for toggle power switches
  regulator: bd9571mwv: Document "backup_mode" sysfs file

 .../testing/sysfs-driver-bd9571mwv-regulator  | 27 +++++++
 drivers/regulator/bd9571mwv-regulator.c       | 72 +++++++++++++++++--
 2 files changed, 94 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator

-- 
2.17.1


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

* [PATCH v4 1/3] regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up"
  2018-07-16 15:30 [PATCH v4 0/3] regulator: bd9571mwv: Add support for toggle power switches Geert Uytterhoeven
@ 2018-07-16 15:30 ` Geert Uytterhoeven
  2018-07-17 11:36   ` Niklas Söderlund
  2018-07-18 12:29   ` Applied "regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up"" to the regulator tree Mark Brown
  2018-07-16 15:30 ` [PATCH v4 2/3] regulator: bd9571mwv: Add support for toggle power switches Geert Uytterhoeven
  2018-07-16 15:30 ` [PATCH v4 3/3] regulator: bd9571mwv: Document "backup_mode" sysfs file Geert Uytterhoeven
  2 siblings, 2 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-07-16 15:30 UTC (permalink / raw)
  To: Marek Vasut, Liam Girdwood, Mark Brown
  Cc: Rafael J . Wysocki, Pavel Machek, Len Brown, linux-pm,
	linux-renesas-soc, linux-kernel, Geert Uytterhoeven

Currently the BD9571MWV PMIC driver uses the standard "wake_up" sysfs
file to control enablement of DDR Backup Mode.

However, configuring DDR Backup Mode is not really equivalent to
configuring the PMIC as a wake-up source.  To avoid confusion, use a
custom "backup_mode" attribute file in sysfs instead.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v4:
  - Fix build error and warning if !CONFIG_PM_SLEEP,

v3:
  - New.
---
 drivers/regulator/bd9571mwv-regulator.c | 52 ++++++++++++++++++++++---
 1 file changed, 47 insertions(+), 5 deletions(-)

diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c
index be574eb444ebda97..1da36a6590c84ba4 100644
--- a/drivers/regulator/bd9571mwv-regulator.c
+++ b/drivers/regulator/bd9571mwv-regulator.c
@@ -30,6 +30,7 @@ struct bd9571mwv_reg {
 	/* DDR Backup Power */
 	u8 bkup_mode_cnt_keepon;	/* from "rohm,ddr-backup-power" */
 	u8 bkup_mode_cnt_saved;
+	bool bkup_mode_enabled;
 
 	/* Power switch type */
 	bool rstbmode_level;
@@ -171,13 +172,40 @@ static int bd9571mwv_bkup_mode_write(struct bd9571mwv *bd, unsigned int mode)
 	return 0;
 }
 
+static ssize_t backup_mode_show(struct device *dev,
+				struct device_attribute *attr, char *buf)
+{
+	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
+
+	return sprintf(buf, "%s\n", bdreg->bkup_mode_enabled ? "on" : "off");
+}
+
+static ssize_t backup_mode_store(struct device *dev,
+				 struct device_attribute *attr,
+				 const char *buf, size_t count)
+{
+	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
+	int ret;
+
+	if (!count)
+		return 0;
+
+	ret = kstrtobool(buf, &bdreg->bkup_mode_enabled);
+	if (ret)
+		return ret;
+
+	return count;
+}
+
+DEVICE_ATTR_RW(backup_mode);
+
 static int bd9571mwv_suspend(struct device *dev)
 {
 	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
 	unsigned int mode;
 	int ret;
 
-	if (!device_may_wakeup(dev))
+	if (!bdreg->bkup_mode_enabled)
 		return 0;
 
 	/* Save DDR Backup Mode */
@@ -204,7 +232,7 @@ static int bd9571mwv_resume(struct device *dev)
 {
 	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
 
-	if (!device_may_wakeup(dev))
+	if (!bdreg->bkup_mode_enabled)
 		return 0;
 
 	/* Restore DDR Backup Mode */
@@ -215,9 +243,15 @@ static const struct dev_pm_ops bd9571mwv_pm  = {
 	SET_SYSTEM_SLEEP_PM_OPS(bd9571mwv_suspend, bd9571mwv_resume)
 };
 
+static int bd9571mwv_regulator_remove(struct platform_device *pdev)
+{
+	device_remove_file(&pdev->dev, &dev_attr_backup_mode);
+	return 0;
+}
 #define DEV_PM_OPS	&bd9571mwv_pm
 #else
 #define DEV_PM_OPS	NULL
+#define bd9571mwv_regulator_remove	NULL
 #endif /* CONFIG_PM_SLEEP */
 
 static int bd9571mwv_regulator_probe(struct platform_device *pdev)
@@ -270,14 +304,21 @@ static int bd9571mwv_regulator_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
+#ifdef CONFIG_PM_SLEEP
 	if (bdreg->bkup_mode_cnt_keepon) {
-		device_set_wakeup_capable(&pdev->dev, true);
+		int ret;
+
 		/*
-		 * Wakeup is enabled by default in pulse mode, but needs
+		 * Backup mode is enabled by default in pulse mode, but needs
 		 * explicit user setup in level mode.
 		 */
-		device_set_wakeup_enable(&pdev->dev, bdreg->rstbmode_pulse);
+		bdreg->bkup_mode_enabled = bdreg->rstbmode_pulse;
+
+		ret = device_create_file(&pdev->dev, &dev_attr_backup_mode);
+		if (ret)
+			return ret;
 	}
+#endif /* CONFIG_PM_SLEEP */
 
 	return 0;
 }
@@ -294,6 +335,7 @@ static struct platform_driver bd9571mwv_regulator_driver = {
 		.pm = DEV_PM_OPS,
 	},
 	.probe = bd9571mwv_regulator_probe,
+	.remove = bd9571mwv_regulator_remove,
 	.id_table = bd9571mwv_regulator_id_table,
 };
 module_platform_driver(bd9571mwv_regulator_driver);
-- 
2.17.1


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

* [PATCH v4 2/3] regulator: bd9571mwv: Add support for toggle power switches
  2018-07-16 15:30 [PATCH v4 0/3] regulator: bd9571mwv: Add support for toggle power switches Geert Uytterhoeven
  2018-07-16 15:30 ` [PATCH v4 1/3] regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up" Geert Uytterhoeven
@ 2018-07-16 15:30 ` Geert Uytterhoeven
  2018-07-17 11:49   ` Niklas Söderlund
  2018-07-18 12:29   ` Applied "regulator: bd9571mwv: Add support for toggle power switches" to the regulator tree Mark Brown
  2018-07-16 15:30 ` [PATCH v4 3/3] regulator: bd9571mwv: Document "backup_mode" sysfs file Geert Uytterhoeven
  2 siblings, 2 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-07-16 15:30 UTC (permalink / raw)
  To: Marek Vasut, Liam Girdwood, Mark Brown
  Cc: Rafael J . Wysocki, Pavel Machek, Len Brown, linux-pm,
	linux-renesas-soc, linux-kernel, Geert Uytterhoeven

Extend the existing support for backup mode to toggle power switches.
With a toggle power switch (or level signal), the following steps must
be followed exactly:
   1. Configure PMIC for backup mode, to change the role of the
      accessory power switch from a power switch to a wake-up switch,
   2. Switch accessory power switch off, to prepare for system suspend,
      which is a manual step not controlled by software,
   3. Suspend system,
   4. Switch accessory power switch on, to resume the system.

Hence the PMIC is configured for backup mode when "on" or "1" is written
to the PMIC's "backup_mode" virtual file in sysfs.  Conversely, writing
"off" or "0" reverts the role of the accessory switch to a power
switch.

Unlike with momentary switches, backup mode is not enabled by default,
as enabling it prevents the board from being powered off using the power
switch, which may confuse the user.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v4:
  - Improve patch description and comment,

v3:
  - Replace use of "wake_up" sysfs file and extra callback for wake-up
    change notification by custom "backup_mode" sysfs file,

v2:
  - Improve patch description,
  - Drop "return;" at end of function.
---
 drivers/regulator/bd9571mwv-regulator.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c
index 1da36a6590c84ba4..c44613b9423baf07 100644
--- a/drivers/regulator/bd9571mwv-regulator.c
+++ b/drivers/regulator/bd9571mwv-regulator.c
@@ -185,6 +185,7 @@ static ssize_t backup_mode_store(struct device *dev,
 				 const char *buf, size_t count)
 {
 	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
+	unsigned int mode;
 	int ret;
 
 	if (!count)
@@ -194,6 +195,25 @@ static ssize_t backup_mode_store(struct device *dev,
 	if (ret)
 		return ret;
 
+	if (!bdreg->rstbmode_level)
+		return count;
+
+	/*
+	 * Configure DDR Backup Mode, to change the role of the accessory power
+	 * switch from a power switch to a wake-up switch, or vice versa
+	 */
+	ret = bd9571mwv_bkup_mode_read(bdreg->bd, &mode);
+	if (ret)
+		return ret;
+
+	mode &= ~BD9571MWV_BKUP_MODE_CNT_KEEPON_MASK;
+	if (bdreg->bkup_mode_enabled)
+		mode |= bdreg->bkup_mode_cnt_keepon;
+
+	ret = bd9571mwv_bkup_mode_write(bdreg->bd, mode);
+	if (ret)
+		return ret;
+
 	return count;
 }
 
-- 
2.17.1


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

* [PATCH v4 3/3] regulator: bd9571mwv: Document "backup_mode" sysfs file
  2018-07-16 15:30 [PATCH v4 0/3] regulator: bd9571mwv: Add support for toggle power switches Geert Uytterhoeven
  2018-07-16 15:30 ` [PATCH v4 1/3] regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up" Geert Uytterhoeven
  2018-07-16 15:30 ` [PATCH v4 2/3] regulator: bd9571mwv: Add support for toggle power switches Geert Uytterhoeven
@ 2018-07-16 15:30 ` Geert Uytterhoeven
  2018-07-17 11:53   ` Niklas Söderlund
  2018-07-18 12:29   ` Applied "regulator: bd9571mwv: Document "backup_mode" sysfs file" to the regulator tree Mark Brown
  2 siblings, 2 replies; 10+ messages in thread
From: Geert Uytterhoeven @ 2018-07-16 15:30 UTC (permalink / raw)
  To: Marek Vasut, Liam Girdwood, Mark Brown
  Cc: Rafael J . Wysocki, Pavel Machek, Len Brown, linux-pm,
	linux-renesas-soc, linux-kernel, Geert Uytterhoeven

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Pavel Machek <pavel@ucw.cz>
---
v4:
  - Add Acked-by,

v3:
  - New.
---
 .../testing/sysfs-driver-bd9571mwv-regulator  | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator

diff --git a/Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator b/Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator
new file mode 100644
index 0000000000000000..4d63a7904b94a993
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator
@@ -0,0 +1,27 @@
+What:		/sys/bus/i2c/devices/.../bd9571mwv-regulator.*.auto/backup_mode
+Date:		Jul 2018
+KernelVersion:	4.19
+Contact:	Geert Uytterhoeven <geert+renesas@glider.be>
+Description:	Read/write the current state of DDR Backup Mode, which controls
+		if DDR power rails will be kept powered during system suspend.
+		("on"/"1" = enabled, "off"/"0" = disabled).
+		Two types of power switches (or control signals) can be used:
+		  A. With a momentary power switch (or pulse signal), DDR
+		     Backup Mode is enabled by default when available, as the
+		     PMIC will be configured only during system suspend.
+		  B. With a toggle power switch (or level signal), the
+		     following steps must be followed exactly:
+		       1. Configure PMIC for backup mode, to change the role of
+			  the accessory power switch from a power switch to a
+			  wake-up switch,
+		       2. Switch accessory power switch off, to prepare for
+			  system suspend, which is a manual step not controlled
+			  by software,
+		       3. Suspend system,
+		       4. Switch accessory power switch on, to resume the
+			  system.
+		     DDR Backup Mode must be explicitly enabled by the user,
+		     to invoke step 1.
+		See also Documentation/devicetree/bindings/mfd/bd9571mwv.txt.
+Users:		User space applications for embedded boards equipped with a
+		BD9571MWV PMIC.
-- 
2.17.1


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

* Re: [PATCH v4 1/3] regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up"
  2018-07-16 15:30 ` [PATCH v4 1/3] regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up" Geert Uytterhoeven
@ 2018-07-17 11:36   ` Niklas Söderlund
  2018-07-18 12:29   ` Applied "regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up"" to the regulator tree Mark Brown
  1 sibling, 0 replies; 10+ messages in thread
From: Niklas Söderlund @ 2018-07-17 11:36 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Marek Vasut, Liam Girdwood, Mark Brown, Rafael J . Wysocki,
	Pavel Machek, Len Brown, linux-pm, linux-renesas-soc,
	linux-kernel

Hi Geert,

Thanks for your patch.

On 2018-07-16 17:30:50 +0200, Geert Uytterhoeven wrote:
> Currently the BD9571MWV PMIC driver uses the standard "wake_up" sysfs
> file to control enablement of DDR Backup Mode.
> 
> However, configuring DDR Backup Mode is not really equivalent to
> configuring the PMIC as a wake-up source.  To avoid confusion, use a
> custom "backup_mode" attribute file in sysfs instead.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
> v4:
>   - Fix build error and warning if !CONFIG_PM_SLEEP,
> 
> v3:
>   - New.
> ---
>  drivers/regulator/bd9571mwv-regulator.c | 52 ++++++++++++++++++++++---
>  1 file changed, 47 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c
> index be574eb444ebda97..1da36a6590c84ba4 100644
> --- a/drivers/regulator/bd9571mwv-regulator.c
> +++ b/drivers/regulator/bd9571mwv-regulator.c
> @@ -30,6 +30,7 @@ struct bd9571mwv_reg {
>  	/* DDR Backup Power */
>  	u8 bkup_mode_cnt_keepon;	/* from "rohm,ddr-backup-power" */
>  	u8 bkup_mode_cnt_saved;
> +	bool bkup_mode_enabled;
>  
>  	/* Power switch type */
>  	bool rstbmode_level;
> @@ -171,13 +172,40 @@ static int bd9571mwv_bkup_mode_write(struct bd9571mwv *bd, unsigned int mode)
>  	return 0;
>  }
>  
> +static ssize_t backup_mode_show(struct device *dev,
> +				struct device_attribute *attr, char *buf)
> +{
> +	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
> +
> +	return sprintf(buf, "%s\n", bdreg->bkup_mode_enabled ? "on" : "off");
> +}
> +
> +static ssize_t backup_mode_store(struct device *dev,
> +				 struct device_attribute *attr,
> +				 const char *buf, size_t count)
> +{
> +	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
> +	int ret;
> +
> +	if (!count)
> +		return 0;
> +
> +	ret = kstrtobool(buf, &bdreg->bkup_mode_enabled);
> +	if (ret)
> +		return ret;
> +
> +	return count;
> +}
> +
> +DEVICE_ATTR_RW(backup_mode);
> +
>  static int bd9571mwv_suspend(struct device *dev)
>  {
>  	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
>  	unsigned int mode;
>  	int ret;
>  
> -	if (!device_may_wakeup(dev))
> +	if (!bdreg->bkup_mode_enabled)
>  		return 0;
>  
>  	/* Save DDR Backup Mode */
> @@ -204,7 +232,7 @@ static int bd9571mwv_resume(struct device *dev)
>  {
>  	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
>  
> -	if (!device_may_wakeup(dev))
> +	if (!bdreg->bkup_mode_enabled)
>  		return 0;
>  
>  	/* Restore DDR Backup Mode */
> @@ -215,9 +243,15 @@ static const struct dev_pm_ops bd9571mwv_pm  = {
>  	SET_SYSTEM_SLEEP_PM_OPS(bd9571mwv_suspend, bd9571mwv_resume)
>  };
>  
> +static int bd9571mwv_regulator_remove(struct platform_device *pdev)
> +{
> +	device_remove_file(&pdev->dev, &dev_attr_backup_mode);
> +	return 0;
> +}
>  #define DEV_PM_OPS	&bd9571mwv_pm
>  #else
>  #define DEV_PM_OPS	NULL
> +#define bd9571mwv_regulator_remove	NULL
>  #endif /* CONFIG_PM_SLEEP */
>  
>  static int bd9571mwv_regulator_probe(struct platform_device *pdev)
> @@ -270,14 +304,21 @@ static int bd9571mwv_regulator_probe(struct platform_device *pdev)
>  		return -EINVAL;
>  	}
>  
> +#ifdef CONFIG_PM_SLEEP
>  	if (bdreg->bkup_mode_cnt_keepon) {
> -		device_set_wakeup_capable(&pdev->dev, true);
> +		int ret;
> +
>  		/*
> -		 * Wakeup is enabled by default in pulse mode, but needs
> +		 * Backup mode is enabled by default in pulse mode, but needs
>  		 * explicit user setup in level mode.
>  		 */
> -		device_set_wakeup_enable(&pdev->dev, bdreg->rstbmode_pulse);
> +		bdreg->bkup_mode_enabled = bdreg->rstbmode_pulse;
> +
> +		ret = device_create_file(&pdev->dev, &dev_attr_backup_mode);
> +		if (ret)
> +			return ret;
>  	}
> +#endif /* CONFIG_PM_SLEEP */
>  
>  	return 0;
>  }
> @@ -294,6 +335,7 @@ static struct platform_driver bd9571mwv_regulator_driver = {
>  		.pm = DEV_PM_OPS,
>  	},
>  	.probe = bd9571mwv_regulator_probe,
> +	.remove = bd9571mwv_regulator_remove,
>  	.id_table = bd9571mwv_regulator_id_table,
>  };
>  module_platform_driver(bd9571mwv_regulator_driver);
> -- 
> 2.17.1
> 

-- 
Regards,
Niklas Söderlund

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

* Re: [PATCH v4 2/3] regulator: bd9571mwv: Add support for toggle power switches
  2018-07-16 15:30 ` [PATCH v4 2/3] regulator: bd9571mwv: Add support for toggle power switches Geert Uytterhoeven
@ 2018-07-17 11:49   ` Niklas Söderlund
  2018-07-18 12:29   ` Applied "regulator: bd9571mwv: Add support for toggle power switches" to the regulator tree Mark Brown
  1 sibling, 0 replies; 10+ messages in thread
From: Niklas Söderlund @ 2018-07-17 11:49 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Marek Vasut, Liam Girdwood, Mark Brown, Rafael J . Wysocki,
	Pavel Machek, Len Brown, linux-pm, linux-renesas-soc,
	linux-kernel

Hi Geert,

Thanks for your work.

On 2018-07-16 17:30:51 +0200, Geert Uytterhoeven wrote:
> Extend the existing support for backup mode to toggle power switches.
> With a toggle power switch (or level signal), the following steps must
> be followed exactly:
>    1. Configure PMIC for backup mode, to change the role of the
>       accessory power switch from a power switch to a wake-up switch,
>    2. Switch accessory power switch off, to prepare for system suspend,
>       which is a manual step not controlled by software,
>    3. Suspend system,
>    4. Switch accessory power switch on, to resume the system.
> 
> Hence the PMIC is configured for backup mode when "on" or "1" is written
> to the PMIC's "backup_mode" virtual file in sysfs.  Conversely, writing
> "off" or "0" reverts the role of the accessory switch to a power
> switch.
> 
> Unlike with momentary switches, backup mode is not enabled by default,
> as enabling it prevents the board from being powered off using the power
> switch, which may confuse the user.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
> v4:
>   - Improve patch description and comment,
> 
> v3:
>   - Replace use of "wake_up" sysfs file and extra callback for wake-up
>     change notification by custom "backup_mode" sysfs file,
> 
> v2:
>   - Improve patch description,
>   - Drop "return;" at end of function.
> ---
>  drivers/regulator/bd9571mwv-regulator.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c
> index 1da36a6590c84ba4..c44613b9423baf07 100644
> --- a/drivers/regulator/bd9571mwv-regulator.c
> +++ b/drivers/regulator/bd9571mwv-regulator.c
> @@ -185,6 +185,7 @@ static ssize_t backup_mode_store(struct device *dev,
>  				 const char *buf, size_t count)
>  {
>  	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
> +	unsigned int mode;
>  	int ret;
>  
>  	if (!count)
> @@ -194,6 +195,25 @@ static ssize_t backup_mode_store(struct device *dev,
>  	if (ret)
>  		return ret;
>  
> +	if (!bdreg->rstbmode_level)
> +		return count;
> +
> +	/*
> +	 * Configure DDR Backup Mode, to change the role of the accessory power
> +	 * switch from a power switch to a wake-up switch, or vice versa
> +	 */
> +	ret = bd9571mwv_bkup_mode_read(bdreg->bd, &mode);
> +	if (ret)
> +		return ret;
> +
> +	mode &= ~BD9571MWV_BKUP_MODE_CNT_KEEPON_MASK;
> +	if (bdreg->bkup_mode_enabled)
> +		mode |= bdreg->bkup_mode_cnt_keepon;
> +
> +	ret = bd9571mwv_bkup_mode_write(bdreg->bd, mode);
> +	if (ret)
> +		return ret;
> +
>  	return count;
>  }
>  
> -- 
> 2.17.1
> 

-- 
Regards,
Niklas Söderlund

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

* Re: [PATCH v4 3/3] regulator: bd9571mwv: Document "backup_mode" sysfs file
  2018-07-16 15:30 ` [PATCH v4 3/3] regulator: bd9571mwv: Document "backup_mode" sysfs file Geert Uytterhoeven
@ 2018-07-17 11:53   ` Niklas Söderlund
  2018-07-18 12:29   ` Applied "regulator: bd9571mwv: Document "backup_mode" sysfs file" to the regulator tree Mark Brown
  1 sibling, 0 replies; 10+ messages in thread
From: Niklas Söderlund @ 2018-07-17 11:53 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Marek Vasut, Liam Girdwood, Mark Brown, Rafael J . Wysocki,
	Pavel Machek, Len Brown, linux-pm, linux-renesas-soc,
	linux-kernel

Hi Geert,

Thanks for your work.

On 2018-07-16 17:30:52 +0200, Geert Uytterhoeven wrote:
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Acked-by: Pavel Machek <pavel@ucw.cz>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
> v4:
>   - Add Acked-by,
> 
> v3:
>   - New.
> ---
>  .../testing/sysfs-driver-bd9571mwv-regulator  | 27 +++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator
> 
> diff --git a/Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator b/Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator
> new file mode 100644
> index 0000000000000000..4d63a7904b94a993
> --- /dev/null
> +++ b/Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator
> @@ -0,0 +1,27 @@
> +What:		/sys/bus/i2c/devices/.../bd9571mwv-regulator.*.auto/backup_mode
> +Date:		Jul 2018
> +KernelVersion:	4.19
> +Contact:	Geert Uytterhoeven <geert+renesas@glider.be>
> +Description:	Read/write the current state of DDR Backup Mode, which controls
> +		if DDR power rails will be kept powered during system suspend.
> +		("on"/"1" = enabled, "off"/"0" = disabled).
> +		Two types of power switches (or control signals) can be used:
> +		  A. With a momentary power switch (or pulse signal), DDR
> +		     Backup Mode is enabled by default when available, as the
> +		     PMIC will be configured only during system suspend.
> +		  B. With a toggle power switch (or level signal), the
> +		     following steps must be followed exactly:
> +		       1. Configure PMIC for backup mode, to change the role of
> +			  the accessory power switch from a power switch to a
> +			  wake-up switch,
> +		       2. Switch accessory power switch off, to prepare for
> +			  system suspend, which is a manual step not controlled
> +			  by software,
> +		       3. Suspend system,
> +		       4. Switch accessory power switch on, to resume the
> +			  system.
> +		     DDR Backup Mode must be explicitly enabled by the user,
> +		     to invoke step 1.
> +		See also Documentation/devicetree/bindings/mfd/bd9571mwv.txt.
> +Users:		User space applications for embedded boards equipped with a
> +		BD9571MWV PMIC.
> -- 
> 2.17.1
> 

-- 
Regards,
Niklas Söderlund

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

* Applied "regulator: bd9571mwv: Document "backup_mode" sysfs file" to the regulator tree
  2018-07-16 15:30 ` [PATCH v4 3/3] regulator: bd9571mwv: Document "backup_mode" sysfs file Geert Uytterhoeven
  2018-07-17 11:53   ` Niklas Söderlund
@ 2018-07-18 12:29   ` Mark Brown
  1 sibling, 0 replies; 10+ messages in thread
From: Mark Brown @ 2018-07-18 12:29 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Pavel Machek, Mark Brown, Marek Vasut, Liam Girdwood, Mark Brown,
	Rafael J . Wysocki, Pavel Machek, Len Brown, linux-pm,
	linux-renesas-soc, linux-kernel, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3331 bytes --]

The patch

   regulator: bd9571mwv: Document "backup_mode" sysfs file

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From cf18fd01466d59263c615165341684a055206dd5 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Mon, 16 Jul 2018 17:30:52 +0200
Subject: [PATCH] regulator: bd9571mwv: Document "backup_mode" sysfs file
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 .../testing/sysfs-driver-bd9571mwv-regulator  | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator

diff --git a/Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator b/Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator
new file mode 100644
index 000000000000..4d63a7904b94
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-driver-bd9571mwv-regulator
@@ -0,0 +1,27 @@
+What:		/sys/bus/i2c/devices/.../bd9571mwv-regulator.*.auto/backup_mode
+Date:		Jul 2018
+KernelVersion:	4.19
+Contact:	Geert Uytterhoeven <geert+renesas@glider.be>
+Description:	Read/write the current state of DDR Backup Mode, which controls
+		if DDR power rails will be kept powered during system suspend.
+		("on"/"1" = enabled, "off"/"0" = disabled).
+		Two types of power switches (or control signals) can be used:
+		  A. With a momentary power switch (or pulse signal), DDR
+		     Backup Mode is enabled by default when available, as the
+		     PMIC will be configured only during system suspend.
+		  B. With a toggle power switch (or level signal), the
+		     following steps must be followed exactly:
+		       1. Configure PMIC for backup mode, to change the role of
+			  the accessory power switch from a power switch to a
+			  wake-up switch,
+		       2. Switch accessory power switch off, to prepare for
+			  system suspend, which is a manual step not controlled
+			  by software,
+		       3. Suspend system,
+		       4. Switch accessory power switch on, to resume the
+			  system.
+		     DDR Backup Mode must be explicitly enabled by the user,
+		     to invoke step 1.
+		See also Documentation/devicetree/bindings/mfd/bd9571mwv.txt.
+Users:		User space applications for embedded boards equipped with a
+		BD9571MWV PMIC.
-- 
2.18.0


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

* Applied "regulator: bd9571mwv: Add support for toggle power switches" to the regulator tree
  2018-07-16 15:30 ` [PATCH v4 2/3] regulator: bd9571mwv: Add support for toggle power switches Geert Uytterhoeven
  2018-07-17 11:49   ` Niklas Söderlund
@ 2018-07-18 12:29   ` Mark Brown
  1 sibling, 0 replies; 10+ messages in thread
From: Mark Brown @ 2018-07-18 12:29 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mark Brown, Marek Vasut, Liam Girdwood, Mark Brown,
	Rafael J . Wysocki, Pavel Machek, Len Brown, linux-pm,
	linux-renesas-soc, linux-kernel, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3541 bytes --]

The patch

   regulator: bd9571mwv: Add support for toggle power switches

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From e436875f6f97708613976da75a92974f18998af9 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Mon, 16 Jul 2018 17:30:51 +0200
Subject: [PATCH] regulator: bd9571mwv: Add support for toggle power switches
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Extend the existing support for backup mode to toggle power switches.
With a toggle power switch (or level signal), the following steps must
be followed exactly:
   1. Configure PMIC for backup mode, to change the role of the
      accessory power switch from a power switch to a wake-up switch,
   2. Switch accessory power switch off, to prepare for system suspend,
      which is a manual step not controlled by software,
   3. Suspend system,
   4. Switch accessory power switch on, to resume the system.

Hence the PMIC is configured for backup mode when "on" or "1" is written
to the PMIC's "backup_mode" virtual file in sysfs.  Conversely, writing
"off" or "0" reverts the role of the accessory switch to a power
switch.

Unlike with momentary switches, backup mode is not enabled by default,
as enabling it prevents the board from being powered off using the power
switch, which may confuse the user.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/bd9571mwv-regulator.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c
index 1da36a6590c8..c44613b9423b 100644
--- a/drivers/regulator/bd9571mwv-regulator.c
+++ b/drivers/regulator/bd9571mwv-regulator.c
@@ -185,6 +185,7 @@ static ssize_t backup_mode_store(struct device *dev,
 				 const char *buf, size_t count)
 {
 	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
+	unsigned int mode;
 	int ret;
 
 	if (!count)
@@ -194,6 +195,25 @@ static ssize_t backup_mode_store(struct device *dev,
 	if (ret)
 		return ret;
 
+	if (!bdreg->rstbmode_level)
+		return count;
+
+	/*
+	 * Configure DDR Backup Mode, to change the role of the accessory power
+	 * switch from a power switch to a wake-up switch, or vice versa
+	 */
+	ret = bd9571mwv_bkup_mode_read(bdreg->bd, &mode);
+	if (ret)
+		return ret;
+
+	mode &= ~BD9571MWV_BKUP_MODE_CNT_KEEPON_MASK;
+	if (bdreg->bkup_mode_enabled)
+		mode |= bdreg->bkup_mode_cnt_keepon;
+
+	ret = bd9571mwv_bkup_mode_write(bdreg->bd, mode);
+	if (ret)
+		return ret;
+
 	return count;
 }
 
-- 
2.18.0


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

* Applied "regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up"" to the regulator tree
  2018-07-16 15:30 ` [PATCH v4 1/3] regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up" Geert Uytterhoeven
  2018-07-17 11:36   ` Niklas Söderlund
@ 2018-07-18 12:29   ` Mark Brown
  1 sibling, 0 replies; 10+ messages in thread
From: Mark Brown @ 2018-07-18 12:29 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mark Brown, Marek Vasut, Liam Girdwood, Mark Brown,
	Rafael J . Wysocki, Pavel Machek, Len Brown, linux-pm,
	linux-renesas-soc, linux-kernel, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5048 bytes --]

The patch

   regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up"

has been applied to the regulator tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 02b3a073c12edc8cbc18e07e8880a32e78c1aee0 Mon Sep 17 00:00:00 2001
From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: Mon, 16 Jul 2018 17:30:50 +0200
Subject: [PATCH] regulator: bd9571mwv: Use "backup_mode" sysfs file instead of
 "wake_up"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Currently the BD9571MWV PMIC driver uses the standard "wake_up" sysfs
file to control enablement of DDR Backup Mode.

However, configuring DDR Backup Mode is not really equivalent to
configuring the PMIC as a wake-up source.  To avoid confusion, use a
custom "backup_mode" attribute file in sysfs instead.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/bd9571mwv-regulator.c | 52 ++++++++++++++++++++++---
 1 file changed, 47 insertions(+), 5 deletions(-)

diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c
index be574eb444eb..1da36a6590c8 100644
--- a/drivers/regulator/bd9571mwv-regulator.c
+++ b/drivers/regulator/bd9571mwv-regulator.c
@@ -30,6 +30,7 @@ struct bd9571mwv_reg {
 	/* DDR Backup Power */
 	u8 bkup_mode_cnt_keepon;	/* from "rohm,ddr-backup-power" */
 	u8 bkup_mode_cnt_saved;
+	bool bkup_mode_enabled;
 
 	/* Power switch type */
 	bool rstbmode_level;
@@ -171,13 +172,40 @@ static int bd9571mwv_bkup_mode_write(struct bd9571mwv *bd, unsigned int mode)
 	return 0;
 }
 
+static ssize_t backup_mode_show(struct device *dev,
+				struct device_attribute *attr, char *buf)
+{
+	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
+
+	return sprintf(buf, "%s\n", bdreg->bkup_mode_enabled ? "on" : "off");
+}
+
+static ssize_t backup_mode_store(struct device *dev,
+				 struct device_attribute *attr,
+				 const char *buf, size_t count)
+{
+	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
+	int ret;
+
+	if (!count)
+		return 0;
+
+	ret = kstrtobool(buf, &bdreg->bkup_mode_enabled);
+	if (ret)
+		return ret;
+
+	return count;
+}
+
+DEVICE_ATTR_RW(backup_mode);
+
 static int bd9571mwv_suspend(struct device *dev)
 {
 	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
 	unsigned int mode;
 	int ret;
 
-	if (!device_may_wakeup(dev))
+	if (!bdreg->bkup_mode_enabled)
 		return 0;
 
 	/* Save DDR Backup Mode */
@@ -204,7 +232,7 @@ static int bd9571mwv_resume(struct device *dev)
 {
 	struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
 
-	if (!device_may_wakeup(dev))
+	if (!bdreg->bkup_mode_enabled)
 		return 0;
 
 	/* Restore DDR Backup Mode */
@@ -215,9 +243,15 @@ static const struct dev_pm_ops bd9571mwv_pm  = {
 	SET_SYSTEM_SLEEP_PM_OPS(bd9571mwv_suspend, bd9571mwv_resume)
 };
 
+static int bd9571mwv_regulator_remove(struct platform_device *pdev)
+{
+	device_remove_file(&pdev->dev, &dev_attr_backup_mode);
+	return 0;
+}
 #define DEV_PM_OPS	&bd9571mwv_pm
 #else
 #define DEV_PM_OPS	NULL
+#define bd9571mwv_regulator_remove	NULL
 #endif /* CONFIG_PM_SLEEP */
 
 static int bd9571mwv_regulator_probe(struct platform_device *pdev)
@@ -270,14 +304,21 @@ static int bd9571mwv_regulator_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
+#ifdef CONFIG_PM_SLEEP
 	if (bdreg->bkup_mode_cnt_keepon) {
-		device_set_wakeup_capable(&pdev->dev, true);
+		int ret;
+
 		/*
-		 * Wakeup is enabled by default in pulse mode, but needs
+		 * Backup mode is enabled by default in pulse mode, but needs
 		 * explicit user setup in level mode.
 		 */
-		device_set_wakeup_enable(&pdev->dev, bdreg->rstbmode_pulse);
+		bdreg->bkup_mode_enabled = bdreg->rstbmode_pulse;
+
+		ret = device_create_file(&pdev->dev, &dev_attr_backup_mode);
+		if (ret)
+			return ret;
 	}
+#endif /* CONFIG_PM_SLEEP */
 
 	return 0;
 }
@@ -294,6 +335,7 @@ static struct platform_driver bd9571mwv_regulator_driver = {
 		.pm = DEV_PM_OPS,
 	},
 	.probe = bd9571mwv_regulator_probe,
+	.remove = bd9571mwv_regulator_remove,
 	.id_table = bd9571mwv_regulator_id_table,
 };
 module_platform_driver(bd9571mwv_regulator_driver);
-- 
2.18.0


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

end of thread, other threads:[~2018-07-18 12:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-16 15:30 [PATCH v4 0/3] regulator: bd9571mwv: Add support for toggle power switches Geert Uytterhoeven
2018-07-16 15:30 ` [PATCH v4 1/3] regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up" Geert Uytterhoeven
2018-07-17 11:36   ` Niklas Söderlund
2018-07-18 12:29   ` Applied "regulator: bd9571mwv: Use "backup_mode" sysfs file instead of "wake_up"" to the regulator tree Mark Brown
2018-07-16 15:30 ` [PATCH v4 2/3] regulator: bd9571mwv: Add support for toggle power switches Geert Uytterhoeven
2018-07-17 11:49   ` Niklas Söderlund
2018-07-18 12:29   ` Applied "regulator: bd9571mwv: Add support for toggle power switches" to the regulator tree Mark Brown
2018-07-16 15:30 ` [PATCH v4 3/3] regulator: bd9571mwv: Document "backup_mode" sysfs file Geert Uytterhoeven
2018-07-17 11:53   ` Niklas Söderlund
2018-07-18 12:29   ` Applied "regulator: bd9571mwv: Document "backup_mode" sysfs file" to the regulator tree Mark Brown

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).