Lines Matching full:led
11 #include <zephyr/drivers/led.h>
14 /* nPM1300 LED base address */
17 /* nPM1300 LED register offsets */
25 /* nPM1300 LED modes */
33 static int led_npm1300_on(const struct device *dev, uint32_t led) in led_npm1300_on() argument
37 if (led >= NPM1300_LED_PINS) { in led_npm1300_on()
41 if (config->mode[led] != NPM_LED_HOST) { in led_npm1300_on()
45 return mfd_npm1300_reg_write(config->mfd, NPM_LED_BASE, NPM_LED_OFFSET_SET + (led * 2U), in led_npm1300_on()
49 static int led_npm1300_off(const struct device *dev, uint32_t led) in led_npm1300_off() argument
53 if (led >= NPM1300_LED_PINS) { in led_npm1300_off()
57 if (config->mode[led] != NPM_LED_HOST) { in led_npm1300_off()
61 return mfd_npm1300_reg_write(config->mfd, NPM_LED_BASE, NPM_LED_OFFSET_CLR + (led * 2U), in led_npm1300_off()
78 for (uint8_t led = 0U; led < NPM1300_LED_PINS; led++) { in led_npm1300_init() local
80 NPM_LED_OFFSET_MODE + led, config->mode[led]); in led_npm1300_init()