• Home
  • Raw
  • Download

Lines Matching +full:power +full:- +full:button

1 // SPDX-License-Identifier: GPL-2.0
3 * arch/arm/mach-ixp4xx/nas100d-setup.c
5 * NAS 100d board-setup
9 * based on ixdp425-setup.c:
10 * Copyright (C) 2003-2004 MontaVista Software, Inc.
11 * based on nas100d-power.c:
13 * based on nas100d-io.c
18 * Maintainers: http://www.nslu2-linux.org/
33 #include <asm/mach-types.h>
43 #define NAS100D_PB_GPIO 14 /* power button */
44 #define NAS100D_RB_GPIO 4 /* reset button */
46 /* Power control */
47 #define NAS100D_PO_GPIO 12 /* power off */
64 .name = "IXP4XX-Flash",
84 .name = "nas100d:blue:power", /* (off=flashing) */
101 .name = "leds-gpio",
102 .id = -1,
107 .dev_id = "i2c-gpio.0",
117 .name = "i2c-gpio",
167 /* Built-in 10/100 Ethernet MAC interfaces */
203 /* This causes the box to drop the power and go dead. */ in nas100d_power_off()
205 /* enable the pwr cntl gpio and assert power off */ in nas100d_power_off()
209 /* This is used to make sure the power-button pusher is serious. The button
214 /* Must hold the button down for at least this many counts to be processed */
223 * state of the power button. in nas100d_power_handler()
228 /* IO Pin is 1 (button pushed) */ in nas100d_power_handler()
230 power_button_countdown--; in nas100d_power_handler()
234 /* Done on button release, to allow for auto-power-on mods. */ in nas100d_power_handler()
242 /* Change the state of the power LED to "blink" */ in nas100d_power_handler()
254 /* This is the paper-clip reset, it shuts the machine down directly. */ in nas100d_reset_handler()
266 * The power button on the Iomega NAS100d is on GPIO 14, but in nas100d_gpio_init()
271 /* Request the power off GPIO */ in nas100d_gpio_init()
272 gpio_request(NAS100D_PO_GPIO, "power off"); in nas100d_gpio_init()
274 /* Make sure that the power button GPIO is set up as an input */ in nas100d_gpio_init()
275 gpio_request(NAS100D_PB_GPIO, "power button"); in nas100d_gpio_init()
278 /* Set the initial value for the power button IRQ handler */ in nas100d_gpio_init()
296 IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1; in nas100d_init()
314 IRQF_TRIGGER_LOW, "NAS100D reset button", NULL) < 0) { in nas100d_init()
316 printk(KERN_DEBUG "Reset Button IRQ %d not available\n", in nas100d_init()
341 /* Maintainer: www.nslu2-linux.org */