13 #include <linux/kernel.h>
17 #include <linux/i2c.h>
19 #include <linux/slab.h>
22 #include <linux/module.h>
24 #define LED_PWM_MASK (0x1F)
25 #define LED_CURRENT_MASK (0x07 << 5)
27 #define LED_BLINK_MASK (0x7F)
29 #define LED_ON_CONTINUOUS (0x0F << 3)
31 #define LED1_BLINK_EN (1 << 1)
32 #define LED2_BLINK_EN (1 << 2)
85 led_power_set(chip, led->
port, 1);
109 led_power_set(chip, led->
port, 0);
113 dev_dbg(chip->
dev,
"Update LED. (reg:%d, brightness:%d)\n",
137 dev_err(&pdev->
dev,
"failed to find leds node\n");
141 if (!of_node_cmp(np->name, data->
name)) {
142 of_property_read_u32(np,
"marvell,88pm860x-iset",
151 #define pm860x_led_dt_init(x, y) (-1)
167 dev_err(&pdev->
dev,
"No REG resource for control\n");
174 dev_err(&pdev->
dev,
"No REG resource for blink\n");
216 data->
cdev.brightness_set = pm860x_led_set;
222 dev_err(&pdev->
dev,
"Failed to register LED: %d\n", ret);
225 pm860x_led_set(&data->
cdev, 0);
234 struct pm860x_led *data = platform_get_drvdata(pdev);
243 .name =
"88pm860x-led",
246 .probe = pm860x_led_probe,
247 .remove = pm860x_led_remove,