[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c5a6da81-74d1-b336-8ad7-60050496ae22@pengutronix.de>
Date:   Thu, 22 Nov 2018 12:07:14 +0100
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Aisheng DONG <aisheng.dong@....com>,
        Joakim Zhang <qiangqing.zhang@....com>,
        "linux-can@...r.kernel.org" <linux-can@...r.kernel.org>
Cc:     "wg@...ndegger.com" <wg@...ndegger.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH V3 1/1] can: flexcan: Add self wakeup support
On 11/22/18 12:01 PM, Aisheng DONG wrote:
> [...]
>>>> @@
>>>> -1437,10 +1552,18 @@ static int __maybe_unused flexcan_suspend(struct
>>>> device *device)
>>>>  	int err = 0;
>>>>
>>>>  	if (netif_running(dev)) {
>>>> -		err = flexcan_chip_disable(priv);
>>>> -		if (err)
>>>> -			return err;
>>>> -		err = pm_runtime_force_suspend(device);
>>>> +		/* if wakeup is enabled, enter stop mode
>>>> +		 * else enter disabled mode.
>>>> +		 */
>>>> +		if (device_may_wakeup(device)) {
>>>> +			enable_irq_wake(dev->irq);
>>>> +			flexcan_enter_stop_mode(priv);
>>>> +		} else {
>>>> +			err = flexcan_chip_disable(priv);
>>>> +			if (err)
>>>> +				return err;
>>>> +			err = pm_runtime_force_suspend(device);
>>>
>>> This is mixed with runtime pm.
>>> I would suggestion you first upstream wakeup support.
>>> Then runtime pm later separately.
>>
>> In fact this patch is based on the patch "can: flexcan: Implement CAN Runtime
>> PM", which is still under review, too.
> 
> Yes, please ignore rpm patch first.
> This patch will be re-made and not depends on rpm for easy review.
> After wakeup is ready, rpm patch will rebase on it.
ok.
Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists