RE: [PATCH v3 6/6] irqchip: Introduce RTD1619B support using the Realtek common interrupt controller driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux