Lines Matching +full:led +full:- +full:7
1 // SPDX-License-Identifier: GPL-2.0
3 * linux/arch/arm/mach-footbridge/netwinder-hw.c
20 #include <asm/mach-types.h>
101 wb977_device_select(7); in __gpio_modify_io()
219 * Initialise the Winbond W83977F Infra-Red device
237 * RX DMA - ISA DMA 0 in wb977_init_irda()
242 * TX DMA - Disable Tx DMA in wb977_init_irda()
267 current_gpio_io = -1; in wb977_init_gpio()
268 __gpio_modify_io(-1, GPIO_DONE | GPIO_WDTIMER); in wb977_init_gpio()
270 wb977_device_select(7); in wb977_init_gpio()
304 * - timer disable in wb977_init_gpio()
309 * - disable LED, no mouse nor keyboard IRQ in wb977_init_gpio()
314 * - timer counting, disable power LED, disable timeouot in wb977_init_gpio()
327 nw_gpio_modify_op(-1, GPIO_RED_LED | GPIO_FAN); in wb977_init_gpio()
350 * the multi-IO chip. in wb977_init()
390 nw_cpld_modify(-1, CPLD_UNMUTE | CPLD_7111_DISABLE); in cpld_init()
457 WRITE_RWA(7, 3); in rwa010_global_init()
461 WRITE_RWA(7, 4); in rwa010_global_init()
464 /* disable the MPU-401 section of the chip */ in rwa010_global_init()
465 WRITE_RWA(7, 2); in rwa010_global_init()
473 WRITE_RWA(7, 5); in rwa010_game_port_init()
489 WRITE_RWA(7, 0); in rwa010_waveartist_init()
511 WRITE_RWA(7, 1); in rwa010_soundblaster_init()
524 dprintk(" 8-bit DMA: "); in rwa010_soundblaster_init()
596 rwa010_waveartist_init(0x250, 3, 7); in rwa010_init()
631 * on the NetWinder - it will reset the settings in fixup_netwinder()
651 /* aux function group 1 (logical device 7) */ in netwinder_restart()
655 /* set GP16 for WD-TIMER output */ in netwinder_restart()
659 /* set a RED LED and toggle WD_TIMER for rebooting */ in netwinder_restart()
673 * LED triggers are compiled in.
684 * The LED control in Netwinder is reversed:
685 * - setting bit means turn off LED
686 * - clearing bit means turn on LED
691 struct netwinder_led *led = container_of(cdev, in netwinder_led_set() local
699 reg &= ~led->mask; in netwinder_led_set()
701 reg |= led->mask; in netwinder_led_set()
702 nw_gpio_modify_op(led->mask, reg); in netwinder_led_set()
708 struct netwinder_led *led = container_of(cdev, in netwinder_led_get() local
717 return (reg & led->mask) ? LED_OFF : LED_FULL; in netwinder_led_get()
725 return -ENODEV; in netwinder_leds_init()
728 struct netwinder_led *led; in netwinder_leds_init() local
730 led = kzalloc(sizeof(*led), GFP_KERNEL); in netwinder_leds_init()
731 if (!led) in netwinder_leds_init()
734 led->cdev.name = netwinder_leds[i].name; in netwinder_leds_init()
735 led->cdev.brightness_set = netwinder_led_set; in netwinder_leds_init()
736 led->cdev.brightness_get = netwinder_led_get; in netwinder_leds_init()
737 led->cdev.default_trigger = netwinder_leds[i].trigger; in netwinder_leds_init()
740 led->mask = GPIO_GREEN_LED; in netwinder_leds_init()
742 led->mask = GPIO_RED_LED; in netwinder_leds_init()
744 if (led_classdev_register(NULL, &led->cdev) < 0) { in netwinder_leds_init()
745 kfree(led); in netwinder_leds_init()
760 MACHINE_START(NETWINDER, "Rebel-NetWinder")