From 52874d785a2a9e2a8f819635faac36942596375f Mon Sep 17 00:00:00 2001 From: Xin Xie Date: Fri, 11 Mar 2011 19:04:15 -0800 Subject: regulator: tps6586x: add PFM/PWM options on SMs supply TPS6586x SM0, SM1 and SM2 port have 2 power switching modes: - PWM only, or - PMW-PFM auto mode Some of TPS6586x have voltage spike in PFM-to-FWM transition can lockup the CPU if choose PWM-PFM auto mode. This patch enables such mode selection on SMs ports from the board level power configuration file. BUG 796364 Change-Id: I7015798151d6753ff5dcc329703338fde105e2b0 Reviewed-on: http://git-master/r/22701 Reviewed-by: Varun Colbert Tested-by: Varun Colbert Reviewed-by: Xin Xie Tested-by: Xin Xie --- include/linux/mfd/tps6586x.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include') diff --git a/include/linux/mfd/tps6586x.h b/include/linux/mfd/tps6586x.h index 9002714f1f68..c98b6fa4148b 100644 --- a/include/linux/mfd/tps6586x.h +++ b/include/linux/mfd/tps6586x.h @@ -1,6 +1,10 @@ #ifndef __LINUX_MFD_TPS6586X_H #define __LINUX_MFD_TPS6586X_H +#define SM0_PWM_BIT 0 +#define SM1_PWM_BIT 1 +#define SM2_PWM_BIT 2 + enum { TPS6586X_ID_SM_0, TPS6586X_ID_SM_1, @@ -48,6 +52,17 @@ enum { TPS6586X_INT_RTC_ALM2, }; +enum pwm_pfm_mode { + PWM_ONLY, + AUTO_PWM_PFM, + NOT_CONFIGURABLE +}; + +struct tps6586x_settings { + /* SM0, SM1 and SM2 have PWM-only and auto PWM/PFM mode */ + enum pwm_pfm_mode sm_pwm_mode; +}; + struct tps6586x_subdev_info { int id; const char *name; -- cgit v1.2.3