History log of /linux-master/drivers/regulator/bd71815-regulator.c
Revision Date Author Comments
# f321708d 08-Aug-2023 Linus Walleij <linus.walleij@linaro.org>

regulator: bd71815: Drop useless header

The bd71815 regulator driver includes the legacy header
<linux/gpio.h> for no reason, it is already using the proper
<linux/gpio/consumer.h> include. Drop the include.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230808-descriptors-regulator-v1-11-939b5e84dd18@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 46600ab1 16-Mar-2023 Douglas Anderson <dianders@chromium.org>

regulator: Set PROBE_PREFER_ASYNCHRONOUS for drivers between 5.10 and 5.15

This follows on the change ("regulator: Set PROBE_PREFER_ASYNCHRONOUS
for drivers that existed in 4.14") but changes regulators didn't exist
in Linux 5.10 but did exist in Linux 5.15.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20230316125351.5.Ia0e6d859bdfe42ea5c187fb1eb4705c1b5ea23a1@changeid
Signed-off-by: Mark Brown <broonie@kernel.org>


# 7dda20c9 10-Mar-2023 Rob Herring <robh@kernel.org>

regulator: Use of_property_present() for testing DT property presence

It is preferred to use typed property access functions (i.e.
of_property_read_<type> functions) rather than low-level
of_get_property/of_find_property functions for reading properties. As
part of this, convert of_get_property/of_find_property calls to the
recently added of_property_present() helper when we just want to test
for presence of a property and nothing more.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20230310144721.1544756-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# d4e93e8d 23-Nov-2022 Matti Vaittinen <mazziesaccount@gmail.com>

regulator: bd71815: bd71828: bd9576: Use dev_err_probe()

The dev_err_probe() has (at least) following benefits over dev_err()
when printing an error print for a failed function call at a device
driver probe:
- Omit error level print if error is 'EPRBE_DEFER'
- Standardized print format for returned error
- return the error value allowing shortening calls like:

if (ret) {
dev_err(...);
return ret;
}

to

if (ret)
return dev_err_probe(...);

Convert the ROHM BD71828, ROHM BD71815 and ROHM BD9576 regulator drivers
to use the dev_err_probe() when returned error is not hard-coded constant.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/0b644da4a8f58558ffe474d2593f85c46de2f965.1669203610.git.mazziesaccount@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 97c9278e 05-Sep-2022 Dmitry Torokhov <dmitry.torokhov@gmail.com>

regulator: bd71815: switch to using devm_fwnode_gpiod_get()

I would like to stop exporting OF-specific devm_gpiod_get_from_of_node()
so that gpiolib can be cleaned a bit, so let's switch to the generic
fwnode property API.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://lore.kernel.org/r/20220903-gpiod_get_from_of_node-remove-v1-8-b29adfb27a6c@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 555767fd 04-Oct-2021 Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>

regulator: bd71815: Use defined mask values

Consistently use the defines for buck control mask values.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/YVqpujZLZmaiqwe8@fedora
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0ea461b4 07-Jun-2021 Axel Lin <axel.lin@ingics.com>

regulator: bd71815: Get rid of struct bd71815_pmic

The content of bd71815_regulators is never changed, no need to duplicate
it, thus remove descs[BD71815_REGULATOR_CNT].
The *regmap, *dev and *rdev[BD71815_REGULATOR_CNT] are not really needed.
The *gps is unused.

Thus the struct bd71815_pmic can be removed.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/20210607143002.1600017-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# d149b855 27-May-2021 Zou Wei <zou_wei@huawei.com>

regulator: bd71815: fix platform_no_drv_owner.cocci warnings

./drivers/regulator/bd71815-regulator.c:644:3-8: No need to set .owner here. The core will do it.

Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Acked-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Message-Id: <1622109244-54739-1-git-send-email-zou_wei@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3799fa23 18-May-2021 Axel Lin <axel.lin@ingics.com>

regulator: bd71815: Fix missing include files

Include linux/of.h and linux/gpio/consumer.h to fix below errors:
error: implicit declaration of function ‘of_match_ptr’
error: implicit declaration of function ‘devm_gpiod_get_from_of_node’

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/20210518114843.1495152-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 1aad3900 05-Apr-2021 Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>

regulator: Support ROHM BD71815 regulators

Support voltage control for regulators on ROHM BD71815 PMIC.

ROHM BD71815 contains 5 bucks, 7 LDOs and a boost (intended for LED).
Bucks 1 and 2 support HW state based voltage level and enable states. Other
regulators support HW state based enable states. All bucks and LDOs 1-5
allow voltage changes for RUN state and LDO4 can be enabled/disabled via
GPIO.

LDO3 does support changing between two predetermined voltages by using
a GPIO but this functionality is not included in this commit.

This work is derived from driver originally written by Tony Luo
<luofc@embedinfo.com> - although not much of original work is left.

Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>