[...]
> >> @@
> >> -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.

Regards
Dong Aisheng

> 
> 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   |

Reply via email to