aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/bd718x7-regulator.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-10-01regulator: bd718x7: Add MODULE_ALIAS()Guido Günther1-0/+1
This fixes device probing when built as a module Signed-off-by: Guido Günther <agx@sigxcpu.org> Link: https://lore.kernel.org/r/46ce3400e227dd88d51486c02a6152c9ec52acbb.1569875042.git.agx@sigxcpu.org Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-15Merge tag 'mfd-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfdLinus Torvalds1-12/+13
Pull MFD updates from Lee Jones: "Core Frameworks: - Set 'struct device' fwnode when registering a new device New Drivers: - Add support for ROHM BD70528 PMIC New Device Support: - Add support for LP87561 4-Phase Regulator to TI LP87565 PMIC - Add support for RK809 and RK817 to Rockchip RK808 - Add support for Lid Angle to ChromeOS core - Add support for CS47L15 CODEC to Madera core - Add support for CS47L92 CODEC to Madera core - Add support for ChromeOS (legacy) Accelerometers in ChromeOS core - Add support for Add Intel Elkhart Lake PCH to Intel LPSS New Functionality: - Provide regulator supply information when registering; madera-core - Additional Device Tree support; lp87565, madera, cros-ec, rohm,bd71837-pmic - Allow over-riding power button press via Device Tree; rohm-bd718x7 - Differentiate between running processors; cros_ec_dev Fix-ups: - Big header file update; cros_ec_commands.h - Split header per-subsystem; rohm-bd718x7 - Remove superfluous code; menelaus, cs5535-mfd, cs47lXX-tables - Trivial; sorting, coding style; intel-lpss-pci - Only remove Power Off functionality if set locally; rk808 - Make use for Power Off Prepare(); rk808 - Fix spelling mistake in header guards; stmfx - Properly free IDA resources - SPDX fixups; cs47lXX-tables, madera - Error path fixups; hi655x-pmic Bug Fixes: - Add missing break in case() statement - Repair undefined behaviour when not initialising variables; arizona-core, madera-core - Fix reference to Device Tree documentation; madera" * tag 'mfd-next-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits) mfd: hi655x-pmic: Fix missing return value check for devm_regmap_init_mmio_clk mfd: madera: Fixup SPDX headers mfd: madera: Remove some unused registers and fix some defaults mfd: intel-lpss: Release IDA resources mfd: intel-lpss: Add Intel Elkhart Lake PCH PCI IDs mfd: cs5535-mfd: Remove ifdef OLPC noise mfd: stmfx: Fix macro definition spelling dt-bindings: mfd: Add link to ROHM BD71847 Datasheet MAINAINERS: Swap words in INTEL PMIC MULTIFUNCTION DEVICE DRIVERS mfd: cros_ec_dev: Register cros_ec_accel_legacy driver as a subdevice mfd: rk808: Prepare rk805 for poweroff mfd: rk808: Check pm_power_off pointer mfd: cros_ec: differentiate SCP from EC by feature bit dt-bindings: Add binding for cros-ec-rpmsg mfd: madera: Add Madera core support for CS47L92 mfd: madera: Add Madera core support for CS47L15 mfd: madera: Update DT bindings to add additional CODECs mfd: madera: Add supply mapping for MICVDD mfd: madera: Fix potential uninitialised use of variable mfd: madera: Fix bad reference to pinctrl.txt file ...
2019-06-27mfd: regulator: clk: Split rohm-bd718x7.hMatti Vaittinen1-12/+13
Split the bd718x7.h to ROHM common and bd718x7 specific parts so that we do not need to add same things in every new ROHM PMIC header. Please note that this change requires changes also in bd718x7 sub-device drivers for regulators and clk. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2019-06-03regulator: bd718x7: Drop unused includeLinus Walleij1-1/+0
This driver does not use any symbols from <linux/gpio.h> so just drop the include. Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-By: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-08regulator: bd718x7: Use rdev_get_id() to get regulator idAxel Lin1-2/+2
Use rdev_get_id() instead of directly access rdev->desc->id. While at it also remove unneeded init for ramp_value variable. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-14regulator: bd718x7: Support SNVS low power stateMatti Vaittinen1-25/+176
read ROHM BD71837 / BD71847 specific device tree bindings for controlling the PMIC shutdown/reset states and voltages for different HW states. The PMIC was designed to be used with NXP i.MX8 SoC and it supports SNVS low power state which seems to be typical for NXP i.MX SoCs. However, when SNVS is used we must not allow SW to control enabling/disabling those regulators which are crucial for system to boot as there is a HW limitation which causes SW controlled regulators to be kept shut down after SNVS reset. Allow setting the SNVS to be used as reset target state and allow marking those regulators which are critical for boot. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Tested-by: Angus Ainslie <angus@akkea.ca> Reviewed-by: Angus Ainslie <angus@akkea.ca> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-24regulator: bd718x7: Constify regulator_opsAxel Lin1-7/+7
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-11Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-4.21Mark Brown1-0/+1
2018-11-13regulator: bd718x7: Change next state after poweroff to readyMatti Vaittinen1-0/+23
BD71837 and BD71847 have a HW functionality which leave power rails OFF after powerof state: - if they have been controlled by SW. - if state transition from poweroff is done to SNVS BD71837 can after reset transition from power-off to SNVS or READY state depending on reset reason. By default only wathcdog reset changes state from poweroff to ready. Change PMIC configuration to always transition to READY in order to avoid crucial power rails being OFF after reset. If SNVS is required the crucial power rails should not be controlled by SW - eg corresponding regulator control register should have SEL bit kept zero. Currently the driver assumes all regulators to be controlled by SW so it sets all SEL bits to 1. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-13regulator: bd718x7: Use regulator_map_voltage_ascend for buck5 and buck7Axel Lin1-0/+1
The voltages in bd718xx_3rd_nodvs_buck_volts are in ascendant order, so use regulator_map_voltage_ascend. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-08regulator: bd718x7: add missing linux/of.h inclusion (deja-vu)Matti Vaittinen1-0/+1
0-Day tests found compilation error on x86. Driver won't compile on x86_64 as "of_match_ptr" is not found. Add missing include <linux/of.h> At some point this fix was lost. So re-apply it. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-11-07regulator: bd718x7: Remove double indirection for bd718xx_pmic_inits.rdatasGeert Uytterhoeven1-4/+4
With gcc 4.1: drivers/regulator/bd718x7-regulator.c: In function ‘bd718xx_probe’: drivers/regulator/bd718x7-regulator.c:1020: warning: initialization from incompatible pointer type drivers/regulator/bd718x7-regulator.c:1024: warning: initialization from incompatible pointer type Apparently this old compiler can't handle the obscure double indirection. However, there is no need for a double indirection. Just store a pointer to the array instead, like other drivers tend to do. Fixes: 494edd266b945f36 ("regulator/mfd: Support ROHM BD71847 power management IC") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-10-19regulator: bd718x7: Remove struct bd718xx_pmicAxel Lin1-39/+20
All the fields in struct bd718xx_pmic are not really necessary. Remove struct bd718xx_pmic to simplify the code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-28regulator: bd718xx: rename bd71837 to 718xxMatti Vaittinen1-0/+1138
rename bd71837-regulator.c to bd718x7-regulator.c to reflect the fact that also BD71847 is now supported by the driver. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Signed-off-by: Mark Brown <broonie@kernel.org>