Skip to content

Commit a2f8996

Browse files
Dragan Simicbroonie
authored andcommitted
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>
1 parent 3e7a84b commit a2f8996

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

drivers/regulator/rk808-regulator.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/*
3-
* Regulator driver for Rockchip RK805/RK808/RK818
3+
* Regulator driver for Rockchip RK80x and RK81x PMIC series
44
*
55
* Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd
66
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
@@ -23,7 +23,7 @@
2323
#include <linux/regulator/of_regulator.h>
2424
#include <linux/gpio/consumer.h>
2525

26-
/* Field Definitions */
26+
/* Field definitions */
2727
#define RK808_BUCK_VSEL_MASK 0x3f
2828
#define RK808_BUCK4_VSEL_MASK 0xf
2929
#define RK808_LDO_VSEL_MASK 0x1f
@@ -1829,9 +1829,8 @@ static const struct regulator_desc rk818_reg[] = {
18291829
RK818_DCDC_EN_REG, BIT(7)),
18301830
};
18311831

1832-
static int rk808_regulator_dt_parse_pdata(struct device *dev,
1833-
struct regmap *map,
1834-
struct rk808_regulator_data *pdata)
1832+
static int rk808_regulator_dt_parse_pdata(struct device *dev, struct regmap *map,
1833+
struct rk808_regulator_data *pdata)
18351834
{
18361835
struct device_node *np;
18371836
int tmp, ret = 0, i;
@@ -1842,8 +1841,7 @@ static int rk808_regulator_dt_parse_pdata(struct device *dev,
18421841

18431842
for (i = 0; i < ARRAY_SIZE(pdata->dvs_gpio); i++) {
18441843
pdata->dvs_gpio[i] =
1845-
devm_gpiod_get_index_optional(dev, "dvs", i,
1846-
GPIOD_OUT_LOW);
1844+
devm_gpiod_get_index_optional(dev, "dvs", i, GPIOD_OUT_LOW);
18471845
if (IS_ERR(pdata->dvs_gpio[i])) {
18481846
ret = PTR_ERR(pdata->dvs_gpio[i]);
18491847
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,
18571855

18581856
tmp = i ? RK808_DVS2_POL : RK808_DVS1_POL;
18591857
ret = regmap_update_bits(map, RK808_IO_POL_REG, tmp,
1860-
gpiod_is_active_low(pdata->dvs_gpio[i]) ?
1861-
0 : tmp);
1858+
gpiod_is_active_low(pdata->dvs_gpio[i]) ? 0 : tmp);
18621859
}
18631860

18641861
dt_parse_end:
@@ -1954,7 +1951,7 @@ static struct platform_driver rk808_regulator_driver = {
19541951

19551952
module_platform_driver(rk808_regulator_driver);
19561953

1957-
MODULE_DESCRIPTION("regulator driver for the RK805/RK808/RK818 series PMICs");
1954+
MODULE_DESCRIPTION("Rockchip RK80x/RK81x PMIC series regulator driver");
19581955
MODULE_AUTHOR("Tony xie <tony.xie@rock-chips.com>");
19591956
MODULE_AUTHOR("Chris Zhong <zyw@rock-chips.com>");
19601957
MODULE_AUTHOR("Zhang Qing <zhangqing@rock-chips.com>");

0 commit comments

Comments
 (0)