aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd/sec-core.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-02-19mfd: sec-core: sec_pmic_{suspend,resume}() should depend on CONFIG_PM_SLEEPGeert Uytterhoeven1-0/+2
If CONFIG_PM_SLEEP=n: drivers/mfd/sec-core.c:349: warning: ‘sec_pmic_suspend’ defined but not used drivers/mfd/sec-core.c:371: warning: ‘sec_pmic_resume’ defined but not used Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-25Merge tag 'regulator-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulatorLinus Torvalds1-30/+0
Pull regulator updates from Mark Brown: "A respin of the merges in the previous pull request with one extra fix. A quiet release for the regulator API, quite a large number of small improvements all over but other than the addition of new drivers for the AS3722 and MAX14577 there is nothing of substantial non-local impact" * tag 'regulator-v3.14-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (47 commits) regulator: pfuze100-regulator: Improve dev_info() message regulator: pfuze100-regulator: Fix some checkpatch complaints regulator: twl: Fix checkpatch issue regulator: core: Fix checkpatch issue regulator: anatop-regulator: Remove unneeded memset() regulator: s5m8767: Update LDO index in s5m8767-regulator.txt regulator: as3722: set enable time for SD0/1/6 regulator: as3722: detect SD0 low-voltage mode regulator: tps62360: Fix up a pointer-integer size mismatch warning regulator: anatop-regulator: Remove unneeded kstrdup() regulator: act8865: Fix build error when !OF regulator: act8865: register all regulators regardless of how many are used regulator: wm831x-dcdc: Remove unneeded 'err' label regulator: anatop-regulator: Add MODULE_ALIAS() regulator: act8865: fix incorrect devm_kzalloc for act8865 regulator: act8865: Remove set_suspend_[en|dis]able implementation regulator: act8865: Remove unneeded regulator_unregister() calls regulator: s2mps11: Clean up redundant code regulator: tps65910: Simplify setting enable_mask for regulators regulator: act8865: add device tree binding doc ...
2014-01-21mfd: sec-core: Add cells for S5M8767-clocksTushar Behera1-1/+3
S5M8767 chip has 3 crystal oscillators running at 32KHz. These are supported by s2mps11-clk driver. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Reviewed-by: Tomasz Figa <t.figa@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21mfd: sec-core: Fix sparse NULL pointer warningWei Yongjun1-1/+1
Fixes the following sparse warning: drivers/mfd/sec-core.c:202:16: warning: Using plain integer as NULL pointer Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21mfd: sec: Constify regmap configs and regmap irqsKrzysztof Kozlowski1-4/+4
Add "const" to "static struct regmap_irq" and "static struct regmap_config". Acked-by: Sangbeom Kim <sbkim73@samsung.com> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-21mfd: sec: Add PM ops and make it a wake up sourceKrzysztof Kozlowski1-0/+40
Add PM suspend/resume ops to the sec MFD core driver and make it a wake up source. This allows proper waking from suspend to RAM and also fixes broken interrupts after resuming: [ 42.705703] sec_pmic 7-0066: Failed to read IRQ status: -5 Interrupts stop working after first resume initiated by them (e.g. by RTC Alarm interrupt) because interrupt registers were not cleared properly. When device is woken up from suspend by RTC Alarm, an interrupt occurs before resuming I2C bus controller. The interrupt is handled by regmap_irq_thread which tries to read RTC registers. This read fails (I2C is still suspended) and RTC Alarm interrupt is disabled. Disable the S5M8767 interrupts during suspend (disable_irq()) and enable them during resume so the device will be still woken up but the interrupt won't happen before resuming I2C bus. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-01-06mfd: Constify struct mfd_cell where possibleGeert Uytterhoeven1-4/+4
As of commit 03e361b25ee8dfb1fd9b890072c23c4aae01c6c7 ("mfd: Stop setting refcounting pointers in original mfd_cell arrays"), the "cell" parameter of mfd_add_devices() is "const" again. Hence make all cell data passed to mfd_add_devices() const where possible. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-12-18mfd: sec: Remove sec_reg* regmap helpersKrzysztof Kozlowski1-30/+0
Remove sec_reg* helpers as they are not used anymore. These helpers were error-prone as they mixed u8 with unsigned int and they changed order of some of parameters (val and mask in sec_reg_update()). Also the helpers didn't give any way of useful abstraction as they just called corresponding regmap function. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-12mfd/rtc: s5m: fix register updating by adding regmap for RTCKrzysztof Kozlowski1-8/+22
Rename old regmap field of "struct sec_pmic_dev" to "regmap_pmic" and add new regmap for RTC. On S5M8767A registers were not properly updated and read due to usage of the same regmap as the PMIC. This could be observed in various hangs, e.g. in infinite loop during waiting for UDR field change. On this chip family the RTC has different I2C address than PMIC so additional regmap is needed. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Mark Brown <broonie@linaro.org> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Lee Jones <lee.jones@linaro.org> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-10-23mfd: sec-core: Include linux/of.h headerSachin Kamat1-0/+1
'of_match_ptr' is defined in linux/of.h. Include it explicitly to avoid breakage in the future. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-08-14mfd: sec: Add clock cell for s2mps11Yadwinder Singh Brar1-1/+3
This patch adds clock to list of mfd cells for s2mps11 and DT documentation for clock part. Reviewed-by: Mike Turquette <mturquette@linaro.org> Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-07-31mfd: Use dev_get_platdata()Jingoo Han1-1/+1
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2013-07-31mfd: sec: Add register cache for interrupt mask registersMark Brown1-0/+31
The performance of regmap-irq is improved if the interrupt mask registers can be cached since it does read/modify/update cycles so start using the register cache infrastructure for those registers. We should use this more widely but I don't have a datasheet and this is a nice, conservative starting point. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-07-31mfd: s2mps11: Add device tree supportYadwinder Singh Brar1-0/+3
This patch adds DT compatible string for s2mps11 and binding documentation. Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-07-02mfd: sec: Provide max_register to regmapMark Brown1-1/+40
Enable debugfs register dumps and greater error checking within the regmap API providing the maximum register to the regmap API. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-06-11mfd: sec-core: Remove explicit call to mfd_remove_devicesLeon Romanovsky1-2/+1
In case mfd_add_devices will fail, it will call to mfd_remove_devices by itself and return non-zero value. Signed-off-by: Leon Romanovsky <leon@leon.nu> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-02-04regulator: s5m8767: Fix build in non-DT caseMark Brown1-1/+1
Fix drift in DT parsing function name in the stub code. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-02-04regulator: add device tree support for s5m8767Amit Daniel Kachhap1-2/+73
This device tree support is added for PMIC block of S5m8767 multi function driver. The usage detail is added in the device tree documentation section. This change is tested on exynos5250 based arndale platform by regulator voltage set/get API's. Reviewed-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Tested-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-15mfd: core: Push irqdomain mapping out into devicesMark Brown1-4/+4
Currently the MFD core supports remapping MFD cell interrupts using an irqdomain but only if the MFD is being instantiated using device tree and only if the device tree bindings use the pattern of registering IPs in the device tree with compatible properties. This will be actively harmful for drivers which support non-DT platforms and use this pattern for their DT bindings as it will mean that the core will silently change remapping behaviour and it is also limiting for drivers which don't do DT with this particular pattern. There is also a potential fragility if there are interrupts not associated with MFD cells and all the cells are omitted from the device tree for some reason. Instead change the code to take an IRQ domain as an optional argument, allowing drivers to take the decision about the parent domain for their interrupts. The one current user of this feature is ab8500-core, it has the domain lookup pushed out into the driver. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16mfd: Add samsung s2mps11 mfd supportSangbeom Kim1-0/+10
This patch add Samsung S2MPS11 mfd driver. The S2MPS11 can support regulators and RTC. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16mfd: Modify samsung mfd headerSangbeom Kim1-3/+3
As Prefix of Samsung pmic changed from s5m to s2m, To make common mfd driver for s2m and s5m series, This patch rename header of Samsung mfd and modify mfd driver. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16mfd: Modify samsung mfd driver for common apiSangbeom Kim1-65/+65
Previous naming rule of samsung pmic start with s5m prefix. But It is changed by s2m. To cover various samsung s2m and s5m series, This patch modify function and variable name for common usage. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-07-16mfd: Rename s5m file and directories to samsungSangbeom Kim1-0/+206
Previously, Samsung PMIC naming rule start with prefix of s5m. But Naming rule is changed. From now on, Prefix will be changed to s2m. So, To support pmic series of s5m and s2m, change mfd file and directory name. Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>