Skip to content

Commit

Permalink
[ARM] Orion5x: set valid GPIO inhibit power-off for d2net
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Guinot authored and Nicolas Pitre committed Feb 10, 2010
1 parent e233230 commit d74b96a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/mach-orion5x/d2net-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ static struct orion5x_mpp_mode d2net_mpp_modes[] __initdata = {
/* 24: Inhibit board power off (0 = Disabled, 1 = Enabled) */
};

#define D2NET_GPIO_INHIBIT_POWER_OFF 24

static void __init d2net_init(void)
{
/*
Expand Down Expand Up @@ -333,6 +335,8 @@ static void __init d2net_init(void)

i2c_register_board_info(0, d2net_i2c_devices,
ARRAY_SIZE(d2net_i2c_devices));

orion_gpio_set_valid(D2NET_GPIO_INHIBIT_POWER_OFF, 1);
}

/* Warning: LaCie use a wrong mach-type (0x20e=526) in their bootloader. */
Expand Down

0 comments on commit d74b96a

Please sign in to comment.