summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 53bc555)
raw | patch | inline | side by side (parent: 53bc555)
author | Philip, Avinash <avinashphilip@ti.com> | |
Thu, 8 Mar 2012 07:13:28 +0000 (12:43 +0530) | ||
committer | Philip, Avinash <avinashphilip@ti.com> | |
Tue, 13 Mar 2012 13:20:02 +0000 (18:50 +0530) |
This patch registers PWM devices on selective profiles by using new API's
provided for registering PWM devices.
1. EHRPWM.2 on profile #4
2. ECAP.0 device on profile #0, 1, 2 and 7
Also update platform data for HAPTICS with Max frequency of operation set
to 250 Hz as per Haptics specification (Haptic Motors Max RPM is 15000
RPM).
Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
provided for registering PWM devices.
1. EHRPWM.2 on profile #4
2. ECAP.0 device on profile #0, 1, 2 and 7
Also update platform data for HAPTICS with Max frequency of operation set
to 250 Hz as per Haptics specification (Haptic Motors Max RPM is 15000
RPM).
Signed-off-by: Philip, Avinash <avinashphilip@ti.com>
arch/arm/mach-omap2/board-am335xevm.c | patch | blob | history |
index ced0cc9536ef2c0bb5b7084e31d90690dea70329..0d5fa7b75c89c039b86e979e2ac7cbbc860bf7c1 100644 (file)
#include <linux/pwm_backlight.h>
#include <linux/input/ti_tscadc.h>
#include <linux/reboot.h>
+#include <linux/pwm/pwm.h>
/* LCD controller is similar to DA850 */
#include <video/da8xx-fb.h>
}
};
+static struct pwmss_platform_data pwm_pdata[3] = {
+ {
+ .version = PWM_VERSION_1,
+ },
+ {
+ .version = PWM_VERSION_1,
+ },
+ {
+ .version = PWM_VERSION_1,
+ },
+};
+
static int __init ecap0_init(void)
{
int status = 0;
if (backlight_enable) {
+ am33xx_register_ecap(0, &pwm_pdata[0]);
platform_device_register(&am335x_backlight);
}
return status;
}
/* setup haptics */
-#define HAPTICS_MAX_FREQ (250)
-
+#define HAPTICS_MAX_FREQ 250
static void haptics_init(int evm_id, int profile)
{
setup_pin_mux(haptics_pin_mux);
- return;
+ pwm_pdata[2].chan_attrib[1].max_freq = HAPTICS_MAX_FREQ;
+ am33xx_register_ehrpwm(2, &pwm_pdata[2]);
}
/* NAND partition information */