mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
staging: hikey9xx: hi6421v600-regulator: cleanup comments
Remove obvious comments and fix the comment for the HI6421V600_LDO() macro. While on it, use kernel-doc notation for HI6421V600_LDO(), as kernel-doc can check if the arguments match its description. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/d5e6dbdee5f7e143300249251ddbe09fdf64e669.1611212783.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
fd765da060
commit
54f1155af6
1 changed files with 11 additions and 16 deletions
|
@ -57,17 +57,17 @@ static const unsigned int ldo34_voltages[] = {
|
||||||
3000000, 3100000, 3200000, 3300000
|
3000000, 3100000, 3200000, 3300000
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* _id - LDO id name string
|
* HI6421V600_LDO() - specify a LDO power line
|
||||||
* _match - of match name string
|
* @_id: LDO id name string
|
||||||
* v_table - voltage table
|
* @vtable: voltage table
|
||||||
* vreg - voltage select register
|
* @ereg: enable register
|
||||||
* vmask - voltage select mask
|
* @emask: enable mask
|
||||||
* ereg - enable register
|
* @vreg: voltage select register
|
||||||
* emask - enable mask
|
* @odelay: off/on delay time in uS
|
||||||
* odelay - off/on delay time in uS
|
* @etime: enable time in uS
|
||||||
* ecomask - eco mode mask
|
* @ecomask: eco mode mask
|
||||||
* ecoamp - eco mode load uppler limit in uA
|
* @ecoamp: eco mode load uppler limit in uA
|
||||||
*/
|
*/
|
||||||
#define HI6421V600_LDO(_id, vtable, ereg, emask, vreg, \
|
#define HI6421V600_LDO(_id, vtable, ereg, emask, vreg, \
|
||||||
odelay, etime, ecomask, ecoamp) \
|
odelay, etime, ecomask, ecoamp) \
|
||||||
|
@ -114,7 +114,6 @@ static int hi6421_spmi_regulator_enable(struct regulator_dev *rdev)
|
||||||
/* cannot enable more than one regulator at one time */
|
/* cannot enable more than one regulator at one time */
|
||||||
mutex_lock(&sreg->enable_mutex);
|
mutex_lock(&sreg->enable_mutex);
|
||||||
|
|
||||||
/* set enable register */
|
|
||||||
ret = hi6421_spmi_pmic_rmw(pmic, rdev->desc->enable_reg,
|
ret = hi6421_spmi_pmic_rmw(pmic, rdev->desc->enable_reg,
|
||||||
rdev->desc->enable_mask,
|
rdev->desc->enable_mask,
|
||||||
rdev->desc->enable_mask);
|
rdev->desc->enable_mask);
|
||||||
|
@ -132,7 +131,6 @@ static int hi6421_spmi_regulator_disable(struct regulator_dev *rdev)
|
||||||
struct hi6421_spmi_reg_info *sreg = rdev_get_drvdata(rdev);
|
struct hi6421_spmi_reg_info *sreg = rdev_get_drvdata(rdev);
|
||||||
struct hi6421_spmi_pmic *pmic = sreg->pmic;
|
struct hi6421_spmi_pmic *pmic = sreg->pmic;
|
||||||
|
|
||||||
/* set enable register to 0 */
|
|
||||||
return hi6421_spmi_pmic_rmw(pmic, rdev->desc->enable_reg,
|
return hi6421_spmi_pmic_rmw(pmic, rdev->desc->enable_reg,
|
||||||
rdev->desc->enable_mask, 0);
|
rdev->desc->enable_mask, 0);
|
||||||
}
|
}
|
||||||
|
@ -143,7 +141,6 @@ static int hi6421_spmi_regulator_get_voltage_sel(struct regulator_dev *rdev)
|
||||||
struct hi6421_spmi_pmic *pmic = sreg->pmic;
|
struct hi6421_spmi_pmic *pmic = sreg->pmic;
|
||||||
u32 reg_val;
|
u32 reg_val;
|
||||||
|
|
||||||
/* get voltage selector */
|
|
||||||
reg_val = hi6421_spmi_pmic_read(pmic, rdev->desc->vsel_reg);
|
reg_val = hi6421_spmi_pmic_read(pmic, rdev->desc->vsel_reg);
|
||||||
|
|
||||||
return (reg_val & rdev->desc->vsel_mask) >> (ffs(rdev->desc->vsel_mask) - 1);
|
return (reg_val & rdev->desc->vsel_mask) >> (ffs(rdev->desc->vsel_mask) - 1);
|
||||||
|
@ -198,7 +195,6 @@ static int hi6421_spmi_regulator_set_mode(struct regulator_dev *rdev,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set mode */
|
|
||||||
return hi6421_spmi_pmic_rmw(pmic, rdev->desc->enable_reg,
|
return hi6421_spmi_pmic_rmw(pmic, rdev->desc->enable_reg,
|
||||||
sreg->eco_mode_mask, val);
|
sreg->eco_mode_mask, val);
|
||||||
}
|
}
|
||||||
|
@ -304,7 +300,6 @@ static int hi6421_spmi_regulator_probe(struct platform_device *pdev)
|
||||||
mutex_init(&sreg->enable_mutex);
|
mutex_init(&sreg->enable_mutex);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(regulator_info); i++) {
|
for (i = 0; i < ARRAY_SIZE(regulator_info); i++) {
|
||||||
/* assign per-regulator data */
|
|
||||||
info = ®ulator_info[i];
|
info = ®ulator_info[i];
|
||||||
|
|
||||||
config.dev = pdev->dev.parent;
|
config.dev = pdev->dev.parent;
|
||||||
|
|
Loading…
Reference in a new issue