mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge commit 'v3.1-rc9' into fbdev-next
This commit is contained in:
commit
07aaae44f5
925 changed files with 8858 additions and 5716 deletions
|
|
@ -1008,4 +1008,4 @@ module_exit(adp8870_exit);
|
|||
MODULE_LICENSE("GPL v2");
|
||||
MODULE_AUTHOR("Michael Hennerich <[email protected]>");
|
||||
MODULE_DESCRIPTION("ADP8870 Backlight driver");
|
||||
MODULE_ALIAS("platform:adp8870-backlight");
|
||||
MODULE_ALIAS("i2c:adp8870-backlight");
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include <asm/backlight.h>
|
||||
#endif
|
||||
|
||||
static const char const *backlight_types[] = {
|
||||
static const char *const backlight_types[] = {
|
||||
[BACKLIGHT_RAW] = "raw",
|
||||
[BACKLIGHT_PLATFORM] = "platform",
|
||||
[BACKLIGHT_FIRMWARE] = "firmware",
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
* BRIGHT, on the Cirrus EP9307, EP9312, and EP9315 processors.
|
||||
*/
|
||||
|
||||
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/fb.h>
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ struct pwm_bl_data {
|
|||
unsigned int lth_brightness;
|
||||
int (*notify)(struct device *,
|
||||
int brightness);
|
||||
void (*notify_after)(struct device *,
|
||||
int brightness);
|
||||
int (*check_fb)(struct device *, struct fb_info *);
|
||||
};
|
||||
|
||||
|
|
@ -55,6 +57,10 @@ static int pwm_backlight_update_status(struct backlight_device *bl)
|
|||
pwm_config(pb->pwm, brightness, pb->period);
|
||||
pwm_enable(pb->pwm);
|
||||
}
|
||||
|
||||
if (pb->notify_after)
|
||||
pb->notify_after(pb->dev, brightness);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -105,6 +111,7 @@ static int pwm_backlight_probe(struct platform_device *pdev)
|
|||
|
||||
pb->period = data->pwm_period_ns;
|
||||
pb->notify = data->notify;
|
||||
pb->notify_after = data->notify_after;
|
||||
pb->check_fb = data->check_fb;
|
||||
pb->lth_brightness = data->lth_brightness *
|
||||
(data->pwm_period_ns / data->max_brightness);
|
||||
|
|
@ -172,6 +179,8 @@ static int pwm_backlight_suspend(struct platform_device *pdev,
|
|||
pb->notify(pb->dev, 0);
|
||||
pwm_config(pb->pwm, 0, pb->period);
|
||||
pwm_disable(pb->pwm);
|
||||
if (pb->notify_after)
|
||||
pb->notify_after(pb->dev, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue