1
1
// SPDX-License-Identifier: GPL-2.0-only
2
2
/*
3
- * Regulator driver for Rockchip RK805/RK808/RK818
3
+ * Regulator driver for Rockchip RK80x and RK81x PMIC series
4
4
*
5
5
* Copyright (c) 2014, Fuzhou Rockchip Electronics Co., Ltd
6
6
* Copyright (c) 2021 Rockchip Electronics Co., Ltd.
23
23
#include <linux/regulator/of_regulator.h>
24
24
#include <linux/gpio/consumer.h>
25
25
26
- /* Field Definitions */
26
+ /* Field definitions */
27
27
#define RK808_BUCK_VSEL_MASK 0x3f
28
28
#define RK808_BUCK4_VSEL_MASK 0xf
29
29
#define RK808_LDO_VSEL_MASK 0x1f
@@ -1829,9 +1829,8 @@ static const struct regulator_desc rk818_reg[] = {
1829
1829
RK818_DCDC_EN_REG , BIT (7 )),
1830
1830
};
1831
1831
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 )
1835
1834
{
1836
1835
struct device_node * np ;
1837
1836
int tmp , ret = 0 , i ;
@@ -1842,8 +1841,7 @@ static int rk808_regulator_dt_parse_pdata(struct device *dev,
1842
1841
1843
1842
for (i = 0 ; i < ARRAY_SIZE (pdata -> dvs_gpio ); i ++ ) {
1844
1843
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 );
1847
1845
if (IS_ERR (pdata -> dvs_gpio [i ])) {
1848
1846
ret = PTR_ERR (pdata -> dvs_gpio [i ]);
1849
1847
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,
1857
1855
1858
1856
tmp = i ? RK808_DVS2_POL : RK808_DVS1_POL ;
1859
1857
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 );
1862
1859
}
1863
1860
1864
1861
dt_parse_end :
@@ -1954,7 +1951,7 @@ static struct platform_driver rk808_regulator_driver = {
1954
1951
1955
1952
module_platform_driver (rk808_regulator_driver );
1956
1953
1957
- MODULE_DESCRIPTION ("regulator driver for the RK805/RK808/RK818 series PMICs " );
1954
+ MODULE_DESCRIPTION ("Rockchip RK80x/RK81x PMIC series regulator driver " );
1958
1955
MODULE_AUTHOR (
"Tony xie <[email protected] >" );
1959
1956
MODULE_AUTHOR (
"Chris Zhong <[email protected] >" );
1960
1957
MODULE_AUTHOR (
"Zhang Qing <[email protected] >" );
0 commit comments