Lines Matching +full:led +full:- +full:7
4 * SPDX-License-Identifier: GPL-2.0+
23 #define PCA9551_CTRL_AI (1 << 4) /* Auto-increment flag */
35 static int freq_last = -1;
36 static int mask_last = -1;
37 static int idx_last = -1;
40 static int pca9551_led_get_state(int led, int *state) in pca9551_led_get_state() argument
46 if (led < 0 || led > 7) { in pca9551_led_get_state()
47 return -EINVAL; in pca9551_led_get_state()
48 } else if (led < 4) { in pca9551_led_get_state()
50 shift = led << 1; in pca9551_led_get_state()
53 shift = (led - 4) << 1; in pca9551_led_get_state()
64 static int pca9551_led_set_state(int led, int state) in pca9551_led_set_state() argument
70 if (led < 0 || led > 7) { in pca9551_led_set_state()
71 return -EINVAL; in pca9551_led_set_state()
72 } else if (led < 4) { in pca9551_led_set_state()
74 shift = led << 1; in pca9551_led_set_state()
77 shift = (led - 4) << 1; in pca9551_led_set_state()
107 return -EINVAL; in pca9551_led_set_blink_rate()
166 rate.psc = ((freq * 38) / 1000) - 1; in __led_blink()