diff options
author | Xiubo Li <Li.Xiubo@freescale.com> | 2014-10-14 03:18:25 (GMT) |
---|---|---|
committer | Matthew Weigel <Matthew.Weigel@freescale.com> | 2014-12-11 18:38:07 (GMT) |
commit | f84d9a26b0f971658a1355e990a8551096ab4f6c (patch) | |
tree | a808f1e5573b63434d9c911400108fe38b0ace6d /drivers/pwm | |
parent | bac0ced033e447d5ae496b791483354b69574669 (diff) | |
download | linux-fsl-qoriq-f84d9a26b0f971658a1355e990a8551096ab4f6c.tar.xz |
pwm: ftm: add regmap rbtree type cache support.
This patch is to prepare for adding PM support for FTM pwm driver
using callback function suspend and resume in .driver.pm of
platform_driver.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
upstream link: http://patchwork.ozlabs.org/patch/399752/
it is under discussion.
Change-Id: I517f27b696b6eeeae880e3bd71b122995194127f
Reviewed-on: http://git.am.freescale.net:8181/21349
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Dongsheng Wang <dongsheng.wang@freescale.com>
Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r-- | drivers/pwm/pwm-fsl-ftm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/pwm/pwm-fsl-ftm.c b/drivers/pwm/pwm-fsl-ftm.c index 1150598..9bfbea5 100644 --- a/drivers/pwm/pwm-fsl-ftm.c +++ b/drivers/pwm/pwm-fsl-ftm.c @@ -397,12 +397,23 @@ static int fsl_pwm_init(struct fsl_pwm_chip *fpc) return 0; } +static bool fsl_pwm_volatile_reg(struct device *dev, unsigned int reg) +{ + switch (reg) { + case FTM_CNT: + return true; + } + return false; +} + static const struct regmap_config fsl_pwm_regmap_config = { .reg_bits = 32, .reg_stride = 4, .val_bits = 32, .max_register = FTM_PWMLOAD, + .volatile_reg = fsl_pwm_volatile_reg, + .cache_type = REGCACHE_RBTREE, }; static int fsl_pwm_probe(struct platform_device *pdev) |