From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrizio Castro Subject: RE: [RFC v4 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support Date: Mon, 12 Feb 2018 10:31:06 +0000 Message-ID: References: <1517423070-24236-1-git-send-email-fabrizio.castro@bp.renesas.com> <1517423070-24236-13-git-send-email-fabrizio.castro@bp.renesas.com> <20180207225356.pgirh2ohdsv7xdne@katana> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20180207225356.pgirh2ohdsv7xdne@katana> Content-Language: en-US Sender: linux-watchdog-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Wolfram Sang Cc: Philipp Zabel , Rob Herring , Mark Rutland , Wim Van Sebroeck , Russell King , Catalin Marinas , Will Deacon , Michael Turquette , Stephen Boyd , Simon Horman , Magnus Damm , Geert Uytterhoeven , Wolfram Sang , Guenter Roeck , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-watchdog-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" l List-Id: devicetree@vger.kernel.org Hello Wolfram, thank you for your feedback! > Subject: Re: [RFC v4 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support > > > > +#ifdef CONFIG_PM > > +static int rwdt_suspend(struct device *dev) > > +{ > > +struct platform_device *pdev; > > +struct rwdt_priv *priv; > > + > > +pdev =3D to_platform_device(dev); > > +priv =3D platform_get_drvdata(pdev); > > struct rwdt_priv *priv =3D dev_get_drvdata(dev); > > ? will change > > > > +if (watchdog_active(&priv->wdev)) { > > +rwdt_write(priv, priv->cks, RWTCSRA); > > +} > > +return 0; > > +} > > + > > +static int rwdt_resume(struct device *dev) > > +{ > > +struct platform_device *pdev; > > +struct rwdt_priv *priv; > > + > > +pdev =3D to_platform_device(dev); > > +priv =3D platform_get_drvdata(pdev); > > ditto will change > > > +if (watchdog_active(&priv->wdev)) { > > +rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA); > > +} > > +return 0; > > +} > > + > > +static const struct dev_pm_ops rwdt_pm =3D { > > +.suspend =3D rwdt_suspend, > > +.resume =3D rwdt_resume, > > +}; > > Use SIMPLE_DEV_PM_OPS macro (see stmp3xxx_rtc_wdt.c for an example) for > more compact code and... > > > +#ifdef CONFIG_PM > > +.pm =3D &rwdt_pm, > > +#endif > > ... removing this ifdeffery? will take out the ifdeffery Thanks, Fabrizio Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, B= uckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered= No. 04586709. -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relmlor2.renesas.com ([210.160.252.172]:8954 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932941AbeBLKbO (ORCPT ); Mon, 12 Feb 2018 05:31:14 -0500 From: Fabrizio Castro To: Wolfram Sang CC: Philipp Zabel , Rob Herring , Mark Rutland , Wim Van Sebroeck , Russell King , Catalin Marinas , Will Deacon , "Michael Turquette" , Stephen Boyd , Simon Horman , Magnus Damm , "Geert Uytterhoeven" , Wolfram Sang , Guenter Roeck , "devicetree@vger.kernel.org" , "linux-watchdog@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-clk@vger.kernel.org" , Chris Paterson , Biju Das , Ramesh Shanmugasundaram Subject: RE: [RFC v4 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support Date: Mon, 12 Feb 2018 10:31:06 +0000 Message-ID: References: <1517423070-24236-1-git-send-email-fabrizio.castro@bp.renesas.com> <1517423070-24236-13-git-send-email-fabrizio.castro@bp.renesas.com> <20180207225356.pgirh2ohdsv7xdne@katana> In-Reply-To: <20180207225356.pgirh2ohdsv7xdne@katana> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-watchdog-owner@vger.kernel.org List-Id: linux-watchdog@vger.kernel.org Hello Wolfram, thank you for your feedback! > Subject: Re: [RFC v4 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support > > > > +#ifdef CONFIG_PM > > +static int rwdt_suspend(struct device *dev) > > +{ > > +struct platform_device *pdev; > > +struct rwdt_priv *priv; > > + > > +pdev =3D to_platform_device(dev); > > +priv =3D platform_get_drvdata(pdev); > > struct rwdt_priv *priv =3D dev_get_drvdata(dev); > > ? will change > > > > +if (watchdog_active(&priv->wdev)) { > > +rwdt_write(priv, priv->cks, RWTCSRA); > > +} > > +return 0; > > +} > > + > > +static int rwdt_resume(struct device *dev) > > +{ > > +struct platform_device *pdev; > > +struct rwdt_priv *priv; > > + > > +pdev =3D to_platform_device(dev); > > +priv =3D platform_get_drvdata(pdev); > > ditto will change > > > +if (watchdog_active(&priv->wdev)) { > > +rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA); > > +} > > +return 0; > > +} > > + > > +static const struct dev_pm_ops rwdt_pm =3D { > > +.suspend =3D rwdt_suspend, > > +.resume =3D rwdt_resume, > > +}; > > Use SIMPLE_DEV_PM_OPS macro (see stmp3xxx_rtc_wdt.c for an example) for > more compact code and... > > > +#ifdef CONFIG_PM > > +.pm =3D &rwdt_pm, > > +#endif > > ... removing this ifdeffery? will take out the ifdeffery Thanks, Fabrizio Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, B= uckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered= No. 04586709. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Fabrizio Castro To: Wolfram Sang CC: Philipp Zabel , Rob Herring , Mark Rutland , Wim Van Sebroeck , Russell King , Catalin Marinas , Will Deacon , "Michael Turquette" , Stephen Boyd , Simon Horman , Magnus Damm , "Geert Uytterhoeven" , Wolfram Sang , Guenter Roeck , "devicetree@vger.kernel.org" , "linux-watchdog@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-clk@vger.kernel.org" , Chris Paterson , Biju Das , Ramesh Shanmugasundaram Subject: RE: [RFC v4 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support Date: Mon, 12 Feb 2018 10:31:06 +0000 Message-ID: References: <1517423070-24236-1-git-send-email-fabrizio.castro@bp.renesas.com> <1517423070-24236-13-git-send-email-fabrizio.castro@bp.renesas.com> <20180207225356.pgirh2ohdsv7xdne@katana> In-Reply-To: <20180207225356.pgirh2ohdsv7xdne@katana> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 List-ID: Hello Wolfram, thank you for your feedback! > Subject: Re: [RFC v4 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support > > > > +#ifdef CONFIG_PM > > +static int rwdt_suspend(struct device *dev) > > +{ > > +struct platform_device *pdev; > > +struct rwdt_priv *priv; > > + > > +pdev =3D to_platform_device(dev); > > +priv =3D platform_get_drvdata(pdev); > > struct rwdt_priv *priv =3D dev_get_drvdata(dev); > > ? will change > > > > +if (watchdog_active(&priv->wdev)) { > > +rwdt_write(priv, priv->cks, RWTCSRA); > > +} > > +return 0; > > +} > > + > > +static int rwdt_resume(struct device *dev) > > +{ > > +struct platform_device *pdev; > > +struct rwdt_priv *priv; > > + > > +pdev =3D to_platform_device(dev); > > +priv =3D platform_get_drvdata(pdev); > > ditto will change > > > +if (watchdog_active(&priv->wdev)) { > > +rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA); > > +} > > +return 0; > > +} > > + > > +static const struct dev_pm_ops rwdt_pm =3D { > > +.suspend =3D rwdt_suspend, > > +.resume =3D rwdt_resume, > > +}; > > Use SIMPLE_DEV_PM_OPS macro (see stmp3xxx_rtc_wdt.c for an example) for > more compact code and... > > > +#ifdef CONFIG_PM > > +.pm =3D &rwdt_pm, > > +#endif > > ... removing this ifdeffery? will take out the ifdeffery Thanks, Fabrizio Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, B= uckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered= No. 04586709. From mboxrd@z Thu Jan 1 00:00:00 1970 From: fabrizio.castro@bp.renesas.com (Fabrizio Castro) Date: Mon, 12 Feb 2018 10:31:06 +0000 Subject: [RFC v4 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support In-Reply-To: <20180207225356.pgirh2ohdsv7xdne@katana> References: <1517423070-24236-1-git-send-email-fabrizio.castro@bp.renesas.com> <1517423070-24236-13-git-send-email-fabrizio.castro@bp.renesas.com> <20180207225356.pgirh2ohdsv7xdne@katana> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hello Wolfram, thank you for your feedback! > Subject: Re: [RFC v4 12/26] watchdog: renesas_wdt: Add R-Car Gen2 support > > > > +#ifdef CONFIG_PM > > +static int rwdt_suspend(struct device *dev) > > +{ > > +struct platform_device *pdev; > > +struct rwdt_priv *priv; > > + > > +pdev = to_platform_device(dev); > > +priv = platform_get_drvdata(pdev); > > struct rwdt_priv *priv = dev_get_drvdata(dev); > > ? will change > > > > +if (watchdog_active(&priv->wdev)) { > > +rwdt_write(priv, priv->cks, RWTCSRA); > > +} > > +return 0; > > +} > > + > > +static int rwdt_resume(struct device *dev) > > +{ > > +struct platform_device *pdev; > > +struct rwdt_priv *priv; > > + > > +pdev = to_platform_device(dev); > > +priv = platform_get_drvdata(pdev); > > ditto will change > > > +if (watchdog_active(&priv->wdev)) { > > +rwdt_write(priv, priv->cks | RWTCSRA_TME, RWTCSRA); > > +} > > +return 0; > > +} > > + > > +static const struct dev_pm_ops rwdt_pm = { > > +.suspend = rwdt_suspend, > > +.resume = rwdt_resume, > > +}; > > Use SIMPLE_DEV_PM_OPS macro (see stmp3xxx_rtc_wdt.c for an example) for > more compact code and... > > > +#ifdef CONFIG_PM > > +.pm = &rwdt_pm, > > +#endif > > ... removing this ifdeffery? will take out the ifdeffery Thanks, Fabrizio Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.