Messages in this thread | | | Subject | Re: [PATCH V3 1/1] can: flexcan: Add self wakeup support | From | Marc Kleine-Budde <> | Date | Thu, 22 Nov 2018 12:07:14 +0100 |
| |
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 |
[unhandled content-type:application/pgp-signature] | |