staging: mfd: hi6421-spmi-pmic: cleanup OF properties
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 17 Aug 2020 07:10:37 +0000 (09:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Aug 2020 14:15:24 +0000 (16:15 +0200)
Simplify the names of the DT properties and do some cleanups,
in order to better document them.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/24ffcd28a17ee7b0940d8aabef556d172d5feddf.1597647359.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/hikey9xx/hi6421-spmi-pmic.c

index f523b2d..aed2d3e 100644 (file)
@@ -209,37 +209,37 @@ static int get_pmic_device_tree_data(struct device_node *np, struct hisi_pmic *p
        int ret = 0;
 
        /*get pmic irq num*/
-       ret = of_property_read_u32_array(np, "hisilicon,hisi-pmic-irq-num",
+       ret = of_property_read_u32_array(np, "irq-num",
                                         &pmic->irqnum, 1);
        if (ret) {
-               pr_err("no hisilicon,hisi-pmic-irq-num property set\n");
+               pr_err("no irq-num property set\n");
                ret = -ENODEV;
                return ret;
        }
 
        /*get pmic irq array number*/
-       ret = of_property_read_u32_array(np, "hisilicon,hisi-pmic-irq-array",
+       ret = of_property_read_u32_array(np, "irq-array",
                                         &pmic->irqarray, 1);
        if (ret) {
-               pr_err("no hisilicon,hisi-pmic-irq-array property set\n");
+               pr_err("no irq-array property set\n");
                ret = -ENODEV;
                return ret;
        }
 
        /*SOC_PMIC_IRQ_MASK_0_ADDR*/
-       ret = of_property_read_u32_array(np, "hisilicon,hisi-pmic-irq-mask-addr",
+       ret = of_property_read_u32_array(np, "irq-mask-addr",
                                         (int *)&pmic->irq_mask_addr, 2);
        if (ret) {
-               pr_err("no hisilicon,hisi-pmic-irq-mask-addr property set\n");
+               pr_err("no irq-mask-addr property set\n");
                ret = -ENODEV;
                return ret;
        }
 
        /*SOC_PMIC_IRQ0_ADDR*/
-       ret = of_property_read_u32_array(np, "hisilicon,hisi-pmic-irq-addr",
+       ret = of_property_read_u32_array(np, "irq-addr",
                                         (int *)&pmic->irq_addr, 2);
        if (ret) {
-               pr_err("no hisilicon,hisi-pmic-irq-addr property set\n");
+               pr_err("no irq-addr property set\n");
                ret = -ENODEV;
                return ret;
        }