aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mfd/samsung
AgeCommit message (Collapse)AuthorFilesLines
2023-04-26rtc: s5m: Drop S5M8763 supportDavid Virag2-51/+0
The S5M8763 MFD has no device tree compatible, and since board file support for it was removed, there's no way to use this MFD. After removing the remaining code for it from the MFD driver, also remove support for it in the s5m RTC driver, and all remaining references to it. Signed-off-by: David Virag <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-04-26mfd: sec: Remove PMICs without compatiblesDavid Virag2-91/+0
The S5M8751 and S5M8763 PMIC chips have no corresponding compatible values, so since board file support was removed for this driver, there is no way to specify these PMICs as present in boards anymore. Remove leftovers of these chips since it's dead code. Signed-off-by: David Virag <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-02mfd: sec: Remove unused platform data membersKrzysztof Kozlowski1-25/+0
The Samsung PMIC drivers for early chipsets like S5M8767 stored quite a lot in platform data (struct sec_platform_data). The s5m8767 regulator driver currently references only some of its fields. Newer regulator drivers (e.g. s2mps11) use even less platform data fields. Clean up the structure to reduce memory footprint and source code size. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-06-02mfd: sec: Enable wakeup from suspend via devicetree propertyKrzysztof Kozlowski1-3/+0
Set device wakeup capability from devicetree property (done by drivers core), instead of always setting it to 0 (because value in platform data is not assigned). This should not have visible effect on actual resuming from suspend because the child device - S5M RTC driver - is responsible for waking up and sets device wakeup unconditionally. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-06-02mfd: sec: Remove unused irq_base in platform dataKrzysztof Kozlowski1-3/+0
The 'irq_base' field of platform data structure is not assigned, therefore its default value of 0 has no impact and can be safely dropped. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-06-02mfd: sec: Remove unused device_type in platform dataKrzysztof Kozlowski1-1/+0
The 'device_type' field of platform data structure is not used and can be safely dropped. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2021-06-02mfd: sec: Remove unused cfg_pmic_irq in platform dataKrzysztof Kozlowski1-1/+0
The 'cfg_pmic_irq' field of platform data structure is not used and can be safely dropped. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2019-07-04Merge branch 'regulator-5.3' into regulator-nextMark Brown1-0/+5
2019-07-02regulator: s2mps11: Adjust supported buck voltages to real valuesKrzysztof Kozlowski2-1/+4
The driver was registering buck regulators with unsupported range of voltages for S2MPS11 devices. Basically it assumed that all 256 values are possible for a single 8-bit I2C register controlling buck's voltage. This is not true, as datasheet describes subset of these which can be used. For example for buck[12346] the minimum voltage is 650 mV which corresponds to register value of 0x8. The driver was however registering regulator starting at 600 mV, so for a step of 6.25 mV this gave the same result. However this allowed to try to configure regulators to unsupported values. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2019-06-24regulator: s2mps11: Add support for disabling S2MPS11 regulators in suspendKrzysztof Kozlowski1-0/+5
The driver supported turning off regulators in suspend only for S2MPS14 device. However this makes also sense for S2MPS11 and can reduce the power consumption during suspend to RAM. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-10-23mfd: sec-core: Add SPDX license identifiersKrzysztof Kozlowski11-109/+16
Replace GPL v2.0+ license statements with SPDX license identifiers. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2018-05-24regulator: s5m8767: Pass descriptor instead of GPIO numberLinus Walleij1-1/+3
Instead of passing a global GPIO number for the enable GPIO, pass a descriptor looked up from the device tree node for the regulator. This regulator supports passing platform data, but enable/sleep regulators are looked up from the device tree exclusively, so we can need not touch other files. Signed-off-by: Linus Walleij <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2018-03-17rtc: s5m: Move enum from rtc.h to rtc-s5m.cGustavo A. R. Silva1-11/+0
Move this enum to rtc-s5m.c once it is meaningless to others drivers [1]. [1] https://marc.info/?l=linux-rtc&m=152060068925948&w=2 Suggested-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2016-05-13Merge remote-tracking branches 'regulator/topic/pwm', ↵Mark Brown1-0/+3
'regulator/topic/qcom-spmi', 'regulator/topic/rk808' and 'regulator/topic/s2mps11' into regulator-next
2016-04-18regulator: s2mps11: Set default ramp delay for S2MPS11 LDOsKrzysztof Kozlowski1-0/+3
Driver did not provide default value for ramp delay for LDOs which lead to warning in dmesg, e.g. on Odroid XU4: [ 1.486076] vdd_ldo9: ramp_delay not set [ 1.506875] vddq_mmc2: ramp_delay not set [ 1.523766] vdd_ldo15: ramp_delay not set [ 1.544702] vdd_sd: ramp_delay not set The datasheet for all the S2MPS1x family is inconsistent here and does not specify unambiguously the value of ramp delay for LDO. It mentions 30 mV/us in one timing diagram but then omits it completely in LDO regulator characteristics table (it is specified for bucks). However the vendor kernels for Galaxy S5 and Odroid XU3 use values of 12 mV/us or 24 mV/us. Without the ramp delay value the consumers do not wait for voltage settle after changing it. Although the proper value of ramp delay for LDOs is unknown, it seems safer to use at least some value from reference kernel than to leave it unset. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-03-28regulator: s2mps11: Fix invalid selector mask and voltages for buck9Krzysztof Kozlowski1-0/+2
The buck9 regulator of S2MPS11 PMIC had incorrect vsel_mask (0xff instead of 0x1f) thus reading entire register as buck9's voltage. This effectively caused regulator core to interpret values as higher voltages than they were and then to set real voltage much lower than intended. The buck9 provides power to other regulators, including LDO13 and LDO19 which supply the MMC2 (SD card). On Odroid XU3/XU4 the lower voltage caused SD card detection errors on Odroid XU3/XU4: mmc1: card never left busy state mmc1: error -110 whilst initialising SD card During driver probe the regulator core was checking whether initial voltage matches the constraints. With incorrect vsel_mask of 0xff and default value of 0x50, the core interpreted this as 5 V which is outside of constraints (3-3.775 V). Then the regulator core was adjusting the voltage to match the constraints. With incorrect vsel_mask this new voltage mapped to a vere low voltage in the driver. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Tested-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: <[email protected]>
2016-01-11rtc: s5m: Make register configuration per S2MPS device to remove exceptionsKrzysztof Kozlowski1-0/+2
Before updating time and alarm the driver must set appropriate mask in UDR register. For that purpose the driver uses common register configuration and a lot of exceptions per device in the code. The exceptions are not obvious, for example except the change in the logic sometimes the fields are swapped (WUDR and AUDR between S2MPS14 and S2MPS15). This leads to quite complicated code. Try to make it more obvious by: 1. Documenting the UDR masks for devices and operations. 2. Adding fields in register configuration structure for each operation (read time, write time and alarm). 3. Splitting the configuration per S2MPS13, S2MPS14 and S2MPS15 thus removing exceptions for them. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Alim Akhtar <[email protected]> Tested-by: Alim Akhtar <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Alexandre Belloni <[email protected]>
2015-11-23rtc: s5m.c: Add support for S2MPS15 RTCAlim Akhtar1-0/+2
RTC found in s2mps15 is almost same as one found on s2mps13 with few differences in RTC_UPDATE register fields, like: 1> Bit[4] and Bit[1] are reversed - On s2mps13 WUDR -> bit[4], AUDR -> bit[1] - On s2mps15 WUDR -> bit[1], AUDR -> bit[4] 2> In case of s2mps13, for alarm register, need to set both WDUR and ADUR high, whereas for s2mps15 only set AUDR to high. 3> On s2mps15, WUDR, RUDR and AUDR functions should never be used at the same time. This patch add required changes to enable s2mps15 rtc timer. Signed-off-by: Alim Akhtar <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Acked-by: Alexandre Belloni <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-11-23mfd: sec: Add support for S2MPS15 PMICThomas Abraham2-0/+159
Add support for S2MPS15 PMIC which is similar to S2MPS11 PMIC. The S2MPS15 PMIC supports 27 LDO regulators, 10 buck regulators, RTC, three 32.768KHz clock outputs and battery charger. This patch adds initial support for LDO and buck regulators of S2MPS15 device. Signed-off-by: Thomas Abraham <[email protected]> Signed-off-by: Alim Akhtar <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> [Alim: Added s2mps15_devs like rtc and clk and related changes] Signed-off-by: Lee Jones <[email protected]>
2015-10-30mfd: sec-core: Disable buck voltage reset on watchdog falling edgeKrzysztof Kozlowski2-0/+3
The WRSTBI bit (disabled by default but enabled by bootloader), when set, is responsible for resetting voltages to default values of certain bucks on falling edge of Warm Reset Input pin from AP. However on some boards (with S2MPS13) the pin is pulled down so any suspend will effectively trigger the reset of bucks supplying the power to the little and big cores. In the same time when resuming, these bucks must provide voltage greater or equal to voltage before suspend to match the frequency chosen by cpufreq. If voltage (default value of voltage after reset) is lower than one set by cpufreq before suspend, then system will hang during resuming. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reported-by: Bartlomiej Zolnierkiewicz <[email protected]> Tested-by: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-10-26mfd: s2mps11: Add manual shutdown method for Odroid XU3Krzysztof Kozlowski2-0/+3
On Odroid XU3 board (with S2MPS11 PMIC) the PWRHOLD bit in CTRL1 register must be manually set to 0 before initiating power off sequence. One of usual power down methods for Exynos based devices looks like: 1. PWRHOLD pin of PMIC is connected to PSHOLD of Exynos SoC. 2. Exynos holds up this pin during system operation. 3. ACOKB pin of PMIC is pulled up to VBATT and optionally to pin in other device. 4. When PWRHOLD/PSHOLD goes low, the PMIC will turn off the power if ACOKB goes high. On Odroid XU3 family the difference is in (3) - the ACOKB is grounded. This means that PMIC must manually set PWRHOLD field to low and then wait for signal from Application Processor (the usual change in PWRHOLD/PSHOLD pin will actually cut off the power). The patch adds respective binding allowing Odroid XU3 device to be powered off. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reported-by: Anand Moon <[email protected]> Tested-by: Anand Moon <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-04-17drivers/rtc/rtc-s5m.c: add support for S2MPS13 RTCKrzysztof Kozlowski1-0/+2
The S2MPS13 RTC is almost the same as S2MPS14. The differences when updating alarm are: 1. Set WUDR+AUDR field instead of WUDR+RUDR. 2. Clear the AUDR field later (it is not auto-cleared). Signed-off-by: Krzysztof Kozlowski <[email protected]> Cc: Alexandre Belloni <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2015-04-09mfd: sec: Fix RTC alarm interrupt number on S2MPS11Krzysztof Kozlowski1-1/+1
The RTC on S2MPS11 is the same as S2MPS14. However interrupt numbers of RTC alarms 0 and 1 were inversed between these two devices. So when rtc-s5m driver requested S2MPS14_IRQ_RTCA0 interrupt, it matched to S2MPS11_IRQ_RTCA1, not RTCA0. Fix this by using consistent RTC alarm interrupt numbers and adding a BUILD_BUG_ON for future generations. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPLKrzysztof Kozlowski1-9/+0
The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary Power Loss) were removed from rtc-s5m driver because they were not used. Remove them (and on/off interrupt) from main MFD driver and header. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-01-08regulator: s2mps11: Fix wrong calculation of register offsetJonghwa Lee1-0/+2
This patch adds missing registers('BUCK7_SW' & 'LDO29_CTRL'). Since BUCK7 has 1 more register (BUCK7_SW) than others, register offset should be added one more for which has bigger address than BUCK7 registers. Fixes: 76b9840b24ae04(regulator: s2mps11: Add support S2MPS13 regulator device) Signed-off-by: Jonghwa Lee <[email protected]> Signed-off-by: Chanwoo Choi <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: <[email protected]>
2014-11-25regulator: s2mps11: Add support S2MPS13 regulator deviceChanwoo Choi2-0/+187
This patch adds S2MPS13 regulator device to existing S2MPS11 device driver. The S2MPS13 has just different number of regulators from S2MPS14. The S2MPS13 regulator device includes LDO[1-40] and BUCK[1-10]. Signed-off-by: Chanwoo Choi <[email protected]> Acked-by: Sangbeom Kim <[email protected]> Acked-by: Mark Brown <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-11-25mfd: sec-core: Add support for S2MPS13 deviceChanwoo Choi1-0/+1
This patch adds the support for Samsung S2MPS13 PMIC device to the sec-core MFD driver. The S2MPS13 is very similar with existing S2MPS14 and includes PMIC/ RTC/CLOCK devices. Signed-off-by: Chanwoo Choi <[email protected]> Acked-by: Sangbeom Kim <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-08-16regulator: s2mpxxx: Move regulator min/step voltages in common placeAmit Daniel Kachhap4-31/+21
This is a cleanup patch and moves min/step voltages in a common samsung header file so that they can be used by other s2mpxxx PMIC drivers. Only few required macros are added currently and others can be added if needed. Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Amit Daniel Kachhap <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-07-09mfd: sec-core: Add support for S2MPU02 deviceChanwoo Choi3-0/+226
Add support for Samsung S2MPU02 PMIC device to the MFD sec-core driver. The S2MPU02 device includes PMIC/RTC/Clock devices. Signed-off-by: Chanwoo Choi <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-06-10rtc: s5m: use shorter time of register updateKrzysztof Kozlowski1-0/+10
Set the time needed for updating alarm and time registers to 0.45 ms. The default is 7.32 ms which is too long and leads to warnings when setting alarm or time: s5m-rtc: waiting for UDR update, reached max number of retries Signed-off-by: Krzysztof Kozlowski <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Lee Jones <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Sangbeom Kim <[email protected]> Cc: Samuel Ortiz <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-06-10mfd/rtc: sec/s5m: rename SEC* symbols to S5MKrzysztof Kozlowski1-38/+38
Prepare for adding support for S2MPS14 RTC device to the rtc-s5m driver: 1. Rename SEC* symbols to S5M. 2. Add S5M prefix to some of defines which are different between S5M876X and S2MPS14. This is only a rename-like patch, new code is not added. Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Lee Jones <[email protected]> Cc: Kyungmin Park <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Sangbeom Kim <[email protected]> Cc: Samuel Ortiz <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2014-06-06Merge tag 'mfd-for-linus-3.16' of ↵Linus Torvalds1-17/+18
git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into next Pull MFD updates from Lee Jones: "Changes to existing drivers: - increase DT coverage: arizona, mc13xxx, stmpe-i2c, syscon, sun6i-prcm - regmap use of and/or clean-up: tps65090, twl6040 - basic renaming: max14577 - use new cpufreq helpers: db8500-prcmu - increase regulator support: stmpe, arizona, wm5102 - reduce legacy GPIO overhead: stmpe - provide necessary remove path: bcm590xx - expand sysfs presence: kempld - move driver specific code out to drivers: rtc-s5m, arizona - clk handling: twl6040 - use managed (devm_*) resources: ipaq-micro - clean-up/remove unused/duplicated code: tps65218, sec, pm8921, abx500-core, db8500-prcmu, menelaus - build/boot/sematic bug fixes: rtsx_usb, stmpe, bcm590xx, abx500, mc13xxx, rdc321x-southbridge, mfd-core, sec, max14577, syscon, cros_ec_spi - constify stuff: sm501, tps65910, tps6507x, tps6586x, max77686, max8997, kempld, max77693, max8907, rtsx_usb, db8500-prcmu, max8998, wm8400, sec, lp3943, max14577, as3711, omap-usb-host, ipaq-micro Support for new devices: - add support for max77836 into max14577 - add support for tps658640 into tps6586x - add support for cros-ec-i2c-tunnel into cros_ec - add new driver for rtsx_usb_sdmmc and rtsx_usb_ms - add new driver for axp20x - add new driver for sun6i-prcm - add new driver for ipaq-micro" * tag 'mfd-for-linus-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (77 commits) mfd: wm5102: Correct default for LDO Control 2 register mfd: menelaus: Use module_i2c_driver mfd: tps65218: Terminate of match table mfd: db8500-prcmu: Remove check for CONFIG_DBX500_PRCMU_DEBUG mfd: ti-keystone-devctrl: Add bindings for device state control mfd: palmas: Format the header file mfd: abx500-core: Remove unused function abx500_dump_all_banks() mfd: arizona: Correct addresses of always-on trigger registers mfd: max14577: Cast to architecture agnostic data type i2c: ChromeOS EC tunnel driver mfd: cros_ec: Sync to the latest cros_ec_commands.h from EC sources mfd: cros_ec: spi: Increase cros_ec_spi deadline from 5ms to 100ms mfd: cros_ec: spi: Make the cros_ec_spi timeout more reliable mfd: cros_ec: spi: Add mutex to cros_ec_spi mfd: cros_ec: spi: Calculate delay between transfers correctly mfd: arizona: Correct error message for addition of main IRQ chip mfd: wm8997: Add registers for high power mode mfd: arizona: Add MICVDD to mapped regulators mfd: ipaq-micro: Make mfd_cell array const mfd: ipaq-micro: Use devm_ioremap_resource() ...
2014-06-03mfd: sec-core: Remove duplicated device type from sec_pmic_devKrzysztof Kozlowski1-2/+1
The device type was stored in sec_pmic_dev state container twice: - unsigned long type (initialized from of_device_id or i2c_device_id) - int device_type (initialized as above or from board files when there is no DTS) The 'type' field was never used outside of probe so it can be safely removed. Change also the device_type in sec_pmic_dev and sec_platform_data to unsigned long to avoid any casts. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-06-03mfd: sec-core: Update sec_pmic documentationKrzysztof Kozlowski1-12/+17
Update the documentation for sec_pmic state container structure to reflect current code. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-06-03mfd/rtc: s5m: Do not allocate RTC I2C dummy and regmap for unsupported chipsetsKrzysztof Kozlowski1-3/+0
The rtc-s5m driver does not support all of S2M and S5M chipsets supported by main MFD sec-core driver. For such chipsets unsupported by rtc-s5m, the MFD sec-core driver initialized regmap with default config. This config in such cases wouldn't work at all. The main MFD sec-core driver shouldn't initialize regmap for child drivers which is not used by them and even not valid. Move the allocation of RTC I2C dummy device and initialization of RTC regmap from main MFD sec-core driver to the rtc-s5m driver. The rtc-s5m driver will use proper regmap config for supported devices. Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Alessandro Zummo <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-04-14regulator: s2mps11: Add external GPIO control for S2MPS14Krzysztof Kozlowski1-0/+2
Add support for external control over GPIO for LDO10, LDO11 and LDO12 S2MPS14 regulators. External control can be turned on by writing 0x0 to control register which in case of other regulators is used for disabling them. These LDO10-LDO12 regulators can be disabled only by I2C GPIO or PWREN pin so the patch actually allows proper way of disabling them. Additionally the GPIO control has two benefits: - It is faster than toggling it over I2C bus. - It allows disabling the regulator during suspend to RAM; The AP will enable it during resume. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-26Merge remote-tracking branches 'regulator/topic/s5m8767', ↵Mark Brown2-1/+9
'regulator/topic/st-pwm', 'regulator/topic/ti-abb', 'regulator/topic/tps51632', 'regulator/topic/tps62360', 'regulator/topic/tps6507x', 'regulator/topic/tps65090' and 'regulator/topic/tps65217' into regulator-next
2014-03-19regulator: s2mps11: Add set_suspend_disable for S2MPS14Krzysztof Kozlowski1-0/+2
S2MPS14 regulators support suspend mode where their status is controlled by PWREN coming from SoC. This patch implements the set_suspend_disable for S2MPS14 regulators. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-18mfd: Add support for S2MPA01 deviceSachin Kamat3-5/+253
Add the necessary entries required for S2MPA01 multi-function device. While at it also convert whitespaces to tabs in core.h. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-03-18mfd: sec-core: Silence compiler warningPankaj Dubey1-1/+1
When used 64bit compiler GCC warns as drivers/mfd/sec-core.c:199:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Signed-off-by: Pankaj Dubey <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-03-18mfd: sec: Add support for S2MPS14Krzysztof Kozlowski4-6/+229
Add support for S2MPS14 PMIC device to the MFD sec-core driver. The S2MPS14 is similar to S2MPS11 but it has fewer regulators, two clocks instead of three and a little different registers layout. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-03-18mfd: sec-irq: Use consistent S2MPS11 RTC alarm interrupt indexesKrzysztof Kozlowski1-2/+2
The S2MPS11 RTC has two alarms: alarm0 and alarm1 (corresponding interrupts are named similarly). Use consistent names for interrupts to limit possible errors. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-03-18mfd: sec-core: Add maximum RTC register for regmap configKrzysztof Kozlowski1-0/+2
Add maximum register to the regmap used by rtc-s5m driver. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2014-01-27regulator: s5m8767: Use GPIO for controlling Buck9/eMMCKrzysztof Kozlowski2-1/+9
Add support for GPIO control (enable/disable) over Buck9. The Buck9 Converter is used as a supply for eMMC Host Controller. BUCK9EN GPIO of S5M8767 chip may be used by application processor to enable or disable the Buck9. This has two benefits: - It is faster than toggling it over I2C bus. - It allows disabling the regulator during suspend to RAM; The AP will enable it during resume; Without the patch the regulator supplying eMMC must be defined as fixed-regulator. Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-12-18mfd: sec: Remove sec_reg* regmap helpersKrzysztof Kozlowski1-6/+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 <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-12-18Merge tag 's2mps11-build' into regulator-s5m8767 since a following patchMark Brown1-1/+2
depend on it. regulator/clk: Fix s2mps11 build This patch fixes a build failure that appeared in v3.13-rc4 due to an RTC/MFD update merged via -mm.
2013-12-18regulator: s5m8767: Add symbols for hard-coded DVS_RAMP registerKrzysztof Kozlowski1-0/+15
Add symbols for hard-coded values of BUCK_RAMP field in DVS_RAMP register. This simplifies a little the code as register update is called only once. Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Lee Jones <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-12-12mfd/rtc: s5m: fix register updating by adding regmap for RTCKrzysztof Kozlowski1-1/+2
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 <[email protected]> Signed-off-by: Kyungmin Park <[email protected]> Reviewed-by: Mark Brown <[email protected]> Acked-by: Sangbeom Kim <[email protected]> Cc: Samuel Ortiz <[email protected]> Cc: Lee Jones <[email protected]> Cc: Liam Girdwood <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: Marek Szyprowski <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Kyungmin Park <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2013-12-11regulator: s5m8767: Define symbol for buck control maskKrzysztof Kozlowski1-1/+2
Replace hard-coded value for mask used in BUCKX_CTRL registers (for BUCKX_EN field) with a symbol. This also removes two local variables. Signed-off-by: Krzysztof Kozlowski <[email protected]> Acked-by: Lee Jones <[email protected]> Reviewed-by: Sachin Kamat <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-11-13rtc: s5m-rtc: add real-time clock driver for s5m8767Sangbeom Kim2-0/+12
Add real-time clock driver for s5m8767. Signed-off-by: Sangbeom Kim <[email protected]> Signed-off-by: Sachin Kamat <[email protected]> Cc: Todd Broch <[email protected]> Cc: Mark Brown <[email protected]> Acked-by: Lee Jones <[email protected]> [mfd parts] Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>