All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@baylibre.com>
To: Andrew Davis <afd@ti.com>, jerome Neanne <jneanne@baylibre.com>,
	Nishanth Menon <nm@ti.com>
Cc: Lee Jones <lee@kernel.org>,
	lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org,
	kristo@kernel.org, dmitry.torokhov@gmail.com,
	krzysztof.kozlowski+dt@linaro.org, catalin.marinas@arm.com,
	will@kernel.org, tony@atomide.com, vigneshr@ti.com,
	bjorn.andersson@linaro.org, shawnguo@kernel.org,
	geert+renesas@glider.be, dmitry.baryshkov@linaro.org,
	marcel.ziswiler@toradex.com, vkoul@kernel.org,
	biju.das.jz@bp.renesas.com, arnd@arndb.de, jeff@labundy.com,
	narmstrong@baylibre.com, msp@baylibre.com, j-keerthy@ti.com,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-input@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH v6 4/6] mfd: tps65219: Add driver for TI TPS65219 PMIC
Date: Thu, 10 Nov 2022 12:16:27 -0800	[thread overview]
Message-ID: <7hfseqa7l0.fsf@baylibre.com> (raw)
In-Reply-To: <1231f3e6-61a7-ca3c-2fbb-679b583e0df1@ti.com>

Andrew Davis <afd@ti.com> writes:

> On 11/10/22 11:00 AM, Kevin Hilman wrote:
>> jerome Neanne <jneanne@baylibre.com> writes:
>> 
>>> On 09/11/2022 22:59, Andrew Davis wrote:
>>>> On 11/7/22 3:14 PM, Kevin Hilman wrote:
>>>>> Nishanth Menon <nm@ti.com> writes:
>>>>>
>>>>>> On 13:58-20221104, jerome Neanne wrote:
>>>>>>>
>>>>>> [...]
>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Can you try an compile with W=1 please.
>>>>>>> This raise one warning on mfd:
>>>>>>> drivers/mfd/tps65219.c:28:12: warning: ‘tps65219_soft_shutdown’
>>>>>>> defined but
>>>>>>> not used [-Wunused-function]
>>>>>>>      28 | static int tps65219_soft_shutdown(struct tps65219 *tps)
>>>>>>>         |            ^~~~~~~~~~~~~~~~~~~~~~
>>>>>>> soft_shutdown has been validated and is used in TI baseline even if not
>>>>>>> hooked in upstream version further to this review:
>>>>>>> https://lore.kernel.org/lkml/20220825150224.826258-5-msp@baylibre.com/
>>>>>>>
>>>>>>> It was a TI requirement to implement it...
>>>>>>> Let me know if you want me to remove this function or if we can keep
>>>>>>> it like
>>>>>>> this.
>>>>>>
>>>>>> There are platforms without psci, correct? I think the comment was to
>>>>>> drop the force override with system-power-controller property,
>>>>>>
>>>>>> if (!pm_power_off) {
>>>>>>      tps65219_i2c_client = client;
>>>>>>      pm_power_off = &tps65219_pm_power_off;
>>>>>> }
>>>>>>
>>>>>> Could still be valid for such platforms, no? I do see that the
>>>>>> capability that the PMIC has - which is software shutdown is a valid
>>>>>> feature that we support in many different PMIC drivers. Is'nt the job of
>>>>>> the driver to introduce the functionality in a manner that is
>>>>>> appropriate to the OS framework?
>>>>>
>>>>> Yeah, I think Nishanth is right here.
>>>>>
>>>>> We should probably keep the `if (!pm_power_off)` part so the PMIC will
>>>>> be used if PSCI is not, but it also allows an easy way to test/use the
>>>>> PMIC
>>>>> shutdown functionality downstream if needed.
>>>>>
>>>>
>>>> Then should be using the sys-off handler API[0] so it doesn't block PSCI
>>>> which is also switching over[1].
>>>>
>>>> Andrew
>>>>
>>>> [0] https://lwn.net/Articles/894511/
>>>> [1] https://www.spinics.net/lists/arm-kernel/msg1024127.html
>>> Can we go for upstream with v7 without tps65219_soft_shutdown. Then if
>>> everyone agrees with Andrew proposal, I'll submit a separate patch which
>>> adds implementation of tps65219_soft_shutdown support through sys-off
>>> handler.
>>>
>>> So that we are not blocking upstream in case further
>>> discussions/alignment are required.
>> 
>> Seems OK to me.  Nishanth?  Andrew?
>> 
>> But I think you'll need to at least submit a v8 without the unused
>> code/dead code that Lee pointed out.
>> 
>
> If you need the v8 anyway, then add support through sys-off in
> that spin, should only be a couple lines of change.

Oops, my mistake.  I see v7 already has the dead code removed.  I got
confused because this thread is on v6.

IMO, I think v7 should be merged v7 (mfd part is already ack'd by Lee)
and then Jerome will follow up with the support for sys-off as an
additional series.

Kevin

WARNING: multiple messages have this Message-ID (diff)
From: Kevin Hilman <khilman@baylibre.com>
To: Andrew Davis <afd@ti.com>, jerome Neanne <jneanne@baylibre.com>,
	Nishanth Menon <nm@ti.com>
Cc: Lee Jones <lee@kernel.org>,
	lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org,
	kristo@kernel.org, dmitry.torokhov@gmail.com,
	krzysztof.kozlowski+dt@linaro.org, catalin.marinas@arm.com,
	will@kernel.org, tony@atomide.com, vigneshr@ti.com,
	bjorn.andersson@linaro.org, shawnguo@kernel.org,
	geert+renesas@glider.be, dmitry.baryshkov@linaro.org,
	marcel.ziswiler@toradex.com, vkoul@kernel.org,
	biju.das.jz@bp.renesas.com, arnd@arndb.de, jeff@labundy.com,
	narmstrong@baylibre.com, msp@baylibre.com, j-keerthy@ti.com,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-input@vger.kernel.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH v6 4/6] mfd: tps65219: Add driver for TI TPS65219 PMIC
Date: Thu, 10 Nov 2022 12:16:27 -0800	[thread overview]
Message-ID: <7hfseqa7l0.fsf@baylibre.com> (raw)
In-Reply-To: <1231f3e6-61a7-ca3c-2fbb-679b583e0df1@ti.com>

Andrew Davis <afd@ti.com> writes:

> On 11/10/22 11:00 AM, Kevin Hilman wrote:
>> jerome Neanne <jneanne@baylibre.com> writes:
>> 
>>> On 09/11/2022 22:59, Andrew Davis wrote:
>>>> On 11/7/22 3:14 PM, Kevin Hilman wrote:
>>>>> Nishanth Menon <nm@ti.com> writes:
>>>>>
>>>>>> On 13:58-20221104, jerome Neanne wrote:
>>>>>>>
>>>>>> [...]
>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> Can you try an compile with W=1 please.
>>>>>>> This raise one warning on mfd:
>>>>>>> drivers/mfd/tps65219.c:28:12: warning: ‘tps65219_soft_shutdown’
>>>>>>> defined but
>>>>>>> not used [-Wunused-function]
>>>>>>>      28 | static int tps65219_soft_shutdown(struct tps65219 *tps)
>>>>>>>         |            ^~~~~~~~~~~~~~~~~~~~~~
>>>>>>> soft_shutdown has been validated and is used in TI baseline even if not
>>>>>>> hooked in upstream version further to this review:
>>>>>>> https://lore.kernel.org/lkml/20220825150224.826258-5-msp@baylibre.com/
>>>>>>>
>>>>>>> It was a TI requirement to implement it...
>>>>>>> Let me know if you want me to remove this function or if we can keep
>>>>>>> it like
>>>>>>> this.
>>>>>>
>>>>>> There are platforms without psci, correct? I think the comment was to
>>>>>> drop the force override with system-power-controller property,
>>>>>>
>>>>>> if (!pm_power_off) {
>>>>>>      tps65219_i2c_client = client;
>>>>>>      pm_power_off = &tps65219_pm_power_off;
>>>>>> }
>>>>>>
>>>>>> Could still be valid for such platforms, no? I do see that the
>>>>>> capability that the PMIC has - which is software shutdown is a valid
>>>>>> feature that we support in many different PMIC drivers. Is'nt the job of
>>>>>> the driver to introduce the functionality in a manner that is
>>>>>> appropriate to the OS framework?
>>>>>
>>>>> Yeah, I think Nishanth is right here.
>>>>>
>>>>> We should probably keep the `if (!pm_power_off)` part so the PMIC will
>>>>> be used if PSCI is not, but it also allows an easy way to test/use the
>>>>> PMIC
>>>>> shutdown functionality downstream if needed.
>>>>>
>>>>
>>>> Then should be using the sys-off handler API[0] so it doesn't block PSCI
>>>> which is also switching over[1].
>>>>
>>>> Andrew
>>>>
>>>> [0] https://lwn.net/Articles/894511/
>>>> [1] https://www.spinics.net/lists/arm-kernel/msg1024127.html
>>> Can we go for upstream with v7 without tps65219_soft_shutdown. Then if
>>> everyone agrees with Andrew proposal, I'll submit a separate patch which
>>> adds implementation of tps65219_soft_shutdown support through sys-off
>>> handler.
>>>
>>> So that we are not blocking upstream in case further
>>> discussions/alignment are required.
>> 
>> Seems OK to me.  Nishanth?  Andrew?
>> 
>> But I think you'll need to at least submit a v8 without the unused
>> code/dead code that Lee pointed out.
>> 
>
> If you need the v8 anyway, then add support through sys-off in
> that spin, should only be a couple lines of change.

Oops, my mistake.  I see v7 already has the dead code removed.  I got
confused because this thread is on v6.

IMO, I think v7 should be merged v7 (mfd part is already ack'd by Lee)
and then Jerome will follow up with the support for sys-off as an
additional series.

Kevin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-11-10 20:16 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 14:05 [PATCH v6 0/6] Add support for TI TPS65219 PMIC Jerome Neanne
2022-10-11 14:05 ` Jerome Neanne
2022-10-11 14:05 ` [PATCH v6 1/6] DONOTMERGE: arm64: dts: ti: Add TI TPS65219 PMIC support for AM642 SK board Jerome Neanne
2022-10-11 14:05   ` Jerome Neanne
2022-10-11 14:05 ` [PATCH v6 2/6] DONOTMERGE: arm64: dts: ti: Add pinmux and irq mapping for TPS65219 external interrupts Jerome Neanne
2022-10-11 14:05   ` Jerome Neanne
2022-10-11 14:05 ` [PATCH v6 3/6] DONOTMERGE: arm64: dts: ti: k3-am642-sk: Enable tps65219 power-button Jerome Neanne
2022-10-11 14:05   ` Jerome Neanne
2022-10-11 14:05 ` [PATCH v6 4/6] mfd: tps65219: Add driver for TI TPS65219 PMIC Jerome Neanne
2022-10-11 14:05   ` Jerome Neanne
2022-10-31 11:00   ` Lee Jones
2022-10-31 11:00     ` Lee Jones
2022-11-04 12:58     ` jerome Neanne
2022-11-04 12:58       ` jerome Neanne
2022-11-04 13:56       ` Lee Jones
2022-11-04 13:56         ` Lee Jones
2022-11-04 14:04         ` jerome Neanne
2022-11-04 14:04           ` jerome Neanne
2022-11-05  0:01       ` Nishanth Menon
2022-11-05  0:01         ` Nishanth Menon
2022-11-07 21:14         ` Kevin Hilman
2022-11-07 21:14           ` Kevin Hilman
2022-11-09 21:59           ` Andrew Davis
2022-11-09 21:59             ` Andrew Davis
2022-11-10  7:12             ` jerome Neanne
2022-11-10  7:12               ` jerome Neanne
2022-11-10 17:00               ` Kevin Hilman
2022-11-10 17:00                 ` Kevin Hilman
2022-11-10 17:44                 ` Andrew Davis
2022-11-10 17:44                   ` Andrew Davis
2022-11-10 20:16                   ` Kevin Hilman [this message]
2022-11-10 20:16                     ` Kevin Hilman
2022-10-11 14:05 ` [PATCH v6 5/6] Input: Add tps65219 interrupt driven powerbutton Jerome Neanne
2022-10-11 14:05   ` Jerome Neanne
2022-10-12  9:48   ` jerome Neanne
2022-10-12  9:48     ` jerome Neanne
2022-10-11 14:05 ` [PATCH v6 6/6] arm64: defconfig: Add tps65219 as modules Jerome Neanne
2022-10-11 14:05   ` Jerome Neanne
2022-10-11 14:48   ` Krzysztof Kozlowski
2022-10-11 14:48     ` Krzysztof Kozlowski
2022-10-12  8:39     ` jerome Neanne
2022-10-12  8:39       ` jerome Neanne
2022-10-12 13:00       ` Krzysztof Kozlowski
2022-10-12 13:00         ` Krzysztof Kozlowski
2022-10-12 17:56         ` Kevin Hilman
2022-10-12 17:56           ` Kevin Hilman
2022-10-13 12:32           ` Krzysztof Kozlowski
2022-10-13 12:32             ` Krzysztof Kozlowski
2022-10-13 13:22             ` jerome Neanne
2022-10-13 13:22               ` jerome Neanne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7hfseqa7l0.fsf@baylibre.com \
    --to=khilman@baylibre.com \
    --cc=afd@ti.com \
    --cc=arnd@arndb.de \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=j-keerthy@ti.com \
    --cc=jeff@labundy.com \
    --cc=jneanne@baylibre.com \
    --cc=kristo@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=msp@baylibre.com \
    --cc=narmstrong@baylibre.com \
    --cc=nm@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --cc=tony@atomide.com \
    --cc=vigneshr@ti.com \
    --cc=vkoul@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.