netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: claudiu beznea <claudiu.beznea@tuxon.dev>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<richardcochran@gmail.com>, <p.zabel@pengutronix.de>,
	<geert+renesas@glider.be>
Cc: <netdev@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: Re: [PATCH net-next v4 07/15] net: ravb: Move reference clock enable/disable on runtime PM APIs
Date: Tue, 30 Jan 2024 21:22:49 +0300	[thread overview]
Message-ID: <9a6b25e5-af9f-2ee9-c587-d67fe49525b1@omp.ru> (raw)
In-Reply-To: <6307da2b-aadf-4cd7-85e3-3032153544b5@tuxon.dev>

On 1/29/24 4:53 PM, claudiu beznea wrote:

[...]

>>> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>>>
>>> Reference clock could be or not part of the power domain. If it is part of
>>
>>    Could be or not be, perhaps?
>>
>>> the power domain, the power domain takes care of propertly setting it. In
>>
>>    Properly. :-)
>>
>>> case it is not part of the power domain and full runtime PM support is
>>> available in driver the clock will not be propertly disabled/enabled at
>>> runtime. For this, keep the prepare/unprepare operations in the driver's
>>> probe()/remove() functions and move the enable/disable in runtime PM
>>> functions.
>>>
>>> Along with it, the other clock request operations were moved close to
>>> reference clock request and prepare to have all the clock requests
>>> specific code grouped together.
>>>
>>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
>> [...]
>>
>>> diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
>>> index 9fc0e39e33c2..4673cc2faec0 100644
>>> --- a/drivers/net/ethernet/renesas/ravb_main.c
>>> +++ b/drivers/net/ethernet/renesas/ravb_main.c
>> [...]
>>> @@ -3060,21 +3058,27 @@ static int ravb_resume(struct device *dev)
>>>  	return ret;
>>>  }
>>>  
>>> -static int ravb_runtime_nop(struct device *dev)
>>> +static int ravb_runtime_suspend(struct device *dev)
>>>  {
>>> -	/* Runtime PM callback shared between ->runtime_suspend()
>>> -	 * and ->runtime_resume(). Simply returns success.
>>> -	 *
>>> -	 * This driver re-initializes all registers after
>>> -	 * pm_runtime_get_sync() anyway so there is no need
>>> -	 * to save and restore registers here.
>>> -	 */
>>
>>    I want to pull out the dummy {ravb|sh_eth}_runtime_nop() funcs --
>> they don't seem to be necessary... Then we can implement your clock

   The need to have the dummy RPM suspend/resume methods is gone since:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=63d00be69348fda431ae59aba6af268a5cf5058e

>> dance with freshly added ravb_runtime_{suspend|resume}()...
> 
> For this series, does it worth having a patch that removes ravb runtime
> suspend/resume ops to then add a new patch that add it it again?

    Probably not, indeed... I just wanted to have 2 symmetric patches
for sh_eth and ravb removing the dummy methods...

> I can do it but it I see no reason in doing it in this series...
> 
> The dummy functions were there and the commit description explains the
> reason they were updated.

   Yet you don't say a word about the big comment in ravb_runtime_nop()
that you remove. This comment doesn't really make much sense as this
driver currently has the RPM calls and ndo_{open|stop}() methods decoupled...
This stuff was copied from sh_eth.c verbatim -- I clearly overlooked it when
prepping this driver for upstream... :-<
   You can keep this patch as is (but not its description!) or have a separate
patch that removes just the big comment not making much sense, both options
would be fine by me. I will take care of sh_eth.c myself (not really sure
whether you have targets having this IP)...

> Thank you,
> Claudiu Beznea

MBR, Sergey

  reply	other threads:[~2024-01-30 18:22 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 12:58 [PATCH net-next v4 00/15] net: ravb: Prepare for suspend to RAM and runtime PM support (part 1) Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 01/15] net: ravb: Let IP-specific receive function to interrogate descriptors Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 02/15] net: ravb: Rely on PM domain to enable gptp_clk Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 03/15] net: ravb: Make reset controller support mandatory Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 04/15] net: ravb: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr() Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 05/15] net: ravb: Use tabs instead of spaces Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 06/15] net: ravb: Assert/de-assert reset on suspend/resume Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 07/15] net: ravb: Move reference clock enable/disable on runtime PM APIs Claudiu
2024-01-23 20:43   ` Sergey Shtylyov
2024-01-29 13:53     ` claudiu beznea
2024-01-30 18:22       ` Sergey Shtylyov [this message]
2024-01-23 12:58 ` [PATCH net-next v4 08/15] net: ravb: Move the IRQs get and request in the probe function Claudiu
2024-01-28 18:01   ` Sergey Shtylyov
2024-01-28 18:03     ` Sergey Shtylyov
2024-01-28 18:22       ` Sergey Shtylyov
2024-01-28 18:23       ` Sergey Shtylyov
2024-01-28 18:23       ` Sergey Shtylyov
2024-01-23 12:58 ` [PATCH net-next v4 09/15] net: ravb: Split GTI computation and set operations Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 10/15] net: ravb: Move delay mode set in the driver's ndo_open API Claudiu
2024-01-24 20:18   ` Sergey Shtylyov
2024-01-29 13:55     ` claudiu beznea
2024-01-29 13:57       ` claudiu beznea
2024-01-23 12:58 ` [PATCH net-next v4 11/15] net: ravb: Move DBAT configuration to " Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 12/15] net: ravb: Move PTP initialization in the driver's ndo_open API for ccc_gac platorms Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 13/15] net: ravb: Set config mode in ndo_open and reset mode in ndo_close Claudiu
2024-01-28 20:12   ` Sergey Shtylyov
2024-01-23 12:58 ` [PATCH net-next v4 14/15] net: ravb: Simplify ravb_suspend() Claudiu
2024-01-23 12:58 ` [PATCH net-next v4 15/15] net: ravb: Simplify ravb_resume() Claudiu

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=9a6b25e5-af9f-2ee9-c587-d67fe49525b1@omp.ru \
    --to=s.shtylyov@omp.ru \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=geert+renesas@glider.be \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).