* [PATCH v3 1/3] pmdomain: ti_sci: add per-device latency constraint management
2024-09-05 22:02 [PATCH v3 0/3] pmdomain: ti_sci: collect and send low-power mode constraints Kevin Hilman
@ 2024-09-05 22:02 ` Kevin Hilman
2024-09-06 9:00 ` Ulf Hansson
2024-09-05 22:02 ` [PATCH v3 2/3] pmdomain: ti_sci: add wakeup " Kevin Hilman
2024-09-05 22:02 ` [PATCH v3 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups Kevin Hilman
2 siblings, 1 reply; 8+ messages in thread
From: Kevin Hilman @ 2024-09-05 22:02 UTC (permalink / raw)
To: Ulf Hansson, linux-pm
Cc: Nishanth Menon, Vibhore Vardhan, Dhruva Gole, Akashdeep Kaur,
Sebin Francis, Markus Schneider-Pargmann, linux-arm-kernel,
linux-kernel
For each device in a TI SCI PM domain, check whether the device has
any resume latency constraints set via per-device PM QoS. If
constraints are set, send them to DM via the new SCI constraints API.
Checking for constraints happen for each device before system-wide
suspend (via ->suspend() hook.)
An important detail here is that the PM domain driver inserts itself
into the path of both the ->suspend() and ->resume() hook path
of *all* devices in the PM domain. This allows generic PM domain code
to handle the constraint management and communication with TI SCI.
Further, this allows device drivers to use existing PM QoS APIs to
add/update constraints.
DM firmware clears constraints during its resume, so Linux has
to check/update/send constraints each time system suspends.
Co-developed-by: Vibhore Vardhan <vibhore@ti.com>
Signed-off-by: Vibhore Vardhan <vibhore@ti.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
---
drivers/pmdomain/ti/ti_sci_pm_domains.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
index 1510d5ddae3d..bb95c40ab3ea 100644
--- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
+++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
@@ -13,6 +13,8 @@
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include <linux/slab.h>
+#include <linux/pm_qos.h>
+#include <linux/pm_runtime.h>
#include <linux/soc/ti/ti_sci_protocol.h>
#include <dt-bindings/soc/ti,sci_pm_domain.h>
@@ -51,6 +53,27 @@ struct ti_sci_pm_domain {
#define genpd_to_ti_sci_pd(gpd) container_of(gpd, struct ti_sci_pm_domain, pd)
+static inline bool ti_sci_pd_is_valid_constraint(s32 val)
+{
+ return val != PM_QOS_RESUME_LATENCY_NO_CONSTRAINT;
+}
+
+static void ti_sci_pd_set_lat_constraint(struct device *dev, s32 val)
+{
+ struct generic_pm_domain *genpd = pd_to_genpd(dev->pm_domain);
+ struct ti_sci_pm_domain *pd = genpd_to_ti_sci_pd(genpd);
+ const struct ti_sci_handle *ti_sci = pd->parent->ti_sci;
+ int ret;
+
+ ret = ti_sci->ops.pm_ops.set_latency_constraint(ti_sci, val, TISCI_MSG_CONSTRAINT_SET);
+ if (ret)
+ dev_err(dev, "ti_sci_pd: set latency constraint failed: ret=%d\n",
+ ret);
+ else
+ dev_dbg(dev, "ti_sci_pd: ID:%d set latency constraint %d\n",
+ pd->idx, val);
+}
+
/*
* ti_sci_pd_power_off(): genpd power down hook
* @domain: pointer to the powerdomain to power off
@@ -79,6 +102,22 @@ static int ti_sci_pd_power_on(struct generic_pm_domain *domain)
return ti_sci->ops.dev_ops.get_device(ti_sci, pd->idx);
}
+static int ti_sci_pd_suspend(struct device *dev)
+{
+ int ret;
+ s32 val;
+
+ ret = pm_generic_suspend(dev);
+ if (ret)
+ return ret;
+
+ val = dev_pm_qos_read_value(dev, DEV_PM_QOS_RESUME_LATENCY);
+ if (ti_sci_pd_is_valid_constraint(val))
+ ti_sci_pd_set_lat_constraint(dev, val);
+
+ return 0;
+}
+
/*
* ti_sci_pd_xlate(): translation service for TI SCI genpds
* @genpdspec: DT identification data for the genpd
@@ -188,6 +227,13 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
pd->pd.power_on = ti_sci_pd_power_on;
pd->idx = args.args[0];
pd->parent = pd_provider;
+ /*
+ * If SCI constraint functions are present, then firmware
+ * supports the constraints API.
+ */
+ if (pd_provider->ti_sci->ops.pm_ops.set_device_constraint &&
+ pd_provider->ti_sci->ops.pm_ops.set_latency_constraint)
+ pd->pd.domain.ops.suspend = ti_sci_pd_suspend;
pm_genpd_init(&pd->pd, NULL, true);
--
2.46.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 1/3] pmdomain: ti_sci: add per-device latency constraint management
2024-09-05 22:02 ` [PATCH v3 1/3] pmdomain: ti_sci: add per-device latency constraint management Kevin Hilman
@ 2024-09-06 9:00 ` Ulf Hansson
0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2024-09-06 9:00 UTC (permalink / raw)
To: Kevin Hilman
Cc: linux-pm, Nishanth Menon, Vibhore Vardhan, Dhruva Gole,
Akashdeep Kaur, Sebin Francis, Markus Schneider-Pargmann,
linux-arm-kernel, linux-kernel
On Fri, 6 Sept 2024 at 00:03, Kevin Hilman <khilman@baylibre.com> wrote:
>
> For each device in a TI SCI PM domain, check whether the device has
> any resume latency constraints set via per-device PM QoS. If
> constraints are set, send them to DM via the new SCI constraints API.
>
> Checking for constraints happen for each device before system-wide
> suspend (via ->suspend() hook.)
>
> An important detail here is that the PM domain driver inserts itself
> into the path of both the ->suspend() and ->resume() hook path
> of *all* devices in the PM domain. This allows generic PM domain code
> to handle the constraint management and communication with TI SCI.
>
> Further, this allows device drivers to use existing PM QoS APIs to
> add/update constraints.
>
> DM firmware clears constraints during its resume, so Linux has
> to check/update/send constraints each time system suspends.
>
> Co-developed-by: Vibhore Vardhan <vibhore@ti.com>
> Signed-off-by: Vibhore Vardhan <vibhore@ti.com>
> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
> Signed-off-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Kind regards
Uffe
> ---
> drivers/pmdomain/ti/ti_sci_pm_domains.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 46 insertions(+)
>
> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> index 1510d5ddae3d..bb95c40ab3ea 100644
> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> @@ -13,6 +13,8 @@
> #include <linux/platform_device.h>
> #include <linux/pm_domain.h>
> #include <linux/slab.h>
> +#include <linux/pm_qos.h>
> +#include <linux/pm_runtime.h>
> #include <linux/soc/ti/ti_sci_protocol.h>
> #include <dt-bindings/soc/ti,sci_pm_domain.h>
>
> @@ -51,6 +53,27 @@ struct ti_sci_pm_domain {
>
> #define genpd_to_ti_sci_pd(gpd) container_of(gpd, struct ti_sci_pm_domain, pd)
>
> +static inline bool ti_sci_pd_is_valid_constraint(s32 val)
> +{
> + return val != PM_QOS_RESUME_LATENCY_NO_CONSTRAINT;
> +}
> +
> +static void ti_sci_pd_set_lat_constraint(struct device *dev, s32 val)
> +{
> + struct generic_pm_domain *genpd = pd_to_genpd(dev->pm_domain);
> + struct ti_sci_pm_domain *pd = genpd_to_ti_sci_pd(genpd);
> + const struct ti_sci_handle *ti_sci = pd->parent->ti_sci;
> + int ret;
> +
> + ret = ti_sci->ops.pm_ops.set_latency_constraint(ti_sci, val, TISCI_MSG_CONSTRAINT_SET);
> + if (ret)
> + dev_err(dev, "ti_sci_pd: set latency constraint failed: ret=%d\n",
> + ret);
> + else
> + dev_dbg(dev, "ti_sci_pd: ID:%d set latency constraint %d\n",
> + pd->idx, val);
> +}
> +
> /*
> * ti_sci_pd_power_off(): genpd power down hook
> * @domain: pointer to the powerdomain to power off
> @@ -79,6 +102,22 @@ static int ti_sci_pd_power_on(struct generic_pm_domain *domain)
> return ti_sci->ops.dev_ops.get_device(ti_sci, pd->idx);
> }
>
> +static int ti_sci_pd_suspend(struct device *dev)
> +{
> + int ret;
> + s32 val;
> +
> + ret = pm_generic_suspend(dev);
> + if (ret)
> + return ret;
> +
> + val = dev_pm_qos_read_value(dev, DEV_PM_QOS_RESUME_LATENCY);
> + if (ti_sci_pd_is_valid_constraint(val))
> + ti_sci_pd_set_lat_constraint(dev, val);
> +
> + return 0;
> +}
> +
> /*
> * ti_sci_pd_xlate(): translation service for TI SCI genpds
> * @genpdspec: DT identification data for the genpd
> @@ -188,6 +227,13 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
> pd->pd.power_on = ti_sci_pd_power_on;
> pd->idx = args.args[0];
> pd->parent = pd_provider;
> + /*
> + * If SCI constraint functions are present, then firmware
> + * supports the constraints API.
> + */
> + if (pd_provider->ti_sci->ops.pm_ops.set_device_constraint &&
> + pd_provider->ti_sci->ops.pm_ops.set_latency_constraint)
> + pd->pd.domain.ops.suspend = ti_sci_pd_suspend;
>
> pm_genpd_init(&pd->pd, NULL, true);
>
>
> --
> 2.46.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 2/3] pmdomain: ti_sci: add wakeup constraint management
2024-09-05 22:02 [PATCH v3 0/3] pmdomain: ti_sci: collect and send low-power mode constraints Kevin Hilman
2024-09-05 22:02 ` [PATCH v3 1/3] pmdomain: ti_sci: add per-device latency constraint management Kevin Hilman
@ 2024-09-05 22:02 ` Kevin Hilman
2024-09-06 9:01 ` Ulf Hansson
2024-09-05 22:02 ` [PATCH v3 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups Kevin Hilman
2 siblings, 1 reply; 8+ messages in thread
From: Kevin Hilman @ 2024-09-05 22:02 UTC (permalink / raw)
To: Ulf Hansson, linux-pm
Cc: Nishanth Menon, Vibhore Vardhan, Dhruva Gole, Akashdeep Kaur,
Sebin Francis, Markus Schneider-Pargmann, linux-arm-kernel,
linux-kernel
During system-wide suspend, check all devices connected to PM domain
to see if they are wakeup-enabled. If so, set a TI SCI device
constraint.
Note: DM firmware clears all constraints on resume.
Co-developed-by: Vibhore Vardhan <vibhore@ti.com>
Signed-off-by: Vibhore Vardhan <vibhore@ti.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Dhruva Gole <d-gole@ti.com>
---
drivers/pmdomain/ti/ti_sci_pm_domains.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
index bb95c40ab3ea..1ab1e46924ab 100644
--- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
+++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
@@ -74,6 +74,21 @@ static void ti_sci_pd_set_lat_constraint(struct device *dev, s32 val)
pd->idx, val);
}
+static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
+{
+ struct generic_pm_domain *genpd = pd_to_genpd(dev->pm_domain);
+ struct ti_sci_pm_domain *pd = genpd_to_ti_sci_pd(genpd);
+ const struct ti_sci_handle *ti_sci = pd->parent->ti_sci;
+ int ret;
+
+ if (device_may_wakeup(dev)) {
+ ret = ti_sci->ops.pm_ops.set_device_constraint(ti_sci, pd->idx,
+ TISCI_MSG_CONSTRAINT_SET);
+ if (!ret)
+ dev_dbg(dev, "ti_sci_pd: ID:%d set device constraint.\n", pd->idx);
+ }
+}
+
/*
* ti_sci_pd_power_off(): genpd power down hook
* @domain: pointer to the powerdomain to power off
@@ -115,6 +130,8 @@ static int ti_sci_pd_suspend(struct device *dev)
if (ti_sci_pd_is_valid_constraint(val))
ti_sci_pd_set_lat_constraint(dev, val);
+ ti_sci_pd_set_wkup_constraint(dev);
+
return 0;
}
--
2.46.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 2/3] pmdomain: ti_sci: add wakeup constraint management
2024-09-05 22:02 ` [PATCH v3 2/3] pmdomain: ti_sci: add wakeup " Kevin Hilman
@ 2024-09-06 9:01 ` Ulf Hansson
0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2024-09-06 9:01 UTC (permalink / raw)
To: Kevin Hilman
Cc: linux-pm, Nishanth Menon, Vibhore Vardhan, Dhruva Gole,
Akashdeep Kaur, Sebin Francis, Markus Schneider-Pargmann,
linux-arm-kernel, linux-kernel
On Fri, 6 Sept 2024 at 00:03, Kevin Hilman <khilman@baylibre.com> wrote:
>
> During system-wide suspend, check all devices connected to PM domain
> to see if they are wakeup-enabled. If so, set a TI SCI device
> constraint.
>
> Note: DM firmware clears all constraints on resume.
>
> Co-developed-by: Vibhore Vardhan <vibhore@ti.com>
> Signed-off-by: Vibhore Vardhan <vibhore@ti.com>
> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
> Signed-off-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Kind regards
Uffe
> ---
> drivers/pmdomain/ti/ti_sci_pm_domains.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> index bb95c40ab3ea..1ab1e46924ab 100644
> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> @@ -74,6 +74,21 @@ static void ti_sci_pd_set_lat_constraint(struct device *dev, s32 val)
> pd->idx, val);
> }
>
> +static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
> +{
> + struct generic_pm_domain *genpd = pd_to_genpd(dev->pm_domain);
> + struct ti_sci_pm_domain *pd = genpd_to_ti_sci_pd(genpd);
> + const struct ti_sci_handle *ti_sci = pd->parent->ti_sci;
> + int ret;
> +
> + if (device_may_wakeup(dev)) {
> + ret = ti_sci->ops.pm_ops.set_device_constraint(ti_sci, pd->idx,
> + TISCI_MSG_CONSTRAINT_SET);
> + if (!ret)
> + dev_dbg(dev, "ti_sci_pd: ID:%d set device constraint.\n", pd->idx);
> + }
> +}
> +
> /*
> * ti_sci_pd_power_off(): genpd power down hook
> * @domain: pointer to the powerdomain to power off
> @@ -115,6 +130,8 @@ static int ti_sci_pd_suspend(struct device *dev)
> if (ti_sci_pd_is_valid_constraint(val))
> ti_sci_pd_set_lat_constraint(dev, val);
>
> + ti_sci_pd_set_wkup_constraint(dev);
> +
> return 0;
> }
>
>
> --
> 2.46.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups
2024-09-05 22:02 [PATCH v3 0/3] pmdomain: ti_sci: collect and send low-power mode constraints Kevin Hilman
2024-09-05 22:02 ` [PATCH v3 1/3] pmdomain: ti_sci: add per-device latency constraint management Kevin Hilman
2024-09-05 22:02 ` [PATCH v3 2/3] pmdomain: ti_sci: add wakeup " Kevin Hilman
@ 2024-09-05 22:02 ` Kevin Hilman
2024-09-06 8:54 ` Ulf Hansson
2 siblings, 1 reply; 8+ messages in thread
From: Kevin Hilman @ 2024-09-05 22:02 UTC (permalink / raw)
To: Ulf Hansson, linux-pm
Cc: Nishanth Menon, Vibhore Vardhan, Dhruva Gole, Akashdeep Kaur,
Sebin Francis, Markus Schneider-Pargmann, linux-arm-kernel,
linux-kernel
When a device supports IO daisy-chain wakeups, it uses a dedicated
wake IRQ. Devices with IO daisy-chain wakeups enabled should not set
wakeup constraints since these can happen even from deep power states,
so should not prevent the DM from picking deep power states.
Wake IRQs are set with dev_pm_set_wake_irq() or
dev_pm_set_dedicated_wake_irq(). The latter is used by the serial
driver used on K3 platforms (drivers/tty/serial/8250/8250_omap.c)
when the interrupts-extended property is used to describe the
dedicated wakeup interrupt.
Detect these wake IRQs in the suspend path, and if set, skip sending
constraint.
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
---
drivers/pmdomain/ti/ti_sci_pm_domains.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
index 1ab1e46924ab..747a7a33c0a9 100644
--- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
+++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
@@ -82,6 +82,13 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
int ret;
if (device_may_wakeup(dev)) {
+ /*
+ * If device can wakeup using IO daisy chain wakeups,
+ * we do not want to set a constraint.
+ */
+ if (dev->power.wakeirq)
+ dev_dbg(dev, "%s: has wake IRQ, not setting constraints\n", __func__);
+
ret = ti_sci->ops.pm_ops.set_device_constraint(ti_sci, pd->idx,
TISCI_MSG_CONSTRAINT_SET);
if (!ret)
--
2.46.0
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH v3 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups
2024-09-05 22:02 ` [PATCH v3 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups Kevin Hilman
@ 2024-09-06 8:54 ` Ulf Hansson
2024-09-06 15:53 ` Kevin Hilman
0 siblings, 1 reply; 8+ messages in thread
From: Ulf Hansson @ 2024-09-06 8:54 UTC (permalink / raw)
To: Kevin Hilman
Cc: linux-pm, Nishanth Menon, Vibhore Vardhan, Dhruva Gole,
Akashdeep Kaur, Sebin Francis, Markus Schneider-Pargmann,
linux-arm-kernel, linux-kernel
On Fri, 6 Sept 2024 at 00:03, Kevin Hilman <khilman@baylibre.com> wrote:
>
> When a device supports IO daisy-chain wakeups, it uses a dedicated
> wake IRQ. Devices with IO daisy-chain wakeups enabled should not set
> wakeup constraints since these can happen even from deep power states,
> so should not prevent the DM from picking deep power states.
>
> Wake IRQs are set with dev_pm_set_wake_irq() or
> dev_pm_set_dedicated_wake_irq(). The latter is used by the serial
> driver used on K3 platforms (drivers/tty/serial/8250/8250_omap.c)
> when the interrupts-extended property is used to describe the
> dedicated wakeup interrupt.
>
> Detect these wake IRQs in the suspend path, and if set, skip sending
> constraint.
>
> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
> ---
> drivers/pmdomain/ti/ti_sci_pm_domains.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> index 1ab1e46924ab..747a7a33c0a9 100644
> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> @@ -82,6 +82,13 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
> int ret;
>
> if (device_may_wakeup(dev)) {
> + /*
> + * If device can wakeup using IO daisy chain wakeups,
> + * we do not want to set a constraint.
> + */
> + if (dev->power.wakeirq)
> + dev_dbg(dev, "%s: has wake IRQ, not setting constraints\n", __func__);
return; ?
> +
> ret = ti_sci->ops.pm_ops.set_device_constraint(ti_sci, pd->idx,
> TISCI_MSG_CONSTRAINT_SET);
> if (!ret)
>
> --
> 2.46.0
>
Kind regards
Uffe
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v3 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups
2024-09-06 8:54 ` Ulf Hansson
@ 2024-09-06 15:53 ` Kevin Hilman
0 siblings, 0 replies; 8+ messages in thread
From: Kevin Hilman @ 2024-09-06 15:53 UTC (permalink / raw)
To: Ulf Hansson
Cc: linux-pm, Nishanth Menon, Vibhore Vardhan, Dhruva Gole,
Akashdeep Kaur, Sebin Francis, Markus Schneider-Pargmann,
linux-arm-kernel, linux-kernel
Ulf Hansson <ulf.hansson@linaro.org> writes:
> On Fri, 6 Sept 2024 at 00:03, Kevin Hilman <khilman@baylibre.com> wrote:
>>
>> When a device supports IO daisy-chain wakeups, it uses a dedicated
>> wake IRQ. Devices with IO daisy-chain wakeups enabled should not set
>> wakeup constraints since these can happen even from deep power states,
>> so should not prevent the DM from picking deep power states.
>>
>> Wake IRQs are set with dev_pm_set_wake_irq() or
>> dev_pm_set_dedicated_wake_irq(). The latter is used by the serial
>> driver used on K3 platforms (drivers/tty/serial/8250/8250_omap.c)
>> when the interrupts-extended property is used to describe the
>> dedicated wakeup interrupt.
>>
>> Detect these wake IRQs in the suspend path, and if set, skip sending
>> constraint.
>>
>> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
>> ---
>> drivers/pmdomain/ti/ti_sci_pm_domains.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
>> index 1ab1e46924ab..747a7a33c0a9 100644
>> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
>> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
>> @@ -82,6 +82,13 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
>> int ret;
>>
>> if (device_may_wakeup(dev)) {
>> + /*
>> + * If device can wakeup using IO daisy chain wakeups,
>> + * we do not want to set a constraint.
>> + */
>> + if (dev->power.wakeirq)
>> + dev_dbg(dev, "%s: has wake IRQ, not setting constraints\n", __func__);
>
> return; ?
>
Oops, I meant to remove the "false" return when changing from bool to
void, but mistakenly removed the whole line.
d'oh!, good catch.
Thanks.
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread