- 18 2月, 2016 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
Following BUILD_BUG_ON using a variable fails for some of the compilers and optimization levels (reported for gcc 4.9): var = ARRAY_SIZE(s2mps15_regulators); BUILD_BUG_ON(S2MPS_REGULATOR_MAX < var); Fix this by using ARRAY_SIZE directly. Additionally add missing BUILD_BUG_ON check for S2MPS15 device (the check ensures that internal arrays are big enough to hold data for all of regulators on all devices). Reported-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Tested-by: NArnd Bergmann <arnd@arndb.de> Reviewed-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 24 11月, 2015 1 次提交
-
-
由 Alim Akhtar 提交于
Currently S2MPSXX multifunction device is named as *-pmic, and these MFDs also supports regulator as a one of its MFD cell which has the same name, because current name is confusing and we want to sort it out. We did discussed different approaches about how the MFD and it cells need to be named here [1]. Based in the discussion this patch rename MFD regulator name as *-regulator instead of current *-pmic. This patch also changes the corresponding entries in the regulator driver to keep git-bisect happy. [1]-> https://lkml.org/lkml/2015/10/28/417Suggested-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NAlim Akhtar <alim.akhtar@samsung.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 23 11月, 2015 1 次提交
-
-
由 Thomas Abraham 提交于
The S2MPS15 PMIC is similar in functionality to S2MPS11/14 PMIC. It contains 27 LDO and 10 Buck regulators and allows programming these regulators via a I2C interface. This patch adds initial support for LDO/Buck regulators of S2MPS15 PMIC. Signed-off-by: NThomas Abraham <thomas.ab@samsung.com> Signed-off-by: NAlim Akhtar <alim.akhtar@samsung.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: NMark Brown <broonie@kernel.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 24 6月, 2015 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
Status of enabling suspend mode for regulator was stored in bitmap-like long integer. However since adding support for S2MPU02 the number of regulators exceeded 32 so on devices with more than 32 regulators (S2MPU02 and S2MPS13) overflow happens when shifting the bit. This could lead to enabling suspend mode for completely different regulator than intended or to switching different regulator to other mode (e.g. from always enabled to controlled by PWRHOLD pin). Both cases could result in larger energy usage and issues when suspending to RAM. Fixes: 00e2573d ("regulator: s2mps11: Add support S2MPU02 regulator device") Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
-
- 28 4月, 2015 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
Remove unneeded semicolons after the switch statement to satisfy coccicheck. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 1月, 2015 1 次提交
-
-
由 Jonghwa Lee 提交于
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: 76b9840b(regulator: s2mps11: Add support S2MPS13 regulator device) Signed-off-by: NJonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
-
- 12 12月, 2014 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
Invalid buck4 configuration for linear mapping of voltage in S2MPS14 regulators caused boot failure on Gear 2 (dw_mmc-exynos): [ 3.569137] EXT4-fs (mmcblk0p15): mounted filesystem with ordered data mode. Opts: (null) [ 3.571716] VFS: Mounted root (ext4 filesystem) readonly on device 179:15. [ 3.629842] mmcblk0: error -110 sending status command, retrying [ 3.630244] mmcblk0: error -110 sending status command, retrying [ 3.636292] mmcblk0: error -110 sending status command, aborting Buck4 voltage regulator has different minimal voltage value than other bucks. Commit merging multiple regulator description macros caused to use linear_min_sel from buck[1235] regulators as value for buck4. This lead to lower voltage of buck4 than required. Output of the buck4 is used internally as power source for LDO{3,4,7,11,19,20,21,23}. On Gear 2 board LDO11 is used as MMC regulator (V_EMMC_1.8V). Fixes: 5a867cf2 ("regulator: s2mps11: Optimize the regulator description macro") Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
-
- 25 11月, 2014 1 次提交
-
-
由 Chanwoo Choi 提交于
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: NChanwoo Choi <cw00.choi@samsung.com> Acked-by: NSangbeom Kim <sbkim73@samsung.com> Acked-by: NMark Brown <broonie@kernel.org> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 07 11月, 2014 1 次提交
-
-
由 Markus Pargmann 提交于
This patch sets ena_gpio_initialized for all drivers which set a ena_gpio from parsed DT properties. Drivers using pdata may get zero initialized pdata and therefore copy a 0 into the regulator_config ena_gpio field. Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 20 10月, 2014 2 次提交
-
-
由 Wolfram Sang 提交于
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
-
由 Krzysztof Kozlowski 提交于
The driver was allocating memory for storing GPIOs for external control with unnecessary GFP_ZERO flag. Then right after allocation it initialized memory to -EINVAL in loop. Skip the GFP_ZERO flag. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 8月, 2014 2 次提交
-
-
由 Amit Daniel Kachhap 提交于
This patch makes the regulator description macro take minimum and steps voltage as parameter. In this way many repeated macros can be removed. Now these macros are repeated only if the the LDO/BUCK ctrl registers have non-linear positions. The good thing is these ctrl registers are mostly linear so they are not passed as parameters. This patch reduces the code size and also allow easy addition of more s2mpxxx PMIC drivers which differs a lot in minimum/step voltages. Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NAmit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Amit Daniel Kachhap 提交于
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: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NAmit Daniel Kachhap <amit.daniel@samsung.com> Acked-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 26 7月, 2014 1 次提交
-
-
由 Axel Lin 提交于
This driver also supports S2MPU02 now, thus update module description and Kconfig accordingly. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 09 7月, 2014 1 次提交
-
-
由 Chanwoo Choi 提交于
This patch add S2MPU02 regulator device to existing S2MPS11 device driver because of little difference between S2MPS1x and S2MPU02. The S2MPU02 regulator device includes LDO[1-28] and BUCK[1-7]. Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> [Add missing linear_min_sel of S2MPU02 LDO regulators by Jonghwa Lee] Signed-off-by: NJonghwa Lee <jonghwa3.lee@samsung.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: NMark Brown <broonie@linaro.org> Acked-by: NLee Jones <lee.jones@linaro.org> Signed-off-by: NLee Jones <lee.jones@linaro.org>
-
- 17 5月, 2014 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
S2MPS11 supports enabling/disabling ramp delay only for buck[2346]. Other bucks have ramp delay enabled always. However the bit shift for enabling buck6 ramp delay in register is equal to 0. When ramp delay was set for the bucks unsupporting enable/disable (buck[15789] and buck10), the ramp delay for buck6 was also enabled. Fixes: b96244fa ("regulator: s2mps11: Don't check enable_shift before setting enable ramp rate") Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 02 5月, 2014 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
GPIO 0 is a valid GPIO so allow using it as external control for S2MPS14 regulators. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 15 4月, 2014 2 次提交
-
-
由 Krzysztof Kozlowski 提交于
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: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Krzysztof Kozlowski 提交于
Refactor code for parsing DTS to increase a little code readability. The behaviour should not change. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 03 4月, 2014 1 次提交
-
-
由 Axel Lin 提交于
Current code misses updating the register when enable_shift is 0. e.g. S2MPS11_BUCK9_RAMP_SHIFT and S2MPS11_BUCK6_RAMP_EN_SHIFT are 0. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Reviewed-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 19 3月, 2014 4 次提交
-
-
由 Sachin Kamat 提交于
Add of_node_put to decrement the ref count. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Sachin Kamat 提交于
of_find_node_by_name walks the allnodes list, and can thus walk outside of the parent node. Use of_get_child_by_name instead. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Krzysztof Kozlowski 提交于
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: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Krzysztof Kozlowski 提交于
Add support for S2MPS14 PMIC regulators to s2mps11 driver. The S2MPS14 has fewer BUCK-s and LDO-s than S2MPS11. It also does not support controlling the BUCK ramp delay. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Cc: Mark Brown <broonie@kernel.org> Cc: Liam Girdwood <lgirdwood@gmail.com> Reviewed-by: NYadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 04 3月, 2014 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
Remove __initconst from regulator_desc array because this array is used during probe and s2mps11_pmic_probe() is not in __init section. However still select the number of supported regulators according to device ID so the driver will be ready for adding support for S2MPS14 device. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 03 3月, 2014 3 次提交
-
-
由 Krzysztof Kozlowski 提交于
Add __initconst to 'regulator_desc' array with supported regulators. During probe choose how many and which regulators will be supported according to device ID. Then copy the 'regulator_desc' array to allocated memory so the regulator core can use it. Additionally allocate array of of_regulator_match() dynamically (based on number of regulators) instead of allocation on the stack. This is needed for supporting different devices in s2mps11 driver and actually prepares the regulator driver for supporting the S2MPS14 device. Code for supporting the S2MPS14 device will add its own array of 'regulator_desc' (also marked as __initconst). This way memory footprint of the driver will be reduced (approximately 'regulators_desc' array for S2MPS11 occupies 5 kB on 32-bit ARM, for S2MPS14 will occupy 3 kB). Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com> Cc: Yadwinder Singh Brar <yadi.brar01@gmail.com> Reviewed-by: NYadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Krzysztof Kozlowski 提交于
Constify the regulator_desc 'regulators' array. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Krzysztof Kozlowski 提交于
Regulators registered by devm_regulator_register() do not have to be stored in state container because they are never dereferenced later. The array of regulator_dev can be safely removed from state container. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 03 2月, 2014 1 次提交
-
-
由 Thiago Farina 提交于
Signed-off-by: NThiago Farina <tfarina@chromium.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 01 2月, 2014 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
When platform_data is used for regulator (of_node of sec-core MFD device is NULL) the config.of_node for regulator is not initialized. This NULL value of config.of_node is later stored during regulator_register(). Thus any call by regulator consumers to of_get_regulator() will fail on of_parse_phandle() returning NULL. In this case (using platform_data and parent's driver of_node is NULL) set the config.of_node to reg_node from platform_data. Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 30 12月, 2013 1 次提交
-
-
由 Sachin Kamat 提交于
BUCK 3 and 4 share the same ramp delay. Hence make it a fall through case instead of duplicating the code. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 16 12月, 2013 1 次提交
-
-
由 Krzysztof Kozlowski 提交于
Fix building of s2mps11 regulator and clock drivers after renaming regmap field in struct sec_pmic_dev in commit: - "mfd/rtc: s5m: Fix register updating by adding regmap for RTC" Signed-off-by: NKrzysztof Kozlowski <k.kozlowski@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 17 9月, 2013 2 次提交
-
-
由 Sachin Kamat 提交于
Commit e398b51a ("regulator: s2mps11: Convert to devm_regulator_register()") intended to do this conversion. However the actual conversion to devm_* got missed out. Fix this. Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Mark Brown 提交于
Signed-off-by: NMark Brown <broonie@linaro.org> Acked-by: NSangbeom Kim <sbkim73@samsung.com>
-
- 13 8月, 2013 2 次提交
-
-
由 Axel Lin 提交于
Current code has wrong mask and val arguments for updating ramp_delay. Fix it. Also ensure the return value of get_ramp_delay() won't greater than 3 because the mask field for ramp_val only takes 2 bits. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Axel Lin 提交于
Current code calls regmap_update_bits() with mask and val arguments swapped. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 16 7月, 2013 3 次提交
-
-
由 Yadwinder Singh Brar 提交于
Since now we have ramp_delay and ramp_disable as standard regulator constraints and DT part using it so this patch removes legacy part i.e. getting ramp_delayxx and ramp_enable from pdata since it can be passed as standard regulator constraints. Signed-off-by: NYadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Yadwinder Singh Brar 提交于
This patch adds DT support for parsing regulators constraints for parent(mfd) node and moves some common intialising code out of loop while registering. Signed-off-by: NYadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
由 Yadwinder Singh Brar 提交于
Implementing set_ramp_rate() and using standard constraints for getting ramp_delay and ramp_disable, instead of getting it as s2mps11 specific data through platform data, makes driver more compliant with framework and reduces the complexity for adding DT support. Signed-off-by: NYadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-
- 15 7月, 2013 1 次提交
-
-
由 Yadwinder Singh Brar 提交于
Currently driver uses local struct s2mps11_info to store ramp rate for bucks whic its getting through platform data, so instead of using regulator constraints it should use s2mps11_info to calculate ramp delay. Signed-off-by: NYadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: NMark Brown <broonie@linaro.org>
-