mfd: pm8xxx-pwm: add pre-divide=6 and update macros
Add pre-divide=6 and update the max period based on new pre-divide.
Also update pre-divide related macros for better readability.
Change-Id: I5298c373c78f8723dab9a735e4d94f89798800d5
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
diff --git a/include/linux/mfd/pm8xxx/pwm.h b/include/linux/mfd/pm8xxx/pwm.h
index be3ec65..9169e90 100644
--- a/include/linux/mfd/pm8xxx/pwm.h
+++ b/include/linux/mfd/pm8xxx/pwm.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -17,8 +17,8 @@
#define PM8XXX_PWM_DEV_NAME "pm8xxx-pwm"
-#define PM8XXX_PWM_PERIOD_MAX (327 * USEC_PER_SEC)
-#define PM8XXX_PWM_PERIOD_MIN 7 /* micro seconds */
+#define PM8XXX_PWM_PERIOD_MIN 7 /* usec: 19.2M, n=6, m=0, pre=2 */
+#define PM8XXX_PWM_PERIOD_MAX (384 * USEC_PER_SEC) /* 1K, n=9, m=7, pre=6 */
#define PM_PWM_LUT_SIZE 64
#define PM_PWM_LUT_DUTY_TIME_MAX 512 /* ms */