9 #include <linux/kernel.h>
13 #include <linux/slab.h>
17 #include <linux/module.h>
29 #define MS_TO_CLK(ms) DIV_ROUND_CLOSEST(((ms)*1024), 32000)
30 #define CLK_TO_MS(clk) (((clk)*32000)/1024)
32 #define MAX_MS CLK_TO_MS(MAX_CLK)
44 const struct mfd_cell *cell = mfd_get_cell(pdev);
51 base = led_n_base[cell->
id];
59 unsigned long *delay_on,
60 unsigned long *delay_off)
63 const struct mfd_cell *cell = mfd_get_cell(pdev);
72 if (*delay_on == 0 && *delay_off == 0) {
83 base = led_n_base[cell->
id];
113 led->
cdev->brightness_set = brightness_set;
114 led->
cdev->blink_set = blink_set;
137 static int asic3_led_suspend(
struct device *
dev)
140 const struct mfd_cell *cell = mfd_get_cell(pdev);
150 static int asic3_led_resume(
struct device *dev)
153 const struct mfd_cell *cell = mfd_get_cell(pdev);
158 ret = (*cell->
resume)(pdev);
163 static const struct dev_pm_ops asic3_led_pm_ops = {
164 .suspend = asic3_led_suspend,
165 .resume = asic3_led_resume,
169 .probe = asic3_led_probe,
172 .name =
"leds-asic3",
174 .pm = &asic3_led_pm_ops,