[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZlS2KBTvhizdmow-@smile.fi.intel.com>
Date: Mon, 27 May 2024 19:34:48 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Markus Schneider-Pargmann <msp@...libre.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Tony Lindgren <tony@...mide.com>,
John Ogness <john.ogness@...utronix.de>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Ronald Wahl <ronald.wahl@...itan.com>,
Thomas Richard <thomas.richard@...tlin.com>,
Thomas Gleixner <tglx@...utronix.de>, Arnd Bergmann <arnd@...db.de>,
Vignesh Raghavendra <vigneshr@...com>,
Vibhore Vardhan <vibhore@...com>,
Kevin Hilman <khilman@...libre.com>, Dhruva Gole <d-gole@...com>,
linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH 4/5] serial: 8250: omap: Support wakeup pinctrl state
On Thu, May 23, 2024 at 09:58:18AM +0200, Markus Schneider-Pargmann wrote:
> UART can be used as a wakeup source for am62 from a powered-off SoC
> state. To enable wakeup from UART am62 requires a wakeup flag being set
> in the pinctrl.
>
> If the device is marked as wakeup enabled, select the 'wakeup' pinctrl
> state on sys_off.
..
> #include <linux/pm_qos.h>
> #include <linux/pm_wakeirq.h>
> #include <linux/dma-mapping.h>
> +#include <linux/reboot.h>
See below.
> #include <linux/sys_soc.h>
> #include <linux/pm_domain.h>
> +#include <linux/pinctrl/consumer.h>
Can we make some order here and put this before above pm_*.h or even earlier
according to the alphabet?
..
> + priv->pinctrl = devm_pinctrl_get(&pdev->dev);
> + if (!IS_ERR_OR_NULL(priv->pinctrl))
Shouldn't we report an error to the user? I assume that NULL is for optional
pin control, otherwise it's an error state which at bare minimum has to be
reported.
> + priv->pinctrl_wakeup = pinctrl_lookup_state(priv->pinctrl, "wakeup");
> + devm_register_sys_off_handler(&pdev->dev,
No error check?
> + SYS_OFF_MODE_POWER_OFF_PREPARE,
> + SYS_OFF_PRIO_DEFAULT,
> + omap8250_sysoff_handler, NULL);
> +
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists