devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "James Tai [戴志峰]" <james.tai@realtek.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <maz@kernel.org>, "Rob Herring" <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	kernel test robot <lkp@intel.com>
Subject: RE: [PATCH v3 6/6] irqchip: Introduce RTD1619B support using the Realtek common interrupt controller driver
Date: Tue, 19 Dec 2023 03:29:57 +0000	[thread overview]
Message-ID: <a5cb8869bbc342c2a1451a63bf6ce0d9@realtek.com> (raw)
In-Reply-To: <877closnvs.ffs@tglx>

Hi Thomas,

>On Wed, Nov 29 2023 at 13:43, James Tai wrote:
>> +static int realtek_intc_rtd1619b_suspend(struct device *dev) {
>> +     struct realtek_intc_data *data = dev_get_drvdata(dev);
>> +     const struct realtek_intc_info *info = data->info;
>> +
>> +     data->saved_en = readl(data->base + info->scpu_int_en_offset);
>> +
>> +     writel(DISABLE_INTC, data->base + info->scpu_int_en_offset);
>> +     writel(CLEAN_INTC_STATUS, data->base + info->umsk_isr_offset);
>> +     writel(CLEAN_INTC_STATUS, data->base + info->isr_offset);
>> +
>> +     return 0;
>> +}
>> +
>> +static int realtek_intc_rtd1619b_resume(struct device *dev) {
>> +     struct realtek_intc_data *data = dev_get_drvdata(dev);
>> +     const struct realtek_intc_info *info = data->info;
>> +
>> +     writel(CLEAN_INTC_STATUS, data->base + info->umsk_isr_offset);
>> +     writel(CLEAN_INTC_STATUS, data->base + info->isr_offset);
>> +     writel(data->saved_en, data->base + info->scpu_int_en_offset);
>> +
>> +     return 0;
>> +}
>> +
>> +static const struct dev_pm_ops realtek_intc_rtd1619b_pm_ops = {
>> +     .suspend_noirq = realtek_intc_rtd1619b_suspend,
>> +     .resume_noirq  = realtek_intc_rtd1619b_resume, };
>
>So this is the 4th copy of the same code, really? Why is this not part of the
>common code?
>
Yes it is the same code. 
I had originally assumed that each platform would require some different settings, 
but I've realized that there is no such requirement in the current architecture.
I will move this part to the common code.

Thanks for your feedback.

Regards,
James



      reply	other threads:[~2023-12-19  3:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29  5:43 [PATCH v3 0/6] Initial support for the Realtek DHC SoCs James Tai
2023-11-29  5:43 ` [PATCH v3 1/6] dt-bindings: interrupt-controller: Add support for " James Tai
2023-11-29  8:57   ` Krzysztof Kozlowski
2023-12-08  5:40     ` James Tai [戴志峰]
2023-11-29  5:43 ` [PATCH v3 2/6] irqchip: Add interrupt controller " James Tai
2023-11-29  8:21   ` Dan Carpenter
2023-11-29 13:21     ` Dan Carpenter
2023-12-08  8:21       ` James Tai [戴志峰]
2023-12-08  8:43         ` Dan Carpenter
2023-12-11  5:19           ` James Tai [戴志峰]
2023-11-29 15:41     ` Rob Herring
2023-12-11  5:19       ` James Tai [戴志峰]
2023-12-08 15:31   ` Thomas Gleixner
2023-12-19  3:15     ` James Tai [戴志峰]
2023-12-20 15:30       ` Thomas Gleixner
2023-12-22  6:20         ` James Tai [戴志峰]
2023-11-29  5:43 ` [PATCH v3 3/6] irqchip: Introduce RTD1319 support using the Realtek common interrupt controller driver James Tai
2023-12-08 15:37   ` Thomas Gleixner
2023-12-19  5:51     ` James Tai [戴志峰]
2023-12-11 17:41   ` Rob Herring
2023-12-19  5:10     ` James Tai [戴志峰]
2023-11-29  5:43 ` [PATCH v3 4/6] irqchip: Introduce RTD1319D " James Tai
2023-11-29  5:43 ` [PATCH v3 5/6] irqchip: Introduce RTD1325 " James Tai
2023-11-29  5:43 ` [PATCH v3 6/6] irqchip: Introduce RTD1619B " James Tai
2023-12-08 15:41   ` Thomas Gleixner
2023-12-19  3:29     ` James Tai [戴志峰] [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a5cb8869bbc342c2a1451a63bf6ce0d9@realtek.com \
    --to=james.tai@realtek.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=maz@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).