Lines Matching refs:lp50xx_dev
79 static int run_led_test(const struct device *lp50xx_dev, uint8_t led) in run_led_test() argument
87 err = led_get_info(lp50xx_dev, led, &info); in run_led_test()
104 err = led_set_color(lp50xx_dev, led, 3, buf); in run_led_test()
114 err = led_on(lp50xx_dev, led); in run_led_test()
122 err = led_off(lp50xx_dev, led); in run_led_test()
131 err = led_set_brightness(lp50xx_dev, led, level); in run_led_test()
142 err = led_off(lp50xx_dev, led); in run_led_test()
158 static int run_channel_test(const struct device *lp50xx_dev, in run_channel_test() argument
179 err = led_get_info(lp50xx_dev, led, &info); in run_channel_test()
193 err = led_write_channels(lp50xx_dev, color_chan, in run_channel_test()
210 err = led_write_channels(lp50xx_dev, in run_channel_test()
225 err = led_write_channels(lp50xx_dev, in run_channel_test()
241 err = led_write_channels(lp50xx_dev, in run_channel_test()
259 err = led_write_channels(lp50xx_dev, in run_channel_test()
274 static int run_test(const struct device *const lp50xx_dev, in run_test() argument
287 err = led_get_info(lp50xx_dev, led, &info); in run_test()
318 err = run_channel_test(lp50xx_dev, max_leds, bright_chan, in run_test()
324 err = run_led_test(lp50xx_dev, led); in run_test()
335 const struct device *lp50xx_dev; in main() local
338 lp50xx_dev = DEVICE_DT_GET_ANY(ti_lp5009); in main()
339 if (lp50xx_dev) { in main()
340 LOG_INF("Found LED controller %s", lp50xx_dev->name); in main()
343 if (device_is_ready(lp50xx_dev)) { in main()
344 run_test(lp50xx_dev, in main()
350 lp50xx_dev->name); in main()
354 lp50xx_dev = DEVICE_DT_GET_ANY(ti_lp5012); in main()
355 if (lp50xx_dev) { in main()
356 LOG_INF("Found LED controller %s", lp50xx_dev->name); in main()
359 if (device_is_ready(lp50xx_dev)) { in main()
360 run_test(lp50xx_dev, in main()
366 lp50xx_dev->name); in main()
370 lp50xx_dev = DEVICE_DT_GET_ANY(ti_lp5018); in main()
371 if (lp50xx_dev) { in main()
372 LOG_INF("Found LED controller %s", lp50xx_dev->name); in main()
375 if (device_is_ready(lp50xx_dev)) { in main()
376 run_test(lp50xx_dev, in main()
382 lp50xx_dev->name); in main()
386 lp50xx_dev = DEVICE_DT_GET_ANY(ti_lp5024); in main()
387 if (lp50xx_dev) { in main()
388 LOG_INF("Found LED controller %s", lp50xx_dev->name); in main()
391 if (device_is_ready(lp50xx_dev)) { in main()
392 run_test(lp50xx_dev, in main()
398 lp50xx_dev->name); in main()
402 lp50xx_dev = DEVICE_DT_GET_ANY(ti_lp5030); in main()
403 if (lp50xx_dev) { in main()
404 LOG_INF("Found LED controller %s", lp50xx_dev->name); in main()
407 if (device_is_ready(lp50xx_dev)) { in main()
408 run_test(lp50xx_dev, in main()
414 lp50xx_dev->name); in main()
418 lp50xx_dev = DEVICE_DT_GET_ANY(ti_lp5036); in main()
419 if (lp50xx_dev) { in main()
420 LOG_INF("Found LED controller %s", lp50xx_dev->name); in main()
423 if (device_is_ready(lp50xx_dev)) { in main()
424 run_test(lp50xx_dev, in main()
430 lp50xx_dev->name); in main()