Commit 2bd5d086 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Paul Mundt

sh: add fixed voltage regulators to magicpanelr2

On magicpanelr2 provide a dummy regulator for the smsc911x driver.
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 1f8eca12
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
...@@ -24,6 +26,12 @@ ...@@ -24,6 +26,12 @@
#include <asm/heartbeat.h> #include <asm/heartbeat.h>
#include <cpu/sh7720.h> #include <cpu/sh7720.h>
/* Dummy supplies, where voltage doesn't matter */
static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vddvario", "smsc911x"),
REGULATOR_SUPPLY("vdd33a", "smsc911x"),
};
#define LAN9115_READY (__raw_readl(0xA8000084UL) & 0x00000001UL) #define LAN9115_READY (__raw_readl(0xA8000084UL) & 0x00000001UL)
/* Wait until reset finished. Timeout is 100ms. */ /* Wait until reset finished. Timeout is 100ms. */
...@@ -348,6 +356,8 @@ static struct platform_device *mpr2_devices[] __initdata = { ...@@ -348,6 +356,8 @@ static struct platform_device *mpr2_devices[] __initdata = {
static int __init mpr2_devices_setup(void) static int __init mpr2_devices_setup(void)
{ {
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
return platform_add_devices(mpr2_devices, ARRAY_SIZE(mpr2_devices)); return platform_add_devices(mpr2_devices, ARRAY_SIZE(mpr2_devices));
} }
device_initcall(mpr2_devices_setup); device_initcall(mpr2_devices_setup);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment