Skip to content

Commit

Permalink
sh: add fixed voltage regulators to magicpanelr2
Browse files Browse the repository at this point in the history
On magicpanelr2 provide a dummy regulator for the smsc911x driver.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Guennadi Liakhovetski authored and Paul Mundt committed Jun 28, 2012
1 parent 1f8eca1 commit 2bd5d08
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/sh/boards/board-magicpanelr2.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
Expand All @@ -24,6 +26,12 @@
#include <asm/heartbeat.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)

/* Wait until reset finished. Timeout is 100ms. */
Expand Down Expand Up @@ -348,6 +356,8 @@ static struct platform_device *mpr2_devices[] __initdata = {

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));
}
device_initcall(mpr2_devices_setup);
Expand Down

0 comments on commit 2bd5d08

Please sign in to comment.