Lines Matching +full:led +full:- +full:4
1 // SPDX-License-Identifier: GPL-2.0+
22 #define PCA9551_CTRL_AI (1 << 4) /* Auto-increment flag */
34 static int freq_last = -1;
35 static int mask_last = -1;
36 static int idx_last = -1;
39 static int pca9551_led_get_state(int led, int *state) in pca9551_led_get_state() argument
45 if (led < 0 || led > 7) { in pca9551_led_get_state()
46 return -EINVAL; in pca9551_led_get_state()
47 } else if (led < 4) { in pca9551_led_get_state()
49 shift = led << 1; in pca9551_led_get_state()
52 shift = (led - 4) << 1; in pca9551_led_get_state()
63 static int pca9551_led_set_state(int led, int state) in pca9551_led_set_state() argument
69 if (led < 0 || led > 7) { in pca9551_led_set_state()
70 return -EINVAL; in pca9551_led_set_state()
71 } else if (led < 4) { in pca9551_led_set_state()
73 shift = led << 1; in pca9551_led_set_state()
76 shift = (led - 4) << 1; in pca9551_led_set_state()
106 return -EINVAL; in pca9551_led_set_blink_rate()
165 rate.psc = ((freq * 38) / 1000) - 1; in __led_blink()