Lines Matching +full:gpio +full:- +full:poweroff

2  * arch/arm/mach-orion5x/dns323-setup.c
16 #include <linux/gpio.h>
32 #include <asm/mach-types.h>
36 #include <plat/orion-gpio.h>
79 * Check for devices with hard-wired IRQs. in dns323_pci_map_irq()
82 if (irq != -1) in dns323_pci_map_irq()
85 return -1; in dns323_pci_map_irq()
111 * Layout as used by D-Link:
112 * 0x00000000-0x00010000 : "MTD1"
113 * 0x00010000-0x00020000 : "MTD2"
114 * 0x00020000-0x001a0000 : "Linux Kernel"
115 * 0x001a0000-0x007d0000 : "File System"
116 * 0x007d0000-0x00800000 : "u-boot"
140 .name = "u-boot",
155 .end = DNS323_NOR_BOOT_BASE + DNS323_NOR_BOOT_SIZE - 1,
159 .name = "physmap-flash",
176 /* dns323_parse_hex_*() taken from tsx09-common.c; should a common copy of these
182 return n - '0'; in dns323_parse_hex_nibble()
185 return n - 'A' + 10; in dns323_parse_hex_nibble()
188 return n - 'a' + 10; in dns323_parse_hex_nibble()
190 return -1; in dns323_parse_hex_nibble()
202 return -1; in dns323_parse_hex_byte()
214 * (0x007d0000-0x00800000) starting at offset 196480 (0x2ff80). in dns323_read_mac_addr()
218 return -ENOMEM; in dns323_read_mac_addr()
239 printk("DNS-323: Found ethernet MAC address: %pM\n", addr); in dns323_read_mac_addr()
247 return -EINVAL; in dns323_read_mac_addr()
251 * GPIO LEDs (simple - doesn't use hardware blinking support)
257 .gpio = DNS323_GPIO_LED_POWER2,
258 .default_trigger = "default-on",
261 .gpio = DNS323_GPIO_LED_RIGHT_AMBER,
265 .gpio = DNS323_GPIO_LED_LEFT_AMBER,
274 .gpio = DNS323C_GPIO_LED_POWER,
279 .gpio = DNS323C_GPIO_LED_RIGHT_AMBER,
283 .gpio = DNS323C_GPIO_LED_LEFT_AMBER,
302 .name = "leds-gpio",
303 .id = -1,
310 * GPIO Attached Keys
316 .gpio = DNS323_GPIO_KEY_RESET,
321 .gpio = DNS323_GPIO_KEY_POWER,
335 .gpio = DNS323C_GPIO_KEY_POWER,
347 .name = "gpio-keys",
348 .id = -1,
372 MPP6_GPIO, /* GMT G751-2f overtemp */
396 MPP6_GPIO, /* GMT G751-2f overtemp */
442 * GPIO 18 GPIO 19 Fan
449 * (*) I think the two bits control two feed-in resistors into a fixed
451 * than high speed, but d-link doesn't do it and you may get out of
456 * On the DNS-323 A1 and B1 the following devices are attached via I2C:
460 * 0x48 | GMT G751-2f | temp. sensor and therm. watchdog (LM75 compatible)
474 * On the DNS-323 C1 the following devices are attached via I2C:
477 * 0x48 | GMT G751-2f | temp. sensor and therm. watchdog (LM75 compatible)
488 /* DNS-323 rev. A specific power off method */
491 pr_info("DNS-323: Triggering power-off...\n"); in dns323a_power_off()
495 /* DNS-323 rev B specific power off method */
498 pr_info("DNS-323: Triggering power-off...\n"); in dns323b_power_off()
505 /* DNS-323 rev. C specific power off method */
508 pr_info("DNS-323: Triggering power-off...\n"); in dns323c_power_off()
514 phy->dev_flags |= MARVELL_PHY_M1118_DNS323_LEDS; in dns323c_phy_fixup()
523 pr_debug("DNS-323: Identifying board ... \n"); in dns323_identify_rev()
528 pr_debug("DNS-323: 5181 found, board is A1\n"); in dns323_identify_rev()
531 pr_debug("DNS-323: 5182 found, board is B1 or C1, checking PHY...\n"); in dns323_identify_rev()
551 pr_warn("DNS-323: Timeout accessing PHY, assuming rev B1\n"); in dns323_identify_rev()
563 pr_warn("DNS-323: Timeout reading PHY, assuming rev B1\n"); in dns323_identify_rev()
566 pr_debug("DNS-323: Ethernet PHY ID 0x%x\n", reg & 0xffff); in dns323_identify_rev()
578 pr_warn("DNS-323: Unknown PHY ID 0x%04x, assuming rev B1\n", in dns323_identify_rev()
591 pr_info("DNS-323: Identified HW revision %c1\n", 'A' + system_rev); in dns323_init()
640 platform_device_register_simple("dns323c-fan", 0, NULL, 0); in dns323_init()
657 printk("DNS-323: Failed to read MAC address\n"); in dns323_init()
666 /* Poweroff GPIO */ in dns323_init()
667 if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 || in dns323_init()
669 pr_err("DNS-323: failed to setup power-off GPIO\n"); in dns323_init()
673 /* 5182 built-in SATA init */ in dns323_init()
678 * controlled via leds-gpio. in dns323_init()
683 /* Poweroff GPIO */ in dns323_init()
684 if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 || in dns323_init()
686 pr_err("DNS-323: failed to setup power-off GPIO\n"); in dns323_init()
690 /* 5182 built-in SATA init */ in dns323_init()
693 /* Poweroff GPIO */ in dns323_init()
694 if (gpio_request(DNS323C_GPIO_POWER_OFF, "POWEROFF") != 0 || in dns323_init()
696 pr_err("DNS-323: failed to setup power-off GPIO\n"); in dns323_init()
699 /* Now, -this- should theoretically be done by the sata_mv driver in dns323_init()
712 /* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */
713 MACHINE_START(DNS323, "D-Link DNS-323")