aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x
diff options
context:
space:
mode:
authorSimon Guinot <sguinot@lacie.com>2010-02-09 15:21:49 -0500
committerNicolas Pitre <nico@fluxnic.net>2010-02-09 20:45:04 -0500
commitd74b96a73a99853708d6b278c2ce683657fa1ec5 (patch)
tree96004a5fa1bb67d6de507b7af34ed5fe02f1a08d /arch/arm/mach-orion5x
parente233230f9c8f02d4c3a643ec5067ca21bc90ee9a (diff)
[ARM] Orion5x: set valid GPIO inhibit power-off for d2net
This patch allow user-space to configure the switch power-off behaviour via the gpiolib sysfs interface. Signed-off-by: Simon Guinot <sguinot@lacie.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mach-orion5x')
-rw-r--r--arch/arm/mach-orion5x/d2net-setup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-orion5x/d2net-setup.c b/arch/arm/mach-orion5x/d2net-setup.c
index 9d4bf763f25b..0420e45f66b7 100644
--- a/arch/arm/mach-orion5x/d2net-setup.c
+++ b/arch/arm/mach-orion5x/d2net-setup.c
@@ -301,6 +301,8 @@ static struct orion5x_mpp_mode d2net_mpp_modes[] __initdata = {
301 /* 24: Inhibit board power off (0 = Disabled, 1 = Enabled) */ 301 /* 24: Inhibit board power off (0 = Disabled, 1 = Enabled) */
302}; 302};
303 303
304#define D2NET_GPIO_INHIBIT_POWER_OFF 24
305
304static void __init d2net_init(void) 306static void __init d2net_init(void)
305{ 307{
306 /* 308 /*
@@ -333,6 +335,8 @@ static void __init d2net_init(void)
333 335
334 i2c_register_board_info(0, d2net_i2c_devices, 336 i2c_register_board_info(0, d2net_i2c_devices,
335 ARRAY_SIZE(d2net_i2c_devices)); 337 ARRAY_SIZE(d2net_i2c_devices));
338
339 orion_gpio_set_valid(D2NET_GPIO_INHIBIT_POWER_OFF, 1);
336} 340}
337 341
338/* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */ 342/* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */