Lines Matching +full:led +full:- +full:6

1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/arch/arm/mach-pxa/mainstone.c
13 #include <linux/gpio/gpio-reg.h>
30 #include <linux/platform_data/i2c-pxa.h>
37 #include <asm/mach-types.h>
50 #include <linux/platform_data/video-pxafb.h>
51 #include <linux/platform_data/mmc-pxamci.h>
52 #include <linux/platform_data/irda-pxaficp.h>
53 #include <linux/platform_data/usb-ohci-pxa27x.h>
54 #include <linux/platform_data/keypad-pxa27x.h>
64 /* LCD - 16bpp Active TFT */
156 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in mst_audio_startup()
163 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in mst_audio_shutdown()
190 .end = PXA_CS0_PHYS + SZ_64M - 1,
195 .end = PXA_CS1_PHYS + SZ_64M - 1,
205 .mask_flags = MTD_WRITEABLE /* force read-only */
231 .name = "pxa2xx-flash",
240 .name = "pxa2xx-flash",
252 PWM_LOOKUP("pxa27x-pwm.0", 0, "pwm-backlight.0", NULL, 78770,
262 .name = "pwm-backlight",
338 struct pxamci_platform_data* p_d = dev->platform_data; in mainstone_mci_setpower()
340 if (( 1 << vdd) & p_d->ocr_mask) { in mainstone_mci_setpower()
383 .gpio_pwdown = -1,
404 .name = "gpio-keys",
405 .id = -1,
414 .end = MST_FPGA_PHYS + 0xe0 - 1,
431 .id = -1,
472 KEY(0, 6, KEY_UP),
473 KEY(1, 6, KEY_DOWN),
474 KEY(2, 6, KEY_LEFT),
475 KEY(3, 6, KEY_RIGHT),
476 KEY(4, 6, KEY_SELECT),
485 .matrix_key_rows = 6,
505 [0 ... 10] = -1,
512 [0 ... 10] = -1,
519 .dev_id = "pxa2xx-pcmcia",
521 GPIO_LOOKUP("mst-pcmcia0", 0, "a0vpp", GPIO_ACTIVE_HIGH),
522 GPIO_LOOKUP("mst-pcmcia0", 1, "a1vpp", GPIO_ACTIVE_HIGH),
523 GPIO_LOOKUP("mst-pcmcia0", 2, "a0vcc", GPIO_ACTIVE_HIGH),
524 GPIO_LOOKUP("mst-pcmcia0", 3, "a1vcc", GPIO_ACTIVE_HIGH),
525 GPIO_LOOKUP("mst-pcmcia0", 4, "areset", GPIO_ACTIVE_HIGH),
526 GPIO_LOOKUP("mst-pcmcia0", 5, "adetect", GPIO_ACTIVE_LOW),
527 GPIO_LOOKUP("mst-pcmcia0", 6, "avs1", GPIO_ACTIVE_LOW),
528 GPIO_LOOKUP("mst-pcmcia0", 7, "avs2", GPIO_ACTIVE_LOW),
529 GPIO_LOOKUP("mst-pcmcia0", 8, "abvd1", GPIO_ACTIVE_HIGH),
530 GPIO_LOOKUP("mst-pcmcia0", 9, "abvd2", GPIO_ACTIVE_HIGH),
531 GPIO_LOOKUP("mst-pcmcia0", 10, "aready", GPIO_ACTIVE_HIGH),
532 GPIO_LOOKUP("mst-pcmcia1", 0, "b0vpp", GPIO_ACTIVE_HIGH),
533 GPIO_LOOKUP("mst-pcmcia1", 1, "b1vpp", GPIO_ACTIVE_HIGH),
534 GPIO_LOOKUP("mst-pcmcia1", 2, "b0vcc", GPIO_ACTIVE_HIGH),
535 GPIO_LOOKUP("mst-pcmcia1", 3, "b1vcc", GPIO_ACTIVE_HIGH),
536 GPIO_LOOKUP("mst-pcmcia1", 4, "breset", GPIO_ACTIVE_HIGH),
537 GPIO_LOOKUP("mst-pcmcia1", 5, "bdetect", GPIO_ACTIVE_LOW),
538 GPIO_LOOKUP("mst-pcmcia1", 6, "bvs1", GPIO_ACTIVE_LOW),
539 GPIO_LOOKUP("mst-pcmcia1", 7, "bvs2", GPIO_ACTIVE_LOW),
540 GPIO_LOOKUP("mst-pcmcia1", 8, "bbvd1", GPIO_ACTIVE_HIGH),
541 GPIO_LOOKUP("mst-pcmcia1", 9, "bbvd2", GPIO_ACTIVE_HIGH),
542 GPIO_LOOKUP("mst-pcmcia1", 10, "bready", GPIO_ACTIVE_HIGH),
554 gpio_reg_init(NULL, (void __iomem *)&MST_PCMCIA0, -1, 11, in mainstone_init()
555 "mst-pcmcia0", MST_PCMCIA_INPUTS, 0, NULL, in mainstone_init()
557 gpio_reg_init(NULL, (void __iomem *)&MST_PCMCIA1, -1, 11, in mainstone_init()
558 "mst-pcmcia1", MST_PCMCIA_INPUTS, 0, NULL, in mainstone_init()
570 mst_flash_data[SW7].name = "processor-flash"; in mainstone_init()
571 mst_flash_data[SW7 ^ 1].name = "mainboard-flash"; in mainstone_init()
577 * - Core_Park in mainstone_init()
578 * - LCD_wt:DMA_wt:CORE_Wt = 2:3:4 in mainstone_init()
625 * Note: bits [15-8] are used to enable/blank the 8 7 segment hex displays
637 * LED triggers are compiled in.
643 { "mainstone:D28", "default-on", },
656 struct mainstone_led *led = container_of(cdev, in mainstone_led_set() local
661 reg |= led->mask; in mainstone_led_set()
663 reg &= ~led->mask; in mainstone_led_set()
670 struct mainstone_led *led = container_of(cdev, in mainstone_led_get() local
674 return (reg & led->mask) ? LED_FULL : LED_OFF; in mainstone_led_get()
682 return -ENODEV; in mainstone_leds_init()
687 struct mainstone_led *led; in mainstone_leds_init() local
689 led = kzalloc(sizeof(*led), GFP_KERNEL); in mainstone_leds_init()
690 if (!led) in mainstone_leds_init()
693 led->cdev.name = mainstone_leds[i].name; in mainstone_leds_init()
694 led->cdev.brightness_set = mainstone_led_set; in mainstone_leds_init()
695 led->cdev.brightness_get = mainstone_led_get; in mainstone_leds_init()
696 led->cdev.default_trigger = mainstone_leds[i].trigger; in mainstone_leds_init()
697 led->mask = BIT(i); in mainstone_leds_init()
699 if (led_classdev_register(NULL, &led->cdev) < 0) { in mainstone_leds_init()
700 kfree(led); in mainstone_leds_init()