Unverified Commit a2f89969 authored by Dragan Simic's avatar Dragan Simic Committed by Mark Brown
Browse files

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: default avatarDragan Simic <dsimic@manjaro.org>
Link: https://patch.msgid.link/ac44aefcc7b3adbd8dcc5654a5ef8c493ce21ea0.1728902488.git.dsimic@manjaro.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3e7a84b3
Loading
Loading
Loading
Loading
+7 −10
Original line number Diff line number Diff line
// 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,8 +1829,7 @@ 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,
static int rk808_regulator_dt_parse_pdata(struct device *dev, struct regmap *map,
					  struct rk808_regulator_data *pdata)
{
	struct device_node *np;
@@ -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>");