[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877closnvs.ffs@tglx>
Date: Fri, 08 Dec 2023 16:41:11 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: James Tai <james.tai@...ltek.com>, Marc Zyngier <maz@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
James Tai <james.tai@...ltek.com>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v3 6/6] irqchip: Introduce RTD1619B support using the
Realtek common interrupt controller driver
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?
Thanks,
tglx
Powered by blists - more mailing lists