2020-08-10 11:24:36

by Maulik Shah

[permalink] [raw]
Subject: [PATCH v4 4/7] genirq: introduce irq_suspend_parent() and irq_resume_parent()

From: Douglas Anderson <[email protected]>

This goes with the new irq_suspend_one() and irq_resume_one()
callbacks and allow us to easily pass things up to our parent.

Signed-off-by: Douglas Anderson <[email protected]>
Signed-off-by: Maulik Shah <[email protected]>
---
include/linux/irq.h | 2 ++
kernel/irq/chip.c | 28 ++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 8d37b32..4188f50 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -679,6 +679,8 @@ extern int irq_chip_set_affinity_parent(struct irq_data *data,
const struct cpumask *dest,
bool force);
extern int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on);
+extern void irq_chip_suspend_one_parent(struct irq_data *data);
+extern void irq_chip_resume_one_parent(struct irq_data *data);
extern int irq_chip_set_vcpu_affinity_parent(struct irq_data *data,
void *vcpu_info);
extern int irq_chip_set_type_parent(struct irq_data *data, unsigned int type);
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index caf80c1..5039311 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1519,6 +1519,34 @@ int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on)
EXPORT_SYMBOL_GPL(irq_chip_set_wake_parent);

/**
+ * irq_chip_suspend_one_parent - Call irq_suspend_one() on our parent.
+ * @data: Pointer to interrupt specific data
+ *
+ * Conditional, as the underlying parent chip might not implement it.
+ */
+void irq_chip_suspend_one_parent(struct irq_data *data)
+{
+ data = data->parent_data;
+ if (data->chip->irq_suspend_one)
+ data->chip->irq_suspend_one(data);
+}
+EXPORT_SYMBOL_GPL(irq_chip_suspend_one_parent);
+
+/**
+ * irq_chip_resume_one_parent - Call irq_resume_one() on our parent.
+ * @data: Pointer to interrupt specific data
+ *
+ * Conditional, as the underlying parent chip might not implement it.
+ */
+void irq_chip_resume_one_parent(struct irq_data *data)
+{
+ data = data->parent_data;
+ if (data->chip->irq_resume_one)
+ data->chip->irq_resume_one(data);
+}
+EXPORT_SYMBOL_GPL(irq_chip_resume_one_parent);
+
+/**
* irq_chip_request_resources_parent - Request resources on the parent interrupt
* @data: Pointer to interrupt specific data
*/
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


2020-08-11 20:14:23

by Doug Anderson

[permalink] [raw]
Subject: Re: [PATCH v4 4/7] genirq: introduce irq_suspend_parent() and irq_resume_parent()

Hi,

On Mon, Aug 10, 2020 at 4:21 AM Maulik Shah <[email protected]> wrote:
>
> From: Douglas Anderson <[email protected]>
>
> This goes with the new irq_suspend_one() and irq_resume_one()
> callbacks and allow us to easily pass things up to our parent.
>
> Signed-off-by: Douglas Anderson <[email protected]>
> Signed-off-by: Maulik Shah <[email protected]>
> ---
> include/linux/irq.h | 2 ++
> kernel/irq/chip.c | 28 ++++++++++++++++++++++++++++
> 2 files changed, 30 insertions(+)

Thanks for posting my patch. Small nit here is that when I saw the
patches listed together I realized that I forgot to capitalize
"introduce" in ${SUBJECT}. The two patches right next to each other
that both start with "introduce" where one has a capital and one
doesn't look weird. Hopefully you can fix in the next version?

Thanks!

-Doug

2020-08-13 07:21:13

by Maulik Shah

[permalink] [raw]
Subject: Re: [PATCH v4 4/7] genirq: introduce irq_suspend_parent() and irq_resume_parent()

Hi,

On 8/12/2020 1:40 AM, Doug Anderson wrote:
> Hi,
>
> On Mon, Aug 10, 2020 at 4:21 AM Maulik Shah <[email protected]> wrote:
>> From: Douglas Anderson <[email protected]>
>>
>> This goes with the new irq_suspend_one() and irq_resume_one()
>> callbacks and allow us to easily pass things up to our parent.
>>
>> Signed-off-by: Douglas Anderson <[email protected]>
>> Signed-off-by: Maulik Shah <[email protected]>
>> ---
>> include/linux/irq.h | 2 ++
>> kernel/irq/chip.c | 28 ++++++++++++++++++++++++++++
>> 2 files changed, 30 insertions(+)
> Thanks for posting my patch. Small nit here is that when I saw the
> patches listed together I realized that I forgot to capitalize
> "introduce" in ${SUBJECT}. The two patches right next to each other
> that both start with "introduce" where one has a capital and one
> doesn't look weird. Hopefully you can fix in the next version?
>
> Thanks!
>
> -Doug

Sure, i will update subject in v5.

Thanks,
Maulik

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation