01 Jul, 2020
1 commit
-
[ Upstream commit 6f1cf5257acc6e6242ddf2f52bc7912aed77b79f ]
PFUZE100_SWB_REG is not proper for sw1a/sw2, because enable_mask/enable_reg
is not correct. On PFUZE3000, sw1a/sw2 should be the same as sw1a/sw2 on
pfuze100 except that voltages are not linear, so add new PFUZE3000_SW_REG
and pfuze3000_sw_regulator_ops which like the non-linear PFUZE100_SW_REG
and pfuze100_sw_regulator_ops.Fixes: 1dced996ee70 ("regulator: pfuze100: update voltage setting for pfuze3000 sw1a")
Reported-by: Christophe Meynard
Signed-off-by: Robin Gong
Link: https://lore.kernel.org/r/1592171648-8752-1-git-send-email-yibin.gong@nxp.com
Signed-off-by: Mark Brown
Signed-off-by: Sasha Levin
02 Oct, 2019
1 commit
-
In function pfuze100_regulator_probe(), variable "val" could be
initialized if regmap_read() fails. However, "val" is used to
decide the control flow later in the if statement, which is
potentially unsafe.Signed-off-by: Yizhuo
Link: https://lore.kernel.org/r/20190929170957.14775-1-yzhai003@ucr.edu
Signed-off-by: Mark Brown
07 Nov, 2018
1 commit
-
The driver currently supports coin cell / super cap charging, so
this patch extends it to support PF0100.Signed-off-by: Adam Ford
Reviewed-by: Fabio Estevam
Signed-off-by: Mark Brown
18 Sep, 2018
1 commit
-
Trivial fix to spelling mistake in dev_info message
Signed-off-by: Colin Ian King
Signed-off-by: Mark Brown
11 Sep, 2018
1 commit
-
On some boards the SoC can use one pin "PMIC_STBY_REQ" to notify th PMIC
about state changes. In this case internal state of PMIC must be
preconfigured for upcomming state change.
It works fine with the current regulator framework, except with the
power-off case.This patch is providing an optional pm_power_off_prepare handler
which will configure standby state of the PMIC to disable all power lines.In my power consumption test on RIoTBoard, I got the following results:
power off without this patch: 320 mA
power off with this patch: 2 mA
suspend to ram: 40 mASigned-off-by: Oleksij Rempel
Signed-off-by: Mark Brown
24 Jul, 2018
1 commit
-
Add enable/disable support for switch regulators on pfuze100.
Based on commit 5fe156f1cab4 ("regulator: pfuze100: add enable/disable for
switch") which is reverted due to boot regressions by commit 464a5686e6c9
("regulator: Revert "regulator: pfuze100: add enable/disable for switch"").
Disabling the switch regulators will only be done if the user specifies
"fsl,pfuze-support-disable-sw" in its device tree to keep backward
compatibility with current dtb's [1].[1] https://patchwork.kernel.org/patch/10490381/
Signed-off-by: Marco Felsch
Signed-off-by: Mark Brown
02 Jul, 2018
1 commit
-
This reverts commit 5fe156f1cab4f340ddb6283c993912be77594016.
Commit 5fe156f1cab4 ("regulator: pfuze100: add enable/disable for switch")
causes boot regression on some platforms such as imx6sl-evk and
imx6sll-evk.After this commit the SW4 regulator will be turned
off and since it supplies the DDR voltage on these boards, a
kernel hang is observed.Revert it to avoid breaking old dtb's.
Fixes: 5fe156f1cab4 ("regulator: pfuze100: add enable/disable for switch")
Signed-off-by: Fabio Estevam
Signed-off-by: Mark Brown
18 Jun, 2018
1 commit
-
This extends the pfuze100 driver with pfuze3001 support.
Latest datasheet:
https://www.nxp.com/docs/en/data-sheet/PF3001.pdfSigned-off-by: Robin Gong
Signed-off-by: Stefan Wahren
Signed-off-by: Mark Brown
24 May, 2018
2 commits
-
We now pass a GPIO descriptor to the core instead of a global
GPIO number, if this descriptor is NULL the GPIO line is not
used. Just delete the assignment of an invalid GPIO line.Signed-off-by: Linus Walleij
Signed-off-by: Mark Brown -
Adopt the SPDX license identifier headers to ease license compliance
management.Signed-off-by: Fabio Estevam
Signed-off-by: Mark Brown
18 May, 2018
2 commits
-
If is_enabled() is not defined, regulator core will assume
this regulator is already enabled, then it can NOT be really
enabled after disabled.Based on Li Jun's patch from the NXP kernel tree.
Signed-off-by: Anson Huang
Signed-off-by: Mark Brown -
Add enable/disable support for switch regulator on pfuze100.
Based on Robin Gong's patch from the NXP kernel tree.
Signed-off-by: Anson Huang
Signed-off-by: Mark Brown
18 Apr, 2018
1 commit
-
pfuze3000 datasheet(Rev.9.0) from:
https://www.nxp.com/docs/en/data-sheet/PF3000.pdf
updates sw1a's voltage range, the settings for 1.450V and 1.475V
are replaced with 1.8V and 3.3V:5b'11110 1.450 (SW1B), 1.8 (SW1A/SW1AB)
5b'11111 1.475 (SW1B), 3.3 (SW1A/SW1AB)the voltage calculation using steps is NOT available for sw1a now,
use voltage table instead.Signed-off-by: Anson Huang
Signed-off-by: Robin Gong
Signed-off-by: Mark Brown
30 Apr, 2017
1 commit
-
…e100', 'regulator/topic/settle', 'regulator/topic/tps65132' and 'regulator/topic/twl6030' into regulator-next
14 Mar, 2017
1 commit
-
Add support for PF0200 coin cell/super capacitor charger which works as
a current limited voltage source via the LICELL pin. When VIN goes below
a certain threshold LICELL is used to provide power for VSNVS which is
usually used to hold up secure non-volatile storage and the real-time
clock on the SoC.Signed-off-by: George McCollister
Signed-off-by: Mark Brown
01 Feb, 2017
1 commit
-
Declare regulator_ops structure as const as it is only stored in the ops
field of a regulator_desc structure. This field is of type const, so
regulator_ops structures having this property can be made const too.File size before: drivers/regulator/pfuze100-regulator.o
text data bss dec hex filename
3552 12528 16 16096 3ee0 regulator/pfuze100-regulator.oFile size after: drivers/regulator/pfuze100-regulator.o
text data bss dec hex filename
4576 11496 16 16088 3ed8 regulator/pfuze100-regulator.oSigned-off-by: Bhumika Goyal
Signed-off-by: Mark Brown
07 Jun, 2016
2 commits
-
Adjust the MODULE_DESCRIPTION() text to also include the PFUZE3000
as a supported device.Signed-off-by: Fabio Estevam
Signed-off-by: Mark Brown -
We should better not use a global 'struct pfuze_regulator' variable,
as this could cause problems if multiple regulator chips are used.Place it inside the private struct instead.
Signed-off-by: Fabio Estevam
Signed-off-by: Mark Brown
30 Aug, 2015
1 commit
-
…'regulator/topic/owner', 'regulator/topic/pfuze100' and 'regulator/topic/pwm' into regulator-next
29 Aug, 2015
1 commit
-
The driver has a I2C device id table that is used to create the modaliases
and also "pfuze100-regulator" is not a supported I2C id, so is never used.Signed-off-by: Javier Martinez Canillas
Signed-off-by: Mark Brown
15 Jul, 2015
1 commit
-
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.Signed-off-by: Krzysztof Kozlowski
Signed-off-by: Mark Brown
09 Jan, 2015
1 commit
-
Add pfuze3000 chip support.
Signed-off-by: Robin Gong
Signed-off-by: Mark Brown
27 May, 2014
1 commit
-
Current code has .enable_reg and .enable_mask settings, but the implementation
for corresponding callbacks are missing. Fix it.Signed-off-by: Axel Lin
Tested-by: Robin Gong
Acked-by: Robin Gong
Signed-off-by: Mark Brown
26 May, 2014
2 commits
-
Previously, the PFUZE100 would try to allocate gpio0 io0 because
config.ena_gpio defaults to 0, which can be a valid GPIO. To prevent this
from happening, set this parameter to -EINVAL.Signed-off-by: Sean Cross
Signed-off-by: Mark Brown -
The SWB regulators have the ability to be turned on and off. Add
enable/disable support for these regulators.Signed-off-by: Sean Cross
Signed-off-by: Mark Brown
27 Mar, 2014
1 commit
-
…97', 'regulator/topic/max8998', 'regulator/topic/mc13xxx', 'regulator/topic/pfuze100', 'regulator/topic/rc5t583' and 'regulator/topic/s2mps11' into regulator-next
06 Mar, 2014
1 commit
-
Signed-off-by: Axel Lin
Acked-by: Robin Gong
Signed-off-by: Mark Brown
04 Mar, 2014
2 commits
-
Also remove PFUZE_NUM to avoid below build warnings:
CC [M] drivers/regulator/pfuze100-regulator.o
drivers/regulator/pfuze100-regulator.c:86:2: warning: excess elements in array initializer [enabled by default]
drivers/regulator/pfuze100-regulator.c:86:2: warning: (near initialization for 'pfuze_device_id') [enabled by default]
drivers/regulator/pfuze100-regulator.c:93:2: warning: excess elements in array initializer [enabled by default]
drivers/regulator/pfuze100-regulator.c:93:2: warning: (near initialization for 'pfuze_dt_ids') [enabled by default]Signed-off-by: Axel Lin
Signed-off-by: Mark Brown -
support pfuze200 chip which remove SW1C and SW4 based on pfuze100.
Signed-off-by: Robin Gong
Signed-off-by: Mark Brown
23 Feb, 2014
1 commit
-
If of_node_get() fails, we should return an error.
Signed-off-by: Fabio Estevam
Signed-off-by: Mark Brown
19 Feb, 2014
1 commit
-
Since commit d7857c42 (regulator: pfuze100: Use of_get_child_by_name) we get
the following probe failure:pfuze100-regulator 1-0008: Full layer: 1, Metal layer: 0
pfuze100-regulator 1-0008: FAB: 0, FIN: 0
pfuze100-regulator 1-0008: regulators node not found
pfuze100-regulator: probe of 1-0008 failed with error -22Now that of_get_child_by_name() is used we should adjust the device_node pointer
'np' to not get the parent node anymore.Suggested-by: Shawn Guo
Signed-off-by: Fabio Estevam
Acked-by: Sachin Kamat
Signed-off-by: Mark Brown
15 Feb, 2014
1 commit
-
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: Sachin Kamat
Signed-off-by: Mark Brown
03 Feb, 2014
1 commit
-
Signed-off-by: Thiago Farina
Signed-off-by: Mark Brown
23 Jan, 2014
2 commits
-
… 'regulator/topic/lp3971', 'regulator/topic/lp3972', 'regulator/topic/max14577', 'regulator/topic/max77693', 'regulator/topic/mc13892', 'regulator/topic/pcf50633' and 'regulator/topic/pfuze100' into regulator-linus
-
'lay' is not very meaningful, so use it 'layer' instead to let the dev_info()
clearer.Signed-off-by: Fabio Estevam
Signed-off-by: Mark Brown
15 Jan, 2014
2 commits
-
Fix the following checkpatch error and warning:
ERROR: switch and case should be at the same indent
#311: FILE: drivers/regulator/pfuze100-regulator.c:311:
+ switch (value & 0x0f) {
[...]
+ case 0x8:
[...]
+ case 0x0:
[...]
+ default:WARNING: line over 80 characters
#312: FILE: drivers/regulator/pfuze100-regulator.c:312:
+ /* Freescale misprogrammed 1-3% of parts prior to week 8 of 2013 as ID=8 */Signed-off-by: Fabio Estevam
Signed-off-by: Mark Brown -
Linux 3.13-rc4
10 Dec, 2013
3 commits
-
Use devm_regulator_register() to make cleanup paths simpler,
and remove unnecessary remove().Signed-off-by: Jingoo Han
Acked-by: Robin Gong
Signed-off-by: Mark Brown -
prior to week 08 of 2013 Freescale misprogrammed between 1 and 3% of
PFUZE1000 parts with a ID=0x8 instead of the expected ID=0x0Signed-off-by: Tim Harvey
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org -
According to the datasheet, the address of FABID is 0x4. Fix it.
Signed-off-by: Axel Lin
Acked-by: Robin Gong
Signed-off-by: Mark Brown
Cc: stable@vger.kernel.org