13 #include <linux/kernel.h>
16 #include <linux/i2c.h>
19 #include <linux/slab.h>
20 #include <linux/module.h>
22 #define MAX_BRIGHTNESS (0xff)
23 #define MIN_BRIGHTNESS (0)
25 #define LWX_FREQ(x) (((x - 601) / 100) & 0x7)
59 dev_dbg(chip->
dev,
"set brightness %d\n", value);
63 dev_dbg(chip->
dev,
"set brightness %d failure with return value:%d\n",
81 return max8925_backlight_set(bl, brightness);
100 .update_status = max8925_backlight_update_status,
101 .get_brightness = max8925_backlight_get_brightness,
122 dev_err(&pdev->
dev,
"No REG resource for mode control!\n");
129 dev_err(&pdev->
dev,
"No REG resource for control!\n");
142 &max8925_backlight_ops, &props);
144 dev_err(&pdev->
dev,
"failed to register backlight\n");
150 platform_set_drvdata(pdev, bl);
165 backlight_update_status(bl);
184 .name =
"max8925-backlight",
187 .probe = max8925_backlight_probe,