Lines Matching +full:led +full:- +full:7 +full:seg
1 // SPDX-License-Identifier: GPL-2.0
3 * Driver for a 7-segment LED display
5 * The decimal point LED present on some devices is currently not
22 #include "line-display.h"
33 struct linedisp *linedisp = &priv->linedisp; in seg_led_update()
34 struct linedisp_map *map = linedisp->map; in seg_led_update()
37 bitmap_set_value8(values, map_to_seg7(&map->map.seg7, linedisp->buf[0]), 0); in seg_led_update()
39 gpiod_set_array_value_cansleep(priv->segment_gpios->ndescs, priv->segment_gpios->desc, in seg_led_update()
40 priv->segment_gpios->info, values); in seg_led_update()
47 INIT_DELAYED_WORK(&priv->work, seg_led_update); in seg_led_linedisp_get_map_type()
55 schedule_delayed_work(&priv->work, 0); in seg_led_linedisp_update()
66 struct device *dev = &pdev->dev; in seg_led_probe()
70 return -ENOMEM; in seg_led_probe()
74 priv->segment_gpios = devm_gpiod_get_array(dev, "segment", GPIOD_OUT_LOW); in seg_led_probe()
75 if (IS_ERR(priv->segment_gpios)) in seg_led_probe()
76 return PTR_ERR(priv->segment_gpios); in seg_led_probe()
78 if (priv->segment_gpios->ndescs < 7 || priv->segment_gpios->ndescs > 8) in seg_led_probe()
79 return -EINVAL; in seg_led_probe()
81 return linedisp_register(&priv->linedisp, dev, 1, &seg_led_linedisp_ops); in seg_led_probe()
88 cancel_delayed_work_sync(&priv->work); in seg_led_remove()
89 linedisp_unregister(&priv->linedisp); in seg_led_remove()
93 { .compatible = "gpio-7-segment"},
102 .name = "seg-led-gpio",
109 MODULE_DESCRIPTION("7 segment LED driver");