All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add helper for registering a fixed regulator
@ 2012-03-03 11:40 ` Sascha Hauer
  0 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 11:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, linux-arm-kernel, Estevam Fabio-R49496


Hi,

The following adds a helper for registering a fixed dummy regulator
making it simple for boards which have no software controllable regulator
for certain devices to register a fixed regulator as a dummy.

The last two patches make smsc911x ethernet functional again which
broke when the smsc911x driver gained regulator support.

Sascha

----------------------------------------------------------------
Sascha Hauer (4):
      regulator fixed: Do not report enumaratable voltages if there are none
      regulator: provide a helper for registering a fixed regulator
      ARM i.MX pcm037: register a dummy regulator for the smsc911x device
      ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device

 arch/arm/mach-imx/mach-pcm037.c    |    9 ++++++
 arch/arm/plat-mxc/3ds_debugboard.c |    9 ++++++
 drivers/regulator/Makefile         |    2 +-
 drivers/regulator/fixed-helper.c   |   53 ++++++++++++++++++++++++++++++++++++
 drivers/regulator/fixed.c          |    4 ++-
 include/linux/regulator/fixed.h    |   13 +++++++++
 6 files changed, 88 insertions(+), 2 deletions(-)
 create mode 100644 drivers/regulator/fixed-helper.c

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

* [PATCH] Add helper for registering a fixed regulator
@ 2012-03-03 11:40 ` Sascha Hauer
  0 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 11:40 UTC (permalink / raw)
  To: linux-arm-kernel


Hi,

The following adds a helper for registering a fixed dummy regulator
making it simple for boards which have no software controllable regulator
for certain devices to register a fixed regulator as a dummy.

The last two patches make smsc911x ethernet functional again which
broke when the smsc911x driver gained regulator support.

Sascha

----------------------------------------------------------------
Sascha Hauer (4):
      regulator fixed: Do not report enumaratable voltages if there are none
      regulator: provide a helper for registering a fixed regulator
      ARM i.MX pcm037: register a dummy regulator for the smsc911x device
      ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device

 arch/arm/mach-imx/mach-pcm037.c    |    9 ++++++
 arch/arm/plat-mxc/3ds_debugboard.c |    9 ++++++
 drivers/regulator/Makefile         |    2 +-
 drivers/regulator/fixed-helper.c   |   53 ++++++++++++++++++++++++++++++++++++
 drivers/regulator/fixed.c          |    4 ++-
 include/linux/regulator/fixed.h    |   13 +++++++++
 6 files changed, 88 insertions(+), 2 deletions(-)
 create mode 100644 drivers/regulator/fixed-helper.c

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

* [PATCH 1/4] regulator fixed: Do not report enumaratable voltages if there are none
  2012-03-03 11:40 ` Sascha Hauer
@ 2012-03-03 11:40   ` Sascha Hauer
  -1 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 11:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, linux-arm-kernel,
	Estevam Fabio-R49496, Sascha Hauer

If used as a dummy voltage provider the fixed regulator should
not set n_voltages to make the core accept the device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/regulator/fixed.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index e24e3a1..40f3803 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -192,7 +192,9 @@ static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev)
 	drvdata->desc.type = REGULATOR_VOLTAGE;
 	drvdata->desc.owner = THIS_MODULE;
 	drvdata->desc.ops = &fixed_voltage_ops;
-	drvdata->desc.n_voltages = 1;
+
+	if (config->microvolts)
+		drvdata->desc.n_voltages = 1;
 
 	drvdata->microvolts = config->microvolts;
 	drvdata->gpio = config->gpio;
-- 
1.7.9.1


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

* [PATCH 1/4] regulator fixed: Do not report enumaratable voltages if there are none
@ 2012-03-03 11:40   ` Sascha Hauer
  0 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 11:40 UTC (permalink / raw)
  To: linux-arm-kernel

If used as a dummy voltage provider the fixed regulator should
not set n_voltages to make the core accept the device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/regulator/fixed.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index e24e3a1..40f3803 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -192,7 +192,9 @@ static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev)
 	drvdata->desc.type = REGULATOR_VOLTAGE;
 	drvdata->desc.owner = THIS_MODULE;
 	drvdata->desc.ops = &fixed_voltage_ops;
-	drvdata->desc.n_voltages = 1;
+
+	if (config->microvolts)
+		drvdata->desc.n_voltages = 1;
 
 	drvdata->microvolts = config->microvolts;
 	drvdata->gpio = config->gpio;
-- 
1.7.9.1

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

* [PATCH 2/4] regulator: provide a helper for registering a fixed regulator
  2012-03-03 11:40 ` Sascha Hauer
@ 2012-03-03 11:40   ` Sascha Hauer
  -1 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 11:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, linux-arm-kernel,
	Estevam Fabio-R49496, Sascha Hauer

Some devices require a regulator to work, but boards may not have
a software controllable regulator for this device. Provide a helper
function to make it simpler for these boards to register a fixed
regulator as a dummy regulator.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/regulator/Makefile       |    2 +-
 drivers/regulator/fixed-helper.c |   53 ++++++++++++++++++++++++++++++++++++++
 include/linux/regulator/fixed.h  |   13 +++++++++
 3 files changed, 67 insertions(+), 1 deletions(-)
 create mode 100644 drivers/regulator/fixed-helper.c

diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 503bac8..f76deb9 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -3,7 +3,7 @@
 #
 
 
-obj-$(CONFIG_REGULATOR) += core.o dummy.o
+obj-$(CONFIG_REGULATOR) += core.o dummy.o fixed-helper.o
 obj-$(CONFIG_OF) += of_regulator.o
 obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o
 obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o
diff --git a/drivers/regulator/fixed-helper.c b/drivers/regulator/fixed-helper.c
new file mode 100644
index 0000000..30d0a15
--- /dev/null
+++ b/drivers/regulator/fixed-helper.c
@@ -0,0 +1,53 @@
+#include <linux/slab.h>
+#include <linux/platform_device.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+
+struct fixed_regulator_data {
+	struct fixed_voltage_config cfg;
+	struct regulator_init_data init_data;
+	struct platform_device pdev;
+};
+
+static void regulator_fixed_release(struct device *dev)
+{
+	struct fixed_regulator_data *data = container_of(dev,
+			struct fixed_regulator_data, pdev.dev);
+	kfree(data);
+}
+
+/**
+ * regulator_register_fixed - register a no-op fixed regulator
+ * @name: supply name
+ * @id: platform device id
+ * @supplies: consumers for this regulator
+ * @num_supplies: number of consumers
+ */
+struct platform_device *regulator_register_fixed(int id,
+		struct regulator_consumer_supply *supplies, int num_supplies)
+{
+	struct fixed_regulator_data *data;
+
+	data = kzalloc(sizeof(*data), GFP_KERNEL);
+	if (!data)
+		return NULL;
+
+	data->cfg.supply_name = "dummy";
+	data->cfg.microvolts = 0;
+	data->cfg.gpio = -EINVAL;
+	data->cfg.enabled_at_boot = 1;
+	data->cfg.init_data = &data->init_data;
+
+	data->init_data.constraints.always_on = 1;
+	data->init_data.consumer_supplies = supplies;
+	data->init_data.num_consumer_supplies = num_supplies;
+
+	data->pdev.name = "reg-fixed-voltage";
+	data->pdev.id = id;
+	data->pdev.dev.platform_data = &data->cfg;
+	data->pdev.dev.release = regulator_fixed_release;
+
+	platform_device_register(&data->pdev);
+
+	return &data->pdev;
+}
diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h
index ffd7d50..936a7d8 100644
--- a/include/linux/regulator/fixed.h
+++ b/include/linux/regulator/fixed.h
@@ -48,4 +48,17 @@ struct fixed_voltage_config {
 	struct regulator_init_data *init_data;
 };
 
+struct regulator_consumer_supply;
+
+#if IS_ENABLED(CONFIG_REGULATOR)
+struct platform_device *regulator_register_fixed(int id,
+		struct regulator_consumer_supply *supplies, int num_supplies);
+#else
+static inline struct platform_device *regulator_register_fixed(int id,
+		struct regulator_consumer_supply *supplies, int num_supplies)
+{
+	return NULL;
+}
+#endif
+
 #endif
-- 
1.7.9.1


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

* [PATCH 2/4] regulator: provide a helper for registering a fixed regulator
@ 2012-03-03 11:40   ` Sascha Hauer
  0 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 11:40 UTC (permalink / raw)
  To: linux-arm-kernel

Some devices require a regulator to work, but boards may not have
a software controllable regulator for this device. Provide a helper
function to make it simpler for these boards to register a fixed
regulator as a dummy regulator.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/regulator/Makefile       |    2 +-
 drivers/regulator/fixed-helper.c |   53 ++++++++++++++++++++++++++++++++++++++
 include/linux/regulator/fixed.h  |   13 +++++++++
 3 files changed, 67 insertions(+), 1 deletions(-)
 create mode 100644 drivers/regulator/fixed-helper.c

diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile
index 503bac8..f76deb9 100644
--- a/drivers/regulator/Makefile
+++ b/drivers/regulator/Makefile
@@ -3,7 +3,7 @@
 #
 
 
-obj-$(CONFIG_REGULATOR) += core.o dummy.o
+obj-$(CONFIG_REGULATOR) += core.o dummy.o fixed-helper.o
 obj-$(CONFIG_OF) += of_regulator.o
 obj-$(CONFIG_REGULATOR_FIXED_VOLTAGE) += fixed.o
 obj-$(CONFIG_REGULATOR_VIRTUAL_CONSUMER) += virtual.o
diff --git a/drivers/regulator/fixed-helper.c b/drivers/regulator/fixed-helper.c
new file mode 100644
index 0000000..30d0a15
--- /dev/null
+++ b/drivers/regulator/fixed-helper.c
@@ -0,0 +1,53 @@
+#include <linux/slab.h>
+#include <linux/platform_device.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+
+struct fixed_regulator_data {
+	struct fixed_voltage_config cfg;
+	struct regulator_init_data init_data;
+	struct platform_device pdev;
+};
+
+static void regulator_fixed_release(struct device *dev)
+{
+	struct fixed_regulator_data *data = container_of(dev,
+			struct fixed_regulator_data, pdev.dev);
+	kfree(data);
+}
+
+/**
+ * regulator_register_fixed - register a no-op fixed regulator
+ * @name: supply name
+ * @id: platform device id
+ * @supplies: consumers for this regulator
+ * @num_supplies: number of consumers
+ */
+struct platform_device *regulator_register_fixed(int id,
+		struct regulator_consumer_supply *supplies, int num_supplies)
+{
+	struct fixed_regulator_data *data;
+
+	data = kzalloc(sizeof(*data), GFP_KERNEL);
+	if (!data)
+		return NULL;
+
+	data->cfg.supply_name = "dummy";
+	data->cfg.microvolts = 0;
+	data->cfg.gpio = -EINVAL;
+	data->cfg.enabled_at_boot = 1;
+	data->cfg.init_data = &data->init_data;
+
+	data->init_data.constraints.always_on = 1;
+	data->init_data.consumer_supplies = supplies;
+	data->init_data.num_consumer_supplies = num_supplies;
+
+	data->pdev.name = "reg-fixed-voltage";
+	data->pdev.id = id;
+	data->pdev.dev.platform_data = &data->cfg;
+	data->pdev.dev.release = regulator_fixed_release;
+
+	platform_device_register(&data->pdev);
+
+	return &data->pdev;
+}
diff --git a/include/linux/regulator/fixed.h b/include/linux/regulator/fixed.h
index ffd7d50..936a7d8 100644
--- a/include/linux/regulator/fixed.h
+++ b/include/linux/regulator/fixed.h
@@ -48,4 +48,17 @@ struct fixed_voltage_config {
 	struct regulator_init_data *init_data;
 };
 
+struct regulator_consumer_supply;
+
+#if IS_ENABLED(CONFIG_REGULATOR)
+struct platform_device *regulator_register_fixed(int id,
+		struct regulator_consumer_supply *supplies, int num_supplies);
+#else
+static inline struct platform_device *regulator_register_fixed(int id,
+		struct regulator_consumer_supply *supplies, int num_supplies)
+{
+	return NULL;
+}
+#endif
+
 #endif
-- 
1.7.9.1

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

* [PATCH 3/4] ARM i.MX pcm037: register a dummy regulator for the smsc911x device
  2012-03-03 11:40 ` Sascha Hauer
@ 2012-03-03 11:40   ` Sascha Hauer
  -1 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 11:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, linux-arm-kernel,
	Estevam Fabio-R49496, Sascha Hauer

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/mach-pcm037.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
index e48854b..5fddf94 100644
--- a/arch/arm/mach-imx/mach-pcm037.c
+++ b/arch/arm/mach-imx/mach-pcm037.c
@@ -32,6 +32,8 @@
 #include <linux/usb/ulpi.h>
 #include <linux/gfp.h>
 #include <linux/memblock.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 
 #include <media/soc_camera.h>
 
@@ -570,6 +572,11 @@ static int __init pcm037_otg_mode(char *options)
 }
 __setup("otg_mode=", pcm037_otg_mode);
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vdd33a", "smsc911x"),
+	REGULATOR_SUPPLY("vddvario", "smsc911x"),
+};
+
 /*
  * Board specific initialization.
  */
@@ -579,6 +586,8 @@ static void __init pcm037_init(void)
 
 	imx31_soc_init();
 
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
+
 	mxc_iomux_set_gpr(MUX_PGP_UH2, 1);
 
 	mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins),
-- 
1.7.9.1


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

* [PATCH 3/4] ARM i.MX pcm037: register a dummy regulator for the smsc911x device
@ 2012-03-03 11:40   ` Sascha Hauer
  0 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 11:40 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/mach-pcm037.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-imx/mach-pcm037.c b/arch/arm/mach-imx/mach-pcm037.c
index e48854b..5fddf94 100644
--- a/arch/arm/mach-imx/mach-pcm037.c
+++ b/arch/arm/mach-imx/mach-pcm037.c
@@ -32,6 +32,8 @@
 #include <linux/usb/ulpi.h>
 #include <linux/gfp.h>
 #include <linux/memblock.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 
 #include <media/soc_camera.h>
 
@@ -570,6 +572,11 @@ static int __init pcm037_otg_mode(char *options)
 }
 __setup("otg_mode=", pcm037_otg_mode);
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vdd33a", "smsc911x"),
+	REGULATOR_SUPPLY("vddvario", "smsc911x"),
+};
+
 /*
  * Board specific initialization.
  */
@@ -579,6 +586,8 @@ static void __init pcm037_init(void)
 
 	imx31_soc_init();
 
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
+
 	mxc_iomux_set_gpr(MUX_PGP_UH2, 1);
 
 	mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins),
-- 
1.7.9.1

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

* [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
  2012-03-03 11:40 ` Sascha Hauer
@ 2012-03-03 11:40   ` Sascha Hauer
  -1 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 11:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: Mark Brown, Liam Girdwood, linux-arm-kernel,
	Estevam Fabio-R49496, Sascha Hauer

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/plat-mxc/3ds_debugboard.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-mxc/3ds_debugboard.c b/arch/arm/plat-mxc/3ds_debugboard.c
index f0ba072..d1e31fa 100644
--- a/arch/arm/plat-mxc/3ds_debugboard.c
+++ b/arch/arm/plat-mxc/3ds_debugboard.c
@@ -16,6 +16,8 @@
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
 #include <linux/smsc911x.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 
 #include <mach/hardware.h>
 
@@ -148,6 +150,11 @@ static struct irq_chip expio_irq_chip = {
 	.irq_unmask = expio_unmask_irq,
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vdd33a", "smsc911x"),
+	REGULATOR_SUPPLY("vddvario", "smsc911x"),
+};
+
 int __init mxc_expio_init(u32 base, u32 p_irq)
 {
 	int i;
@@ -188,6 +195,8 @@ int __init mxc_expio_init(u32 base, u32 p_irq)
 	irq_set_chained_handler(p_irq, mxc_expio_irq_handler);
 
 	/* Register Lan device on the debugboard */
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
+
 	smsc911x_resources[0].start = LAN9217_BASE_ADDR(base);
 	smsc911x_resources[0].end = LAN9217_BASE_ADDR(base) + 0x100 - 1;
 	platform_device_register(&smsc_lan9217_device);
-- 
1.7.9.1


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

* [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
@ 2012-03-03 11:40   ` Sascha Hauer
  0 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 11:40 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/plat-mxc/3ds_debugboard.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-mxc/3ds_debugboard.c b/arch/arm/plat-mxc/3ds_debugboard.c
index f0ba072..d1e31fa 100644
--- a/arch/arm/plat-mxc/3ds_debugboard.c
+++ b/arch/arm/plat-mxc/3ds_debugboard.c
@@ -16,6 +16,8 @@
 #include <linux/platform_device.h>
 #include <linux/gpio.h>
 #include <linux/smsc911x.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 
 #include <mach/hardware.h>
 
@@ -148,6 +150,11 @@ static struct irq_chip expio_irq_chip = {
 	.irq_unmask = expio_unmask_irq,
 };
 
+static struct regulator_consumer_supply dummy_supplies[] = {
+	REGULATOR_SUPPLY("vdd33a", "smsc911x"),
+	REGULATOR_SUPPLY("vddvario", "smsc911x"),
+};
+
 int __init mxc_expio_init(u32 base, u32 p_irq)
 {
 	int i;
@@ -188,6 +195,8 @@ int __init mxc_expio_init(u32 base, u32 p_irq)
 	irq_set_chained_handler(p_irq, mxc_expio_irq_handler);
 
 	/* Register Lan device on the debugboard */
+	regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
+
 	smsc911x_resources[0].start = LAN9217_BASE_ADDR(base);
 	smsc911x_resources[0].end = LAN9217_BASE_ADDR(base) + 0x100 - 1;
 	platform_device_register(&smsc_lan9217_device);
-- 
1.7.9.1

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

* Re: [PATCH 1/4] regulator fixed: Do not report enumaratable voltages if there are none
  2012-03-03 11:40   ` Sascha Hauer
@ 2012-03-03 12:56     ` Mark Brown
  -1 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2012-03-03 12:56 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: linux-kernel, Liam Girdwood, linux-arm-kernel, Estevam Fabio-R49496

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

On Sat, Mar 03, 2012 at 12:40:01PM +0100, Sascha Hauer wrote:
> If used as a dummy voltage provider the fixed regulator should
> not set n_voltages to make the core accept the device.

Applied, thanks.

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

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

* [PATCH 1/4] regulator fixed: Do not report enumaratable voltages if there are none
@ 2012-03-03 12:56     ` Mark Brown
  0 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2012-03-03 12:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 03, 2012 at 12:40:01PM +0100, Sascha Hauer wrote:
> If used as a dummy voltage provider the fixed regulator should
> not set n_voltages to make the core accept the device.

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120303/348b1ba0/attachment.sig>

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

* Re: [PATCH 2/4] regulator: provide a helper for registering a fixed regulator
  2012-03-03 11:40   ` Sascha Hauer
@ 2012-03-03 16:33     ` Mark Brown
  -1 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2012-03-03 16:33 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: linux-kernel, Liam Girdwood, linux-arm-kernel, Estevam Fabio-R49496

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

On Sat, Mar 03, 2012 at 12:40:02PM +0100, Sascha Hauer wrote:
> Some devices require a regulator to work, but boards may not have
> a software controllable regulator for this device. Provide a helper
> function to make it simpler for these boards to register a fixed
> regulator as a dummy regulator.

Applied, thanks.

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

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

* [PATCH 2/4] regulator: provide a helper for registering a fixed regulator
@ 2012-03-03 16:33     ` Mark Brown
  0 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2012-03-03 16:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 03, 2012 at 12:40:02PM +0100, Sascha Hauer wrote:
> Some devices require a regulator to work, but boards may not have
> a software controllable regulator for this device. Provide a helper
> function to make it simpler for these boards to register a fixed
> regulator as a dummy regulator.

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120303/2d248ad9/attachment.sig>

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

* Re: [PATCH 3/4] ARM i.MX pcm037: register a dummy regulator for the smsc911x device
  2012-03-03 11:40   ` Sascha Hauer
@ 2012-03-03 16:34     ` Mark Brown
  -1 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2012-03-03 16:34 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: linux-kernel, Liam Girdwood, linux-arm-kernel, Estevam Fabio-R49496

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

On Sat, Mar 03, 2012 at 12:40:03PM +0100, Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Applied, thanks.

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

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

* [PATCH 3/4] ARM i.MX pcm037: register a dummy regulator for the smsc911x device
@ 2012-03-03 16:34     ` Mark Brown
  0 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2012-03-03 16:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 03, 2012 at 12:40:03PM +0100, Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120303/dfbc11a8/attachment.sig>

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

* Re: [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
  2012-03-03 11:40   ` Sascha Hauer
@ 2012-03-03 16:37     ` Mark Brown
  -1 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2012-03-03 16:37 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: linux-kernel, Liam Girdwood, linux-arm-kernel, Estevam Fabio-R49496

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

On Sat, Mar 03, 2012 at 12:40:04PM +0100, Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/plat-mxc/3ds_debugboard.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)

applied, though with at least this board you clearly do have a sensible
regulator setup already and are just adding in a few extra regulators to
fill out things which for some reason aren't supplied by the PMIC.  It's
quite surprising that things like what look like the I/O reference
voltage are supplied elsewhere.

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

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

* [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
@ 2012-03-03 16:37     ` Mark Brown
  0 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2012-03-03 16:37 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 03, 2012 at 12:40:04PM +0100, Sascha Hauer wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  arch/arm/plat-mxc/3ds_debugboard.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)

applied, though with at least this board you clearly do have a sensible
regulator setup already and are just adding in a few extra regulators to
fill out things which for some reason aren't supplied by the PMIC.  It's
quite surprising that things like what look like the I/O reference
voltage are supplied elsewhere.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120303/215a625f/attachment-0001.sig>

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

* Re: [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
  2012-03-03 16:37     ` Mark Brown
@ 2012-03-03 18:14       ` Sascha Hauer
  -1 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 18:14 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-kernel, Liam Girdwood, linux-arm-kernel, Estevam Fabio-R49496

On Sat, Mar 03, 2012 at 04:37:34PM +0000, Mark Brown wrote:
> On Sat, Mar 03, 2012 at 12:40:04PM +0100, Sascha Hauer wrote:
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  arch/arm/plat-mxc/3ds_debugboard.c |    9 +++++++++
> >  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> applied, though with at least this board you clearly do have a sensible
> regulator setup already and are just adding in a few extra regulators to
> fill out things which for some reason aren't supplied by the PMIC.  It's
> quite surprising that things like what look like the I/O reference
> voltage are supplied elsewhere.

This debug board is used with four different baseboards and one of them
indeed has regulator support in mainline. The regulator for the smsc911x
though is not software controllable on any of these boards. In the end
it's a debug board, energy efficiency might not be really important in
such a case.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
@ 2012-03-03 18:14       ` Sascha Hauer
  0 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-03 18:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 03, 2012 at 04:37:34PM +0000, Mark Brown wrote:
> On Sat, Mar 03, 2012 at 12:40:04PM +0100, Sascha Hauer wrote:
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> > ---
> >  arch/arm/plat-mxc/3ds_debugboard.c |    9 +++++++++
> >  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> applied, though with at least this board you clearly do have a sensible
> regulator setup already and are just adding in a few extra regulators to
> fill out things which for some reason aren't supplied by the PMIC.  It's
> quite surprising that things like what look like the I/O reference
> voltage are supplied elsewhere.

This debug board is used with four different baseboards and one of them
indeed has regulator support in mainline. The regulator for the smsc911x
though is not software controllable on any of these boards. In the end
it's a debug board, energy efficiency might not be really important in
such a case.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
  2012-03-03 11:40   ` Sascha Hauer
@ 2012-03-26 18:09     ` Fabio Estevam
  -1 siblings, 0 replies; 32+ messages in thread
From: Fabio Estevam @ 2012-03-26 18:09 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: linux-kernel, Estevam Fabio-R49496, Mark Brown, Liam Girdwood,
	linux-arm-kernel

Hi Sascha,

On Sat, Mar 3, 2012 at 8:40 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

...
>        /* Register Lan device on the debugboard */
> +       regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

I am using linux-next, which has this patch applied and I am getting:

smsc911x smsc911x.0: Failed to get supply 'vdd33a': -517
smsc911x smsc911x.0: (unregistered net_device): couldn't get regulators -517
platform smsc911x.0: Driver smsc911x requests probe deferral

Does this work for you on pcm037?

If I select CONFIG_REGULATOR_DUMMY then the the smsc driver is probed
correctly, but if I understand correctly your suggestion was to not
select CONFIG_REGULATOR_DUMMY, right?

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

* [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
@ 2012-03-26 18:09     ` Fabio Estevam
  0 siblings, 0 replies; 32+ messages in thread
From: Fabio Estevam @ 2012-03-26 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Sascha,

On Sat, Mar 3, 2012 at 8:40 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

...
> ? ? ? ?/* Register Lan device on the debugboard */
> + ? ? ? regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

I am using linux-next, which has this patch applied and I am getting:

smsc911x smsc911x.0: Failed to get supply 'vdd33a': -517
smsc911x smsc911x.0: (unregistered net_device): couldn't get regulators -517
platform smsc911x.0: Driver smsc911x requests probe deferral

Does this work for you on pcm037?

If I select CONFIG_REGULATOR_DUMMY then the the smsc driver is probed
correctly, but if I understand correctly your suggestion was to not
select CONFIG_REGULATOR_DUMMY, right?

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

* Re: [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
  2012-03-26 18:09     ` Fabio Estevam
@ 2012-03-26 18:19       ` Sascha Hauer
  -1 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-26 18:19 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: linux-kernel, Estevam Fabio-R49496, Mark Brown, Liam Girdwood,
	linux-arm-kernel

On Mon, Mar 26, 2012 at 03:09:34PM -0300, Fabio Estevam wrote:
> Hi Sascha,
> 
> On Sat, Mar 3, 2012 at 8:40 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> 
> ...
> >        /* Register Lan device on the debugboard */
> > +       regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
> 
> I am using linux-next, which has this patch applied and I am getting:
> 
> smsc911x smsc911x.0: Failed to get supply 'vdd33a': -517
> smsc911x smsc911x.0: (unregistered net_device): couldn't get regulators -517
> platform smsc911x.0: Driver smsc911x requests probe deferral
> 
> Does this work for you on pcm037?

At least it did work when I sent the patches, but -EPROBE_DEFER did not
exist at that time. Do you have the fixed regulator enabled in your
config?

> 
> If I select CONFIG_REGULATOR_DUMMY then the the smsc driver is probed
> correctly, but if I understand correctly your suggestion was to not
> select CONFIG_REGULATOR_DUMMY, right?

Right.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
@ 2012-03-26 18:19       ` Sascha Hauer
  0 siblings, 0 replies; 32+ messages in thread
From: Sascha Hauer @ 2012-03-26 18:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 26, 2012 at 03:09:34PM -0300, Fabio Estevam wrote:
> Hi Sascha,
> 
> On Sat, Mar 3, 2012 at 8:40 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> 
> ...
> > ? ? ? ?/* Register Lan device on the debugboard */
> > + ? ? ? regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
> 
> I am using linux-next, which has this patch applied and I am getting:
> 
> smsc911x smsc911x.0: Failed to get supply 'vdd33a': -517
> smsc911x smsc911x.0: (unregistered net_device): couldn't get regulators -517
> platform smsc911x.0: Driver smsc911x requests probe deferral
> 
> Does this work for you on pcm037?

At least it did work when I sent the patches, but -EPROBE_DEFER did not
exist at that time. Do you have the fixed regulator enabled in your
config?

> 
> If I select CONFIG_REGULATOR_DUMMY then the the smsc driver is probed
> correctly, but if I understand correctly your suggestion was to not
> select CONFIG_REGULATOR_DUMMY, right?

Right.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
  2012-03-26 18:19       ` Sascha Hauer
@ 2012-03-26 18:25         ` Fabio Estevam
  -1 siblings, 0 replies; 32+ messages in thread
From: Fabio Estevam @ 2012-03-26 18:25 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: linux-kernel, Estevam Fabio-R49496, Mark Brown, Liam Girdwood,
	linux-arm-kernel

On Mon, Mar 26, 2012 at 3:19 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:

> At least it did work when I sent the patches, but -EPROBE_DEFER did not
> exist at that time. Do you have the fixed regulator enabled in your
> config?

Yes, I do. I am using imx_v6_v7_defconfig, which has fixed regulator
enabled by default.

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

* [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
@ 2012-03-26 18:25         ` Fabio Estevam
  0 siblings, 0 replies; 32+ messages in thread
From: Fabio Estevam @ 2012-03-26 18:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 26, 2012 at 3:19 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:

> At least it did work when I sent the patches, but -EPROBE_DEFER did not
> exist at that time. Do you have the fixed regulator enabled in your
> config?

Yes, I do. I am using imx_v6_v7_defconfig, which has fixed regulator
enabled by default.

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

* Re: [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
  2012-03-26 18:25         ` Fabio Estevam
@ 2012-03-26 18:38           ` Fabio Estevam
  -1 siblings, 0 replies; 32+ messages in thread
From: Fabio Estevam @ 2012-03-26 18:38 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: linux-kernel, Estevam Fabio-R49496, Mark Brown, Liam Girdwood,
	linux-arm-kernel

On Mon, Mar 26, 2012 at 3:25 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Mon, Mar 26, 2012 at 3:19 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
>> At least it did work when I sent the patches, but -EPROBE_DEFER did not
>> exist at that time. Do you have the fixed regulator enabled in your
>> config?
>
> Yes, I do. I am using imx_v6_v7_defconfig, which has fixed regulator
> enabled by default.

--- a/arch/arm/plat-mxc/3ds_debugboard.c
+++ b/arch/arm/plat-mxc/3ds_debugboard.c
@@ -151,8 +151,8 @@ static struct irq_chip expio_irq_chip = {
 };

If I do the change below, smsc driver is probed correctly:

 static struct regulator_consumer_supply dummy_supplies[] = {
-       REGULATOR_SUPPLY("vdd33a", "smsc911x"),
-       REGULATOR_SUPPLY("vddvario", "smsc911x"),
+       REGULATOR_SUPPLY("vdd33a", NULL),
+       REGULATOR_SUPPLY("vddvario", NULL),
 };

Is this OK?

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

* [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
@ 2012-03-26 18:38           ` Fabio Estevam
  0 siblings, 0 replies; 32+ messages in thread
From: Fabio Estevam @ 2012-03-26 18:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 26, 2012 at 3:25 PM, Fabio Estevam <festevam@gmail.com> wrote:
> On Mon, Mar 26, 2012 at 3:19 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
>
>> At least it did work when I sent the patches, but -EPROBE_DEFER did not
>> exist at that time. Do you have the fixed regulator enabled in your
>> config?
>
> Yes, I do. I am using imx_v6_v7_defconfig, which has fixed regulator
> enabled by default.

--- a/arch/arm/plat-mxc/3ds_debugboard.c
+++ b/arch/arm/plat-mxc/3ds_debugboard.c
@@ -151,8 +151,8 @@ static struct irq_chip expio_irq_chip = {
 };

If I do the change below, smsc driver is probed correctly:

 static struct regulator_consumer_supply dummy_supplies[] = {
-       REGULATOR_SUPPLY("vdd33a", "smsc911x"),
-       REGULATOR_SUPPLY("vddvario", "smsc911x"),
+       REGULATOR_SUPPLY("vdd33a", NULL),
+       REGULATOR_SUPPLY("vddvario", NULL),
 };

Is this OK?

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

* Re: [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
  2012-03-26 18:38           ` Fabio Estevam
@ 2012-03-26 18:48             ` Fabio Estevam
  -1 siblings, 0 replies; 32+ messages in thread
From: Fabio Estevam @ 2012-03-26 18:48 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: linux-kernel, Estevam Fabio-R49496, Mark Brown, Liam Girdwood,
	linux-arm-kernel

On Mon, Mar 26, 2012 at 3:38 PM, Fabio Estevam <festevam@gmail.com> wrote:

>  static struct regulator_consumer_supply dummy_supplies[] = {
> -       REGULATOR_SUPPLY("vdd33a", "smsc911x"),
> -       REGULATOR_SUPPLY("vddvario", "smsc911x"),
> +       REGULATOR_SUPPLY("vdd33a", NULL),
> +       REGULATOR_SUPPLY("vddvario", NULL),

Actually the proper fix is:

--- a/arch/arm/plat-mxc/3ds_debugboard.c
+++ b/arch/arm/plat-mxc/3ds_debugboard.c
@@ -80,7 +80,7 @@ static struct smsc911x_platform_config smsc911x_config = {

 static struct platform_device smsc_lan9217_device = {
        .name = "smsc911x",
-       .id = 0,
+       .id = -1,
        .dev = {
                .platform_data = &smsc911x_config,
        },

Will send you the patch shortly.

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

* [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
@ 2012-03-26 18:48             ` Fabio Estevam
  0 siblings, 0 replies; 32+ messages in thread
From: Fabio Estevam @ 2012-03-26 18:48 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 26, 2012 at 3:38 PM, Fabio Estevam <festevam@gmail.com> wrote:

> ?static struct regulator_consumer_supply dummy_supplies[] = {
> - ? ? ? REGULATOR_SUPPLY("vdd33a", "smsc911x"),
> - ? ? ? REGULATOR_SUPPLY("vddvario", "smsc911x"),
> + ? ? ? REGULATOR_SUPPLY("vdd33a", NULL),
> + ? ? ? REGULATOR_SUPPLY("vddvario", NULL),

Actually the proper fix is:

--- a/arch/arm/plat-mxc/3ds_debugboard.c
+++ b/arch/arm/plat-mxc/3ds_debugboard.c
@@ -80,7 +80,7 @@ static struct smsc911x_platform_config smsc911x_config = {

 static struct platform_device smsc_lan9217_device = {
        .name = "smsc911x",
-       .id = 0,
+       .id = -1,
        .dev = {
                .platform_data = &smsc911x_config,
        },

Will send you the patch shortly.

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

* Re: [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
  2012-03-26 18:19       ` Sascha Hauer
@ 2012-03-28 10:57         ` Mark Brown
  -1 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2012-03-28 10:57 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Fabio Estevam, linux-kernel, Estevam Fabio-R49496, Liam Girdwood,
	linux-arm-kernel

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

On Mon, Mar 26, 2012 at 08:19:12PM +0200, Sascha Hauer wrote:

> At least it did work when I sent the patches, but -EPROBE_DEFER did not
> exist at that time. Do you have the fixed regulator enabled in your
> config?

FWIW all the -EPROBE_DEFER change does is change the error code returned
when we can't find a supply, if we're hitting that case we'd have failed
without it too.

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

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

* [PATCH 4/4] ARM i.MX 3ds debugboard: register a dummy regulator for the smsc911x device
@ 2012-03-28 10:57         ` Mark Brown
  0 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2012-03-28 10:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Mar 26, 2012 at 08:19:12PM +0200, Sascha Hauer wrote:

> At least it did work when I sent the patches, but -EPROBE_DEFER did not
> exist at that time. Do you have the fixed regulator enabled in your
> config?

FWIW all the -EPROBE_DEFER change does is change the error code returned
when we can't find a supply, if we're hitting that case we'd have failed
without it too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120328/894a0e26/attachment-0001.sig>

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

end of thread, other threads:[~2012-03-28 10:58 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-03 11:40 [PATCH] Add helper for registering a fixed regulator Sascha Hauer
2012-03-03 11:40 ` Sascha Hauer
2012-03-03 11:40 ` [PATCH 1/4] regulator fixed: Do not report enumaratable voltages if there are none Sascha Hauer
2012-03-03 11:40   ` Sascha Hauer
2012-03-03 12:56   ` Mark Brown
2012-03-03 12:56     ` Mark Brown
2012-03-03 11:40 ` [PATCH 2/4] regulator: provide a helper for registering a fixed regulator Sascha Hauer
2012-03-03 11:40   ` Sascha Hauer
2012-03-03 16:33   ` Mark Brown
2012-03-03 16:33     ` Mark Brown
2012-03-03 11:40 ` [PATCH 3/4] ARM i.MX pcm037: register a dummy regulator for the smsc911x device Sascha Hauer
2012-03-03 11:40   ` Sascha Hauer
2012-03-03 16:34   ` Mark Brown
2012-03-03 16:34     ` Mark Brown
2012-03-03 11:40 ` [PATCH 4/4] ARM i.MX 3ds debugboard: " Sascha Hauer
2012-03-03 11:40   ` Sascha Hauer
2012-03-03 16:37   ` Mark Brown
2012-03-03 16:37     ` Mark Brown
2012-03-03 18:14     ` Sascha Hauer
2012-03-03 18:14       ` Sascha Hauer
2012-03-26 18:09   ` Fabio Estevam
2012-03-26 18:09     ` Fabio Estevam
2012-03-26 18:19     ` Sascha Hauer
2012-03-26 18:19       ` Sascha Hauer
2012-03-26 18:25       ` Fabio Estevam
2012-03-26 18:25         ` Fabio Estevam
2012-03-26 18:38         ` Fabio Estevam
2012-03-26 18:38           ` Fabio Estevam
2012-03-26 18:48           ` Fabio Estevam
2012-03-26 18:48             ` Fabio Estevam
2012-03-28 10:57       ` Mark Brown
2012-03-28 10:57         ` Mark Brown

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.