mbox series

[v2,0/5] soc: loongson: Fix some issues about loongson_pm2

Message ID cover.1693474728.git.zhoubinbin@loongson.cn
Headers show
Series soc: loongson: Fix some issues about loongson_pm2 | expand

Message

Binbin Zhou Aug. 31, 2023, 11:43 a.m. UTC
Hi all:

Since commit 67694c076bd7 ("soc: loongson2_pm: add power management support"),
the Loongson-2K PM driver was added, some issues have been found and
this patchset is planned to fix these issues.

Specific:
Patch 1: Compilation error found by Randy;
Patch 2/3: Rewriting the ls2k-pmc compatible attribute with fallback
compatible;
Patch 4/5: Add Loongson-2K SoC reboot/shutdown support as part of power
management.

Thanks.

-----
V2:
patch 1:
 - Change "depends on INPUT" to "depends on INPUT=y", because the
   compilation error still exists when "INPUT=m".
patch 2:
  - Use ls2k0500 as the fallback compatible;
  - Add ls2k2000 compatible.
patch 3:
 - Drop ls2k1000 compatible, for ls2k0500 is used as the fallback
   compatible.
patch 4:
  - Drop label;
  - Drop regmap property in syscon-reboot, for it's deprecated;
  - Add missing space.

Link to V1:
https://lore.kernel.org/all/cover.1693218539.git.zhoubinbin@loongson.cn/

Binbin Zhou (5):
  soc: loongson: loongson_pm2: Add dependency for INPUT
  dt-bindings: soc: loongson,ls2k-pmc: Use fallbacks for ls2k-pmc
    compatible
  soc: loongson: loongson_pm2: Drop useless of_device_id compatible
  dt-bindings: soc: loongson,ls2k-pmc: Allow
    syscon-reboot/syscon-poweroff as child
  soc: loongson: loongson_pm2: Populate children syscon nodes

 .../soc/loongson/loongson,ls2k-pmc.yaml       | 43 ++++++++++++++++---
 drivers/soc/loongson/Kconfig                  |  1 +
 drivers/soc/loongson/loongson2_pm.c           |  7 ++-
 3 files changed, 44 insertions(+), 7 deletions(-)

Comments

Binbin Zhou Sept. 1, 2023, 3:05 a.m. UTC | #1
Hi Conor:

Thanks for your reply.

On Thu, Aug 31, 2023 at 11:15 PM Conor Dooley <conor@kernel.org> wrote:
>
> On Thu, Aug 31, 2023 at 07:43:13PM +0800, Binbin Zhou wrote:
> > Now, "loongson,ls2k0500-pmc" is used as fallback compatible, so the
> > ls2k1000 compatible in the driver can be dropped directly.
> >
> > Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> > ---
> >  drivers/soc/loongson/loongson2_pm.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/soc/loongson/loongson2_pm.c b/drivers/soc/loongson/loongson2_pm.c
> > index 796add6e8b63..5ffb77afd9eb 100644
> > --- a/drivers/soc/loongson/loongson2_pm.c
> > +++ b/drivers/soc/loongson/loongson2_pm.c
> > @@ -197,7 +197,6 @@ static int loongson2_pm_probe(struct platform_device *pdev)
> >
> >  static const struct of_device_id loongson2_pm_match[] = {
> >       { .compatible = "loongson,ls2k0500-pmc", },
> > -     { .compatible = "loongson,ls2k1000-pmc", },
>
> What about older devicetrees that do not have the fallback? Aren't you
> going to remove support for those?

This driver was just merged in during the v6.6 window, and no release
will use it until now.

commit 67694c076bd7 soc: loongson2_pm: add power management support
commit 6054a676e969 soc: dt-bindings: add loongson-2 pm

Of course, it was our mistake not to make better use of fallback
compatible when submitting the driver, and we hope to fix this mistake
soon.
Also, this driver will only be used by the LoongArch architecture, no
need to worry about other architectures.

Thanks.
Binbin
>
> >       {},
> >  };
> >
> > --
> > 2.39.3
> >
Conor Dooley Sept. 1, 2023, 6:32 a.m. UTC | #2
On Fri, Sep 01, 2023 at 11:05:12AM +0800, Binbin Zhou wrote:
> Hi Conor:
> 
> Thanks for your reply.
> 
> On Thu, Aug 31, 2023 at 11:15 PM Conor Dooley <conor@kernel.org> wrote:
> >
> > On Thu, Aug 31, 2023 at 07:43:13PM +0800, Binbin Zhou wrote:
> > > Now, "loongson,ls2k0500-pmc" is used as fallback compatible, so the
> > > ls2k1000 compatible in the driver can be dropped directly.
> > >
> > > Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
> > > ---
> > >  drivers/soc/loongson/loongson2_pm.c | 1 -
> > >  1 file changed, 1 deletion(-)
> > >
> > > diff --git a/drivers/soc/loongson/loongson2_pm.c b/drivers/soc/loongson/loongson2_pm.c
> > > index 796add6e8b63..5ffb77afd9eb 100644
> > > --- a/drivers/soc/loongson/loongson2_pm.c
> > > +++ b/drivers/soc/loongson/loongson2_pm.c
> > > @@ -197,7 +197,6 @@ static int loongson2_pm_probe(struct platform_device *pdev)
> > >
> > >  static const struct of_device_id loongson2_pm_match[] = {
> > >       { .compatible = "loongson,ls2k0500-pmc", },
> > > -     { .compatible = "loongson,ls2k1000-pmc", },
> >
> > What about older devicetrees that do not have the fallback? Aren't you
> > going to remove support for those?
> 
> This driver was just merged in during the v6.6 window, and no release
> will use it until now.

Ahh, thanks for the info. Your commits 1-3 should then all have Fixes:
tags pointing to the commits tat introduced the problems, if you intend
getting these applied as fixes before v6.6 gets released.

Thanks,
Conor.

> commit 67694c076bd7 soc: loongson2_pm: add power management support
> commit 6054a676e969 soc: dt-bindings: add loongson-2 pm
> 
> Of course, it was our mistake not to make better use of fallback
> compatible when submitting the driver, and we hope to fix this mistake
> soon.
> Also, this driver will only be used by the LoongArch architecture, no
> need to worry about other architectures.
> 
> Thanks.
> Binbin
> >
> > >       {},
> > >  };
> > >
> > > --
> > > 2.39.3
> > >