Re: [PATCH v4 09/15] arm64: dts: msm8996: thermal: Add interrupt support

2019-09-20 Thread Stephen Boyd
Quoting Amit Kucheria (2019-09-20 15:14:58)
> On Fri, Sep 20, 2019 at 3:09 PM Stephen Boyd  wrote:
> >
> > Ok so the plan is to change DT and then change it back? That sounds
> > quite bad so please fix the thermal core to not care about this before
> > applying these changes so that we don't churn DT.
> 
> Hi Stephen,
> 
> Our emails crossed paths. I think we could just make the property
> optional so that we can remove the property completely for drivers
> that support interrupts. Comments?

OK. This means that the delay properties become irrelevant once an
interrupt is there? I guess that's OK. My concern is that we need to
choose one or the other when it would be simpler to have both and
fallback to the delays so that DT migration strategies are purely
additive. It's not like the delays aren't calculated to be those numbers
anymore. They're just not going to be used.

> 
> That is a bigger change to the bindings and I don't want to hold the
> tsens interrupt support hostage to agreement on this.

Alright. I admit I haven't looked into the details but is it hard for
some reason to make it use interrupts before delays?



Re: [PATCH v4 09/15] arm64: dts: msm8996: thermal: Add interrupt support

2019-09-20 Thread Amit Kucheria
On Fri, Sep 20, 2019 at 3:09 PM Stephen Boyd  wrote:
>
> Quoting Amit Kucheria (2019-09-20 15:07:25)
> > On Fri, Sep 20, 2019 at 3:02 PM Stephen Boyd  wrote:
> > >
> > > Quoting Amit Kucheria (2019-09-20 14:52:24)
> > > > Register upper-lower interrupts for each of the two tsens controllers.
> > > >
> > > > Signed-off-by: Amit Kucheria 
> > > > ---
> > > >  arch/arm64/boot/dts/qcom/msm8996.dtsi | 60 ++-
> > > >  1 file changed, 32 insertions(+), 28 deletions(-)
> > > >
> > > > diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
> > > > b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > > index 96c0a481f454..bb763b362c16 100644
> > > > --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > > +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > > @@ -175,8 +175,8 @@
> > > >
> > > > thermal-zones {
> > > > cpu0-thermal {
> > > > -   polling-delay-passive = <250>;
> > > > -   polling-delay = <1000>;
> > > > +   polling-delay-passive = <0>;
> > > > +   polling-delay = <0>;
> > >
> > > I thought the plan was to make this unnecessary to change?
> >
> > IMO that change should be part of a different series to the thermal
> > core. I've not actually started working on it yet (traveling for the
> > next 10 days or so) but plan to do it.
> >
>
> Ok so the plan is to change DT and then change it back? That sounds
> quite bad so please fix the thermal core to not care about this before
> applying these changes so that we don't churn DT.

Hi Stephen,

Our emails crossed paths. I think we could just make the property
optional so that we can remove the property completely for drivers
that support interrupts. Comments?

That is a bigger change to the bindings and I don't want to hold the
tsens interrupt support hostage to agreement on this.

Regards,
Amit


Re: [PATCH v4 09/15] arm64: dts: msm8996: thermal: Add interrupt support

2019-09-20 Thread Amit Kucheria
On Fri, Sep 20, 2019 at 3:07 PM Amit Kucheria  wrote:
>
> On Fri, Sep 20, 2019 at 3:02 PM Stephen Boyd  wrote:
> >
> > Quoting Amit Kucheria (2019-09-20 14:52:24)
> > > Register upper-lower interrupts for each of the two tsens controllers.
> > >
> > > Signed-off-by: Amit Kucheria 
> > > ---
> > >  arch/arm64/boot/dts/qcom/msm8996.dtsi | 60 ++-
> > >  1 file changed, 32 insertions(+), 28 deletions(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
> > > b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > index 96c0a481f454..bb763b362c16 100644
> > > --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > @@ -175,8 +175,8 @@
> > >
> > > thermal-zones {
> > > cpu0-thermal {
> > > -   polling-delay-passive = <250>;
> > > -   polling-delay = <1000>;
> > > +   polling-delay-passive = <0>;
> > > +   polling-delay = <0>;
> >
> > I thought the plan was to make this unnecessary to change?
>
> IMO that change should be part of a different series to the thermal
> core. I've not actually started working on it yet (traveling for the
> next 10 days or so) but plan to do it.

In fact, I was thinking of making the entire property optional, so I
started down the path of converting the thermal bindings to YAML but
haven't finished the process yet.


Re: [PATCH v4 09/15] arm64: dts: msm8996: thermal: Add interrupt support

2019-09-20 Thread Stephen Boyd
Quoting Amit Kucheria (2019-09-20 15:07:25)
> On Fri, Sep 20, 2019 at 3:02 PM Stephen Boyd  wrote:
> >
> > Quoting Amit Kucheria (2019-09-20 14:52:24)
> > > Register upper-lower interrupts for each of the two tsens controllers.
> > >
> > > Signed-off-by: Amit Kucheria 
> > > ---
> > >  arch/arm64/boot/dts/qcom/msm8996.dtsi | 60 ++-
> > >  1 file changed, 32 insertions(+), 28 deletions(-)
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
> > > b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > index 96c0a481f454..bb763b362c16 100644
> > > --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > > @@ -175,8 +175,8 @@
> > >
> > > thermal-zones {
> > > cpu0-thermal {
> > > -   polling-delay-passive = <250>;
> > > -   polling-delay = <1000>;
> > > +   polling-delay-passive = <0>;
> > > +   polling-delay = <0>;
> >
> > I thought the plan was to make this unnecessary to change?
> 
> IMO that change should be part of a different series to the thermal
> core. I've not actually started working on it yet (traveling for the
> next 10 days or so) but plan to do it.
> 

Ok so the plan is to change DT and then change it back? That sounds
quite bad so please fix the thermal core to not care about this before
applying these changes so that we don't churn DT.



Re: [PATCH v4 09/15] arm64: dts: msm8996: thermal: Add interrupt support

2019-09-20 Thread Amit Kucheria
On Fri, Sep 20, 2019 at 3:02 PM Stephen Boyd  wrote:
>
> Quoting Amit Kucheria (2019-09-20 14:52:24)
> > Register upper-lower interrupts for each of the two tsens controllers.
> >
> > Signed-off-by: Amit Kucheria 
> > ---
> >  arch/arm64/boot/dts/qcom/msm8996.dtsi | 60 ++-
> >  1 file changed, 32 insertions(+), 28 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
> > b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > index 96c0a481f454..bb763b362c16 100644
> > --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> > @@ -175,8 +175,8 @@
> >
> > thermal-zones {
> > cpu0-thermal {
> > -   polling-delay-passive = <250>;
> > -   polling-delay = <1000>;
> > +   polling-delay-passive = <0>;
> > +   polling-delay = <0>;
>
> I thought the plan was to make this unnecessary to change?

IMO that change should be part of a different series to the thermal
core. I've not actually started working on it yet (traveling for the
next 10 days or so) but plan to do it.

Regards,
Amit


Re: [PATCH v4 09/15] arm64: dts: msm8996: thermal: Add interrupt support

2019-09-20 Thread Stephen Boyd
Quoting Amit Kucheria (2019-09-20 14:52:24)
> Register upper-lower interrupts for each of the two tsens controllers.
> 
> Signed-off-by: Amit Kucheria 
> ---
>  arch/arm64/boot/dts/qcom/msm8996.dtsi | 60 ++-
>  1 file changed, 32 insertions(+), 28 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi 
> b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> index 96c0a481f454..bb763b362c16 100644
> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi
> @@ -175,8 +175,8 @@
>  
> thermal-zones {
> cpu0-thermal {
> -   polling-delay-passive = <250>;
> -   polling-delay = <1000>;
> +   polling-delay-passive = <0>;
> +   polling-delay = <0>;

I thought the plan was to make this unnecessary to change?