Lines Matching refs:iocled
637 struct txx9_iocled_data *iocled; in txx9_iocled_init() local
649 iocled = kzalloc(sizeof(*iocled), GFP_KERNEL); in txx9_iocled_init()
650 if (!iocled) in txx9_iocled_init()
652 iocled->mmioaddr = ioremap(baseaddr, 1); in txx9_iocled_init()
653 if (!iocled->mmioaddr) in txx9_iocled_init()
655 iocled->chip.get = txx9_iocled_get; in txx9_iocled_init()
656 iocled->chip.set = txx9_iocled_set; in txx9_iocled_init()
657 iocled->chip.direction_input = txx9_iocled_dir_in; in txx9_iocled_init()
658 iocled->chip.direction_output = txx9_iocled_dir_out; in txx9_iocled_init()
659 iocled->chip.label = "iocled"; in txx9_iocled_init()
660 iocled->chip.base = basenum; in txx9_iocled_init()
661 iocled->chip.ngpio = num; in txx9_iocled_init()
662 if (gpiochip_add_data(&iocled->chip, iocled)) in txx9_iocled_init()
665 basenum = iocled->chip.base; in txx9_iocled_init()
670 iocled->pdata.num_leds = num; in txx9_iocled_init()
671 iocled->pdata.leds = iocled->leds; in txx9_iocled_init()
673 struct gpio_led *led = &iocled->leds[i]; in txx9_iocled_init()
674 snprintf(iocled->names[i], sizeof(iocled->names[i]), in txx9_iocled_init()
676 led->name = iocled->names[i]; in txx9_iocled_init()
682 pdev->dev.platform_data = &iocled->pdata; in txx9_iocled_init()
690 gpiochip_remove(&iocled->chip); in txx9_iocled_init()
692 iounmap(iocled->mmioaddr); in txx9_iocled_init()
694 kfree(iocled); in txx9_iocled_init()