Searched hist:"76 abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d" (Results 1 – 2 of 2) sorted by relevance
/linux/Documentation/ABI/testing/ |
H A D | sysfs-class-pwm | 76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d Tue Jun 11 19:38:59 CEST 2013 H Hartley Sweeten <hartleys@visionengravers.com> pwm: Add sysfs interface
Add a simple sysfs interface to the generic PWM framework.
/sys/class/pwm/ `-- pwmchipN/ for each PWM chip |-- export (w/o) ask the kernel to export a PWM channel |-- npwm (r/o) number of PWM channels in this PWM chip |-- pwmX/ for each exported PWM channel | |-- duty_cycle (r/w) duty cycle (in nanoseconds) | |-- enable (r/w) enable/disable PWM | |-- period (r/w) period (in nanoseconds) | `-- polarity (r/w) polarity of PWM (normal/inversed) `-- unexport (w/o) return a PWM channel to the kernel
Based on work by Lars Poeschel.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Lars Poeschel <poeschel@lemonage.de> Cc: Ryan Mallon <rmallon@gmail.com> Cc: Rob Landley <rob@landley.net> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
|
/linux/drivers/pwm/ |
H A D | pwm-pxa.c | diff 1e185c7aafbb56580feaa5bdbc9e4b1d8efaf710 Thu Aug 08 19:00:37 CEST 2013 Mike Dunn <mikedunn@newsguy.com> pwm: pxa: Use module_platform_driver
Commit 76abbdde2d95a3807d0dc6bf9f84d03d0dbd4f3d
pwm: Add sysfs interface
causes a kernel oops due to a null pointer dereference on PXA platforms. This happens because the class added by the patch is registered in a subsys_initcall (initcall4), but the pxa pwm driver is registered in arch_initcall (initcall3). If the class is not registered before the driver probe function runs, the oops occurs in device_add() when the uninitialized pointers in struct class are dereferenced. I don't see a reason that the driver must be an arch_initcall, so this patch makes it a regular module_platform_driver (initcall6), preventing the oops.
Signed-off-by: Mike Dunn <mikedunn@newsguy.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
|