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+hua...@kernel.org>
---
 .../staging/hikey9xx/hi6421v600-regulator.c   | 27 ++++++++-----------
 1 file changed, 11 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/hikey9xx/hi6421v600-regulator.c 
b/drivers/staging/hikey9xx/hi6421v600-regulator.c
index f728118e84c0..72dd779d85e6 100644
--- a/drivers/staging/hikey9xx/hi6421v600-regulator.c
+++ b/drivers/staging/hikey9xx/hi6421v600-regulator.c
@@ -57,17 +57,17 @@ static const unsigned int ldo34_voltages[] = {
        3000000, 3100000, 3200000, 3300000
 };
 
-/*
- * _id - LDO id name string
- * _match - of match name string
- * v_table - voltage table
- * vreg - voltage select register
- * vmask - voltage select mask
- * ereg - enable register
- * emask - enable mask
- * odelay - off/on delay time in uS
- * ecomask - eco mode mask
- * ecoamp - eco mode load uppler limit in uA
+/**
+ * HI6421V600_LDO() - specify a LDO power line
+ * @_id: LDO id name string
+ * @vtable: voltage table
+ * @ereg: enable register
+ * @emask: enable mask
+ * @vreg: voltage select register
+ * @odelay: off/on delay time in uS
+ * @etime: enable time in uS
+ * @ecomask: eco mode mask
+ * @ecoamp: eco mode load uppler limit in uA
  */
 #define HI6421V600_LDO(_id, vtable, ereg, emask, vreg,                        \
                       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 */
        mutex_lock(&sreg->enable_mutex);
 
-       /* set enable register */
        ret = hi6421_spmi_pmic_rmw(pmic, rdev->desc->enable_reg,
                                   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_pmic *pmic = sreg->pmic;
 
-       /* set enable register to 0 */
        return hi6421_spmi_pmic_rmw(pmic, rdev->desc->enable_reg,
                                    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;
        u32 reg_val;
 
-       /* get voltage selector */
        reg_val = hi6421_spmi_pmic_read(pmic, rdev->desc->vsel_reg);
 
        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;
        }
 
-       /* set mode */
        return hi6421_spmi_pmic_rmw(pmic, rdev->desc->enable_reg,
                                    sreg->eco_mode_mask, val);
 }
@@ -304,7 +300,6 @@ static int hi6421_spmi_regulator_probe(struct 
platform_device *pdev)
        mutex_init(&sreg->enable_mutex);
 
        for (i = 0; i < ARRAY_SIZE(regulator_info); i++) {
-               /* assign per-regulator data */
                info = &regulator_info[i];
 
                config.dev = pdev->dev.parent;
-- 
2.29.2

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to