diff options
Diffstat (limited to 'patches.tizen/0580-mfd-max77686-Enable-register-cache.patch')
-rw-r--r-- | patches.tizen/0580-mfd-max77686-Enable-register-cache.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/patches.tizen/0580-mfd-max77686-Enable-register-cache.patch b/patches.tizen/0580-mfd-max77686-Enable-register-cache.patch new file mode 100644 index 00000000000..c1e90f125c5 --- /dev/null +++ b/patches.tizen/0580-mfd-max77686-Enable-register-cache.patch @@ -0,0 +1,50 @@ +From e580fd18f56242cc81c2bc1b7837adf64ba87315 Mon Sep 17 00:00:00 2001 +From: Tomasz Figa <t.figa@samsung.com> +Date: Fri, 23 Aug 2013 18:41:27 +0200 +Subject: [PATCH 0580/1302] mfd: max77686: Enable register cache + +This patch enables flat register cache for max77686 PMIC register to +speed up operations like getting regulator voltage or clock status. + +Signed-off-by: Tomasz Figa <t.figa@samsung.com> +Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> +--- + drivers/mfd/max77686.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c +index 91c81cd..195ac96 100644 +--- a/drivers/mfd/max77686.c ++++ b/drivers/mfd/max77686.c +@@ -39,9 +39,28 @@ static struct mfd_cell max77686_devs[] = { + { .name = "max77686-rtc", }, + }; + ++static bool max77686_volatile(struct device *dev, unsigned int reg) ++{ ++ switch (reg) { ++ case MAX77686_REG_INTSRC: ++ case MAX77686_REG_INT1: ++ case MAX77686_REG_INT2: ++ case MAX77686_REG_STATUS1: ++ case MAX77686_REG_STATUS2: ++ case MAX77686_REG_PWRON: ++ return true; ++ default: ++ return false; ++ } ++} ++ + static struct regmap_config max77686_regmap_config = { + .reg_bits = 8, + .val_bits = 8, ++ .max_register = MAX77686_REG_PMIC_END, ++ .cache_type = REGCACHE_FLAT, ++ .volatile_reg = max77686_volatile, ++ .num_reg_defaults_raw = MAX77686_REG_PMIC_END, + }; + + #ifdef CONFIG_OF +-- +1.8.3.2 + |