You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'pwm/for-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
Pull pwm changes from Thierry Reding: "Mostly bug fixes and clean up. There is a new driver, which is actually moving a custom PWM driver from drivers/misc. The majority of the patches are enhancements to the device tree support in the pwm-backlight driver. Backlights can now additionally be powered using a regulator and enabled using a GPIO in addition to just the PWM input" * tag 'pwm/for-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (30 commits) Documentation/pwm: Update supported SoC name for pwm-samsung pwm: samsung: Fix kernel warning while unexporting a channel MAINTAINERS: Move PWM subsystem tree to kernel.org Documentation/pwm: Fix trivial typos pwm-backlight: Remove unused variable pwm_backlight: avoid short blank screen while doing hibernation pwm-backlight: Fix brightness adjustment pwm: add ep93xx PWM support pwm-backlight: Allow for non-increasing brightness levels pwm-backlight: Add power supply support pwm-backlight: Use new enable_gpio field unicore32: Initialize PWM backlight enable_gpio field ARM: shmobile: Initialize PWM backlight enable_gpio field ARM: SAMSUNG: Initialize PWM backlight enable_gpio field ARM: pxa: Initialize PWM backlight enable_gpio field ARM: OMAP: Initialize PWM backlight enable_gpio field pwm-backlight: Add optional enable GPIO pwm-backlight: Track enable state pwm-backlight: Refactor backlight power on/off pwm-backlight: Improve readability ...
This commit is contained in:
@@ -15,7 +15,7 @@ Required properties:
|
||||
samsung,s5pc100-pwm - for 32-bit timers present on S5PC100, S5PV210,
|
||||
Exynos4210 rev0 SoCs
|
||||
samsung,exynos4210-pwm - for 32-bit timers present on Exynos4210,
|
||||
Exynos4x12 and Exynos5250 SoCs
|
||||
Exynos4x12, Exynos5250 and Exynos5420 SoCs
|
||||
- reg: base address and size of register area
|
||||
- interrupts: list of timer interrupts (one interrupt per timer, starting at
|
||||
timer 0)
|
||||
|
||||
@@ -10,12 +10,16 @@ Required properties:
|
||||
last value in the array represents a 100% duty cycle (brightest).
|
||||
- default-brightness-level: the default brightness level (index into the
|
||||
array defined by the "brightness-levels" property)
|
||||
- power-supply: regulator for supply voltage
|
||||
|
||||
Optional properties:
|
||||
- pwm-names: a list of names for the PWM devices specified in the
|
||||
"pwms" property (see PWM binding[0])
|
||||
- enable-gpios: contains a single GPIO specifier for the GPIO which enables
|
||||
and disables the backlight (see GPIO binding[1])
|
||||
|
||||
[0]: Documentation/devicetree/bindings/pwm/pwm.txt
|
||||
[1]: Documentation/devicetree/bindings/gpio/gpio.txt
|
||||
|
||||
Example:
|
||||
|
||||
@@ -25,4 +29,7 @@ Example:
|
||||
|
||||
brightness-levels = <0 4 8 16 32 64 128 255>;
|
||||
default-brightness-level = <6>;
|
||||
|
||||
power-supply = <&vdd_bl_reg>;
|
||||
enable-gpios = <&gpio 58 0>;
|
||||
};
|
||||
|
||||
@@ -39,7 +39,7 @@ New users should use the pwm_get() function and pass to it the consumer
|
||||
device or a consumer name. pwm_put() is used to free the PWM device. Managed
|
||||
variants of these functions, devm_pwm_get() and devm_pwm_put(), also exist.
|
||||
|
||||
After being requested a PWM has to be configured using:
|
||||
After being requested, a PWM has to be configured using:
|
||||
|
||||
int pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns);
|
||||
|
||||
@@ -94,7 +94,7 @@ for new drivers to use the generic PWM framework.
|
||||
A new PWM controller/chip can be added using pwmchip_add() and removed
|
||||
again with pwmchip_remove(). pwmchip_add() takes a filled in struct
|
||||
pwm_chip as argument which provides a description of the PWM chip, the
|
||||
number of PWM devices provider by the chip and the chip-specific
|
||||
number of PWM devices provided by the chip and the chip-specific
|
||||
implementation of the supported PWM operations to the framework.
|
||||
|
||||
Locking
|
||||
|
||||
+1
-2
@@ -6785,8 +6785,7 @@ PWM SUBSYSTEM
|
||||
M: Thierry Reding <thierry.reding@gmail.com>
|
||||
L: linux-pwm@vger.kernel.org
|
||||
S: Maintained
|
||||
W: http://gitorious.org/linux-pwm
|
||||
T: git git://gitorious.org/linux-pwm/linux-pwm.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm.git
|
||||
F: Documentation/pwm.txt
|
||||
F: Documentation/devicetree/bindings/pwm/
|
||||
F: include/linux/pwm.h
|
||||
|
||||
@@ -310,6 +310,7 @@ static struct platform_pwm_backlight_data cm_x300_backlight_data = {
|
||||
.max_brightness = 100,
|
||||
.dft_brightness = 100,
|
||||
.pwm_period_ns = 10000,
|
||||
.enable_gpio = -1,
|
||||
};
|
||||
|
||||
static struct platform_device cm_x300_backlight_device = {
|
||||
|
||||
@@ -189,6 +189,7 @@ static struct platform_pwm_backlight_data income_backlight_data = {
|
||||
.max_brightness = 0x3ff,
|
||||
.dft_brightness = 0x1ff,
|
||||
.pwm_period_ns = 1000000,
|
||||
.enable_gpio = -1,
|
||||
};
|
||||
|
||||
static struct platform_device income_backlight = {
|
||||
|
||||
@@ -54,6 +54,7 @@ static struct platform_pwm_backlight_data ezx_backlight_data = {
|
||||
.max_brightness = 1023,
|
||||
.dft_brightness = 1023,
|
||||
.pwm_period_ns = 78770,
|
||||
.enable_gpio = -1,
|
||||
};
|
||||
|
||||
static struct platform_device ezx_backlight_device = {
|
||||
|
||||
@@ -561,6 +561,7 @@ static struct platform_pwm_backlight_data backlight_data = {
|
||||
.max_brightness = 200,
|
||||
.dft_brightness = 100,
|
||||
.pwm_period_ns = 30923,
|
||||
.enable_gpio = -1,
|
||||
};
|
||||
|
||||
static struct platform_device backlight = {
|
||||
|
||||
@@ -269,6 +269,7 @@ static struct platform_pwm_backlight_data lpd270_backlight_data = {
|
||||
.max_brightness = 1,
|
||||
.dft_brightness = 1,
|
||||
.pwm_period_ns = 78770,
|
||||
.enable_gpio = -1,
|
||||
};
|
||||
|
||||
static struct platform_device lpd270_backlight_device = {
|
||||
|
||||
@@ -378,6 +378,7 @@ static struct platform_pwm_backlight_data backlight_data = {
|
||||
.max_brightness = 272,
|
||||
.dft_brightness = 100,
|
||||
.pwm_period_ns = 30923,
|
||||
.enable_gpio = -1,
|
||||
.init = magician_backlight_init,
|
||||
.notify = magician_backlight_notify,
|
||||
.exit = magician_backlight_exit,
|
||||
|
||||
@@ -338,6 +338,7 @@ static struct platform_pwm_backlight_data mainstone_backlight_data = {
|
||||
.max_brightness = 1023,
|
||||
.dft_brightness = 1023,
|
||||
.pwm_period_ns = 78770,
|
||||
.enable_gpio = -1,
|
||||
};
|
||||
|
||||
static struct platform_device mainstone_backlight_device = {
|
||||
|
||||
@@ -186,6 +186,7 @@ static struct platform_pwm_backlight_data mioa701_backlight_data = {
|
||||
.max_brightness = 100,
|
||||
.dft_brightness = 50,
|
||||
.pwm_period_ns = 4000 * 1024, /* Fl = 250kHz */
|
||||
.enable_gpio = -1,
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -322,6 +322,7 @@ static struct platform_pwm_backlight_data palm27x_backlight_data = {
|
||||
.max_brightness = 0xfe,
|
||||
.dft_brightness = 0x7e,
|
||||
.pwm_period_ns = 3500 * 1024,
|
||||
.enable_gpio = -1,
|
||||
.init = palm27x_backlight_init,
|
||||
.notify = palm27x_backlight_notify,
|
||||
.exit = palm27x_backlight_exit,
|
||||
|
||||
@@ -166,45 +166,12 @@ static inline void palmtc_keys_init(void) {}
|
||||
* Backlight
|
||||
******************************************************************************/
|
||||
#if defined(CONFIG_BACKLIGHT_PWM) || defined(CONFIG_BACKLIGHT_PWM_MODULE)
|
||||
static int palmtc_backlight_init(struct device *dev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = gpio_request(GPIO_NR_PALMTC_BL_POWER, "BL POWER");
|
||||
if (ret)
|
||||
goto err;
|
||||
ret = gpio_direction_output(GPIO_NR_PALMTC_BL_POWER, 1);
|
||||
if (ret)
|
||||
goto err2;
|
||||
|
||||
return 0;
|
||||
|
||||
err2:
|
||||
gpio_free(GPIO_NR_PALMTC_BL_POWER);
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int palmtc_backlight_notify(struct device *dev, int brightness)
|
||||
{
|
||||
/* backlight is on when GPIO16 AF0 is high */
|
||||
gpio_set_value(GPIO_NR_PALMTC_BL_POWER, brightness);
|
||||
return brightness;
|
||||
}
|
||||
|
||||
static void palmtc_backlight_exit(struct device *dev)
|
||||
{
|
||||
gpio_free(GPIO_NR_PALMTC_BL_POWER);
|
||||
}
|
||||
|
||||
static struct platform_pwm_backlight_data palmtc_backlight_data = {
|
||||
.pwm_id = 1,
|
||||
.max_brightness = PALMTC_MAX_INTENSITY,
|
||||
.dft_brightness = PALMTC_MAX_INTENSITY,
|
||||
.pwm_period_ns = PALMTC_PERIOD_NS,
|
||||
.init = palmtc_backlight_init,
|
||||
.notify = palmtc_backlight_notify,
|
||||
.exit = palmtc_backlight_exit,
|
||||
.enable_gpio = GPIO_NR_PALMTC_BL_POWER,
|
||||
};
|
||||
|
||||
static struct platform_device palmtc_backlight = {
|
||||
|
||||
@@ -165,6 +165,7 @@ static struct platform_pwm_backlight_data palmte2_backlight_data = {
|
||||
.max_brightness = PALMTE2_MAX_INTENSITY,
|
||||
.dft_brightness = PALMTE2_MAX_INTENSITY,
|
||||
.pwm_period_ns = PALMTE2_PERIOD_NS,
|
||||
.enable_gpio = -1,
|
||||
.init = palmte2_backlight_init,
|
||||
.notify = palmte2_backlight_notify,
|
||||
.exit = palmte2_backlight_exit,
|
||||
|
||||
@@ -153,6 +153,7 @@ static struct platform_pwm_backlight_data pcm990_backlight_data = {
|
||||
.max_brightness = 1023,
|
||||
.dft_brightness = 1023,
|
||||
.pwm_period_ns = 78770,
|
||||
.enable_gpio = -1,
|
||||
};
|
||||
|
||||
static struct platform_device pcm990_backlight_device = {
|
||||
|
||||
@@ -539,6 +539,7 @@ static struct platform_pwm_backlight_data raumfeld_pwm_backlight_data = {
|
||||
.dft_brightness = 100,
|
||||
/* 10000 ns = 10 ms ^= 100 kHz */
|
||||
.pwm_period_ns = 10000,
|
||||
.enable_gpio = -1,
|
||||
};
|
||||
|
||||
static struct platform_device raumfeld_pwm_backlight_device = {
|
||||
|
||||
@@ -175,6 +175,7 @@ static struct platform_pwm_backlight_data tavorevb_backlight_data[] = {
|
||||
.max_brightness = 100,
|
||||
.dft_brightness = 100,
|
||||
.pwm_period_ns = 100000,
|
||||
.enable_gpio = -1,
|
||||
},
|
||||
[1] = {
|
||||
/* secondary backlight */
|
||||
@@ -182,6 +183,7 @@ static struct platform_pwm_backlight_data tavorevb_backlight_data[] = {
|
||||
.max_brightness = 100,
|
||||
.dft_brightness = 100,
|
||||
.pwm_period_ns = 100000,
|
||||
.enable_gpio = -1,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -401,6 +401,7 @@ static struct platform_pwm_backlight_data viper_backlight_data = {
|
||||
.max_brightness = 100,
|
||||
.dft_brightness = 100,
|
||||
.pwm_period_ns = 1000000,
|
||||
.enable_gpio = -1,
|
||||
.init = viper_backlight_init,
|
||||
.notify = viper_backlight_notify,
|
||||
.exit = viper_backlight_exit,
|
||||
|
||||
@@ -206,6 +206,7 @@ static struct platform_pwm_backlight_data z2_backlight_data[] = {
|
||||
.max_brightness = 1023,
|
||||
.dft_brightness = 0,
|
||||
.pwm_period_ns = 1260320,
|
||||
.enable_gpio = -1,
|
||||
},
|
||||
[1] = {
|
||||
/* LCD Backlight */
|
||||
@@ -213,6 +214,7 @@ static struct platform_pwm_backlight_data z2_backlight_data[] = {
|
||||
.max_brightness = 1023,
|
||||
.dft_brightness = 512,
|
||||
.pwm_period_ns = 1260320,
|
||||
.enable_gpio = -1,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user