Skip to content

Commit

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

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 73c2a9d commit 9d5be6a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/sh/boards/board-sh2007.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,23 @@
*/
#include <linux/init.h>
#include <linux/irq.h>
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/smsc911x.h>
#include <linux/platform_device.h>
#include <linux/ata_platform.h>
#include <linux/io.h>
#include <asm/machvec.h>
#include <mach/sh2007.h>

/* Dummy supplies, where voltage doesn't matter */
static struct regulator_consumer_supply dummy_supplies[] = {
REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
REGULATOR_SUPPLY("vddvario", "smsc911x.1"),
REGULATOR_SUPPLY("vdd33a", "smsc911x.1"),
};

struct smsc911x_platform_config smc911x_info = {
.flags = SMSC911X_USE_32BIT,
.irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW,
Expand Down Expand Up @@ -98,6 +108,8 @@ static struct platform_device *sh2007_devices[] __initdata = {

static int __init sh2007_io_init(void)
{
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));

platform_add_devices(sh2007_devices, ARRAY_SIZE(sh2007_devices));
return 0;
}
Expand Down

0 comments on commit 9d5be6a

Please sign in to comment.