Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sh: add fixed voltage regulators to sh2007

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>

authored by

Guennadi Liakhovetski and committed by
Paul Mundt
9d5be6ac 73c2a9dc

+12
+12
arch/sh/boards/board-sh2007.c
··· 6 6 */ 7 7 #include <linux/init.h> 8 8 #include <linux/irq.h> 9 + #include <linux/regulator/fixed.h> 10 + #include <linux/regulator/machine.h> 9 11 #include <linux/smsc911x.h> 10 12 #include <linux/platform_device.h> 11 13 #include <linux/ata_platform.h> 12 14 #include <linux/io.h> 13 15 #include <asm/machvec.h> 14 16 #include <mach/sh2007.h> 17 + 18 + /* Dummy supplies, where voltage doesn't matter */ 19 + static struct regulator_consumer_supply dummy_supplies[] = { 20 + REGULATOR_SUPPLY("vddvario", "smsc911x.0"), 21 + REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), 22 + REGULATOR_SUPPLY("vddvario", "smsc911x.1"), 23 + REGULATOR_SUPPLY("vdd33a", "smsc911x.1"), 24 + }; 15 25 16 26 struct smsc911x_platform_config smc911x_info = { 17 27 .flags = SMSC911X_USE_32BIT, ··· 108 98 109 99 static int __init sh2007_io_init(void) 110 100 { 101 + regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); 102 + 111 103 platform_add_devices(sh2007_devices, ARRAY_SIZE(sh2007_devices)); 112 104 return 0; 113 105 }