Reorder the regulator resources.
Fixes: 4ee06e10dd26 ("mfd: mt6360: Combine mt6360 pmic/ldo resources
into mt6360 regulator resources")
Signed-off-by: Fei Shao <[email protected]>
---
drivers/mfd/mt6360-core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c
index e628953548ce..6eaa6775b888 100644
--- a/drivers/mfd/mt6360-core.c
+++ b/drivers/mfd/mt6360-core.c
@@ -319,18 +319,18 @@ static const struct resource mt6360_regulator_resources[] = {
DEFINE_RES_IRQ_NAMED(MT6360_BUCK2_OC_EVT, "buck2_oc_evt"),
DEFINE_RES_IRQ_NAMED(MT6360_BUCK2_OV_EVT, "buck2_ov_evt"),
DEFINE_RES_IRQ_NAMED(MT6360_BUCK2_UV_EVT, "buck2_uv_evt"),
- DEFINE_RES_IRQ_NAMED(MT6360_LDO6_OC_EVT, "ldo6_oc_evt"),
- DEFINE_RES_IRQ_NAMED(MT6360_LDO7_OC_EVT, "ldo7_oc_evt"),
- DEFINE_RES_IRQ_NAMED(MT6360_LDO6_PGB_EVT, "ldo6_pgb_evt"),
- DEFINE_RES_IRQ_NAMED(MT6360_LDO7_PGB_EVT, "ldo7_pgb_evt"),
DEFINE_RES_IRQ_NAMED(MT6360_LDO1_OC_EVT, "ldo1_oc_evt"),
DEFINE_RES_IRQ_NAMED(MT6360_LDO2_OC_EVT, "ldo2_oc_evt"),
DEFINE_RES_IRQ_NAMED(MT6360_LDO3_OC_EVT, "ldo3_oc_evt"),
DEFINE_RES_IRQ_NAMED(MT6360_LDO5_OC_EVT, "ldo5_oc_evt"),
+ DEFINE_RES_IRQ_NAMED(MT6360_LDO6_OC_EVT, "ldo6_oc_evt"),
+ DEFINE_RES_IRQ_NAMED(MT6360_LDO7_OC_EVT, "ldo7_oc_evt"),
DEFINE_RES_IRQ_NAMED(MT6360_LDO1_PGB_EVT, "ldo1_pgb_evt"),
DEFINE_RES_IRQ_NAMED(MT6360_LDO2_PGB_EVT, "ldo2_pgb_evt"),
DEFINE_RES_IRQ_NAMED(MT6360_LDO3_PGB_EVT, "ldo3_pgb_evt"),
DEFINE_RES_IRQ_NAMED(MT6360_LDO5_PGB_EVT, "ldo5_pgb_evt"),
+ DEFINE_RES_IRQ_NAMED(MT6360_LDO6_PGB_EVT, "ldo6_pgb_evt"),
+ DEFINE_RES_IRQ_NAMED(MT6360_LDO7_PGB_EVT, "ldo7_pgb_evt"),
};
static const struct mfd_cell mt6360_devs[] = {
--
2.32.0.93.g670b81a890-goog
This adds back a missing error message for better log readability.
Fixes: e84702940613 ("mfd: mt6360: Fix flow which is used to check ic
exist")
Signed-off-by: Fei Shao <[email protected]>
---
drivers/mfd/mt6360-core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c
index 6eaa6775b888..0ff8dae4536c 100644
--- a/drivers/mfd/mt6360-core.c
+++ b/drivers/mfd/mt6360-core.c
@@ -351,8 +351,10 @@ static int mt6360_check_vendor_info(struct mt6360_ddata *ddata)
int ret;
ret = regmap_read(ddata->regmap, MT6360_PMU_DEV_INFO, &info);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(ddata->dev, "Failed to read device info from regmap\n");
return ret;
+ }
if ((info & CHIP_VEN_MASK) != CHIP_VEN_MT6360) {
dev_err(ddata->dev, "Device not supported\n");
--
2.32.0.93.g670b81a890-goog
On Tue, Jun 29, 2021 at 5:44 PM Fei Shao <[email protected]> wrote:
> This adds back a missing error message for better log readability.
I have no preference for the patch. When the regmap_read() fails,
mt6360 will fail to probe and return the errno anyway.
On Tue, Jun 29, 2021 at 5:44 PM Fei Shao <[email protected]> wrote:
> Reorder the regulator resources.
Would be better to mention the list is sorted by their IRQ number.
> Fixes: 4ee06e10dd26 ("mfd: mt6360: Combine mt6360 pmic/ldo resources
> into mt6360 regulator resources")
It doesn't need to be a fixup for 4ee06e10dd26 but a follow up cleanup.
On Tue, 29 Jun 2021, Fei Shao wrote:
> Reorder the regulator resources.
>
> Fixes: 4ee06e10dd26 ("mfd: mt6360: Combine mt6360 pmic/ldo resources
> into mt6360 regulator resources")
I removed the Fixes tag, as it doesn't fix any bugs.
> Signed-off-by: Fei Shao <[email protected]>
> ---
>
> drivers/mfd/mt6360-core.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
Applied, thanks.
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
On Tue, 29 Jun 2021, Fei Shao wrote:
> This adds back a missing error message for better log readability.
>
> Fixes: e84702940613 ("mfd: mt6360: Fix flow which is used to check ic
> exist")
>
> Signed-off-by: Fei Shao <[email protected]>
> ---
>
> drivers/mfd/mt6360-core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c
> index 6eaa6775b888..0ff8dae4536c 100644
> --- a/drivers/mfd/mt6360-core.c
> +++ b/drivers/mfd/mt6360-core.c
> @@ -351,8 +351,10 @@ static int mt6360_check_vendor_info(struct mt6360_ddata *ddata)
> int ret;
>
> ret = regmap_read(ddata->regmap, MT6360_PMU_DEV_INFO, &info);
> - if (ret < 0)
> + if (ret < 0) {
> + dev_err(ddata->dev, "Failed to read device info from regmap\n");
I'm not fussed about this change either, but if you insist, please
change the commit message to be a little more generic. Users don't
care about Regmaps and developers can grep it in the source.
Suggest: "Failed to fetch device information from H/W"
> return ret;
> + }
>
> if ((info & CHIP_VEN_MASK) != CHIP_VEN_MT6360) {
> dev_err(ddata->dev, "Device not supported\n");
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
On Fri, Jul 16, 2021 at 4:03 PM Lee Jones <[email protected]> wrote:
>
> On Tue, 29 Jun 2021, Fei Shao wrote:
>
> > This adds back a missing error message for better log readability.
> >
> > Fixes: e84702940613 ("mfd: mt6360: Fix flow which is used to check ic
> > exist")
> >
> > Signed-off-by: Fei Shao <[email protected]>
> > ---
> >
> > drivers/mfd/mt6360-core.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/mfd/mt6360-core.c b/drivers/mfd/mt6360-core.c
> > index 6eaa6775b888..0ff8dae4536c 100644
> > --- a/drivers/mfd/mt6360-core.c
> > +++ b/drivers/mfd/mt6360-core.c
> > @@ -351,8 +351,10 @@ static int mt6360_check_vendor_info(struct mt6360_ddata *ddata)
> > int ret;
> >
> > ret = regmap_read(ddata->regmap, MT6360_PMU_DEV_INFO, &info);
> > - if (ret < 0)
> > + if (ret < 0) {
> > + dev_err(ddata->dev, "Failed to read device info from regmap\n");
>
> I'm not fussed about this change either, but if you insist, please
> change the commit message to be a little more generic. Users don't
> care about Regmaps and developers can grep it in the source.
>
> Suggest: "Failed to fetch device information from H/W"
I think I was a bit too paranoid about this. Please ignore this as it
doesn't make much sense, and thanks both of you for the feedback. :)
Fei
>
> > return ret;
> > + }
> >
> > if ((info & CHIP_VEN_MASK) != CHIP_VEN_MT6360) {
> > dev_err(ddata->dev, "Device not supported\n");
>
> --
> Lee Jones [李琼斯]
> Senior Technical Lead - Developer Services
> Linaro.org │ Open source software for Arm SoCs
> Follow Linaro: Facebook | Twitter | Blog