mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
regulator: rk808: Perform trivial code cleanups
Perform a few trivial code cleanups, to improve the accuracy and wording of a couple of comments and the module description, and to avoid line wrapping in a few places by using the 100-column width a bit better. No intended functional changes are introduced by these code cleanups. Signed-off-by: Dragan Simic <dsimic@manjaro.org> Link: https://patch.msgid.link/ac44aefcc7b3adbd8dcc5654a5ef8c493ce21ea0.1728902488.git.dsimic@manjaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
3e7a84b347
commit
a2f899691d
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Regulator driver for Rockchip RK805/RK808/RK818
|
||||
* Regulator driver for Rockchip RK80x and RK81x PMIC series
|
||||
*
|
||||
* Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd
|
||||
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
#include <linux/regulator/of_regulator.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
|
||||
/* Field Definitions */
|
||||
/* Field definitions */
|
||||
#define RK808_BUCK_VSEL_MASK 0x3f
|
||||
#define RK808_BUCK4_VSEL_MASK 0xf
|
||||
#define RK808_LDO_VSEL_MASK 0x1f
|
||||
|
|
@ -1829,9 +1829,8 @@ static const struct regulator_desc rk818_reg[] = {
|
|||
RK818_DCDC_EN_REG, BIT(7)),
|
||||
};
|
||||
|
||||
static int rk808_regulator_dt_parse_pdata(struct device *dev,
|
||||
struct regmap *map,
|
||||
struct rk808_regulator_data *pdata)
|
||||
static int rk808_regulator_dt_parse_pdata(struct device *dev, struct regmap *map,
|
||||
struct rk808_regulator_data *pdata)
|
||||
{
|
||||
struct device_node *np;
|
||||
int tmp, ret = 0, i;
|
||||
|
|
@ -1842,8 +1841,7 @@ static int rk808_regulator_dt_parse_pdata(struct device *dev,
|
|||
|
||||
for (i = 0; i < ARRAY_SIZE(pdata->dvs_gpio); i++) {
|
||||
pdata->dvs_gpio[i] =
|
||||
devm_gpiod_get_index_optional(dev, "dvs", i,
|
||||
GPIOD_OUT_LOW);
|
||||
devm_gpiod_get_index_optional(dev, "dvs", i, GPIOD_OUT_LOW);
|
||||
if (IS_ERR(pdata->dvs_gpio[i])) {
|
||||
ret = PTR_ERR(pdata->dvs_gpio[i]);
|
||||
dev_err(dev, "failed to get dvs%d gpio (%d)\n", i, ret);
|
||||
|
|
@ -1857,8 +1855,7 @@ static int rk808_regulator_dt_parse_pdata(struct device *dev,
|
|||
|
||||
tmp = i ? RK808_DVS2_POL : RK808_DVS1_POL;
|
||||
ret = regmap_update_bits(map, RK808_IO_POL_REG, tmp,
|
||||
gpiod_is_active_low(pdata->dvs_gpio[i]) ?
|
||||
0 : tmp);
|
||||
gpiod_is_active_low(pdata->dvs_gpio[i]) ? 0 : tmp);
|
||||
}
|
||||
|
||||
dt_parse_end:
|
||||
|
|
@ -1954,7 +1951,7 @@ static struct platform_driver rk808_regulator_driver = {
|
|||
|
||||
module_platform_driver(rk808_regulator_driver);
|
||||
|
||||
MODULE_DESCRIPTION("regulator driver for the RK805/RK808/RK818 series PMICs");
|
||||
MODULE_DESCRIPTION("Rockchip RK80x/RK81x PMIC series regulator driver");
|
||||
MODULE_AUTHOR("Tony xie <tony.xie@rock-chips.com>");
|
||||
MODULE_AUTHOR("Chris Zhong <zyw@rock-chips.com>");
|
||||
MODULE_AUTHOR("Zhang Qing <zhangqing@rock-chips.com>");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user