tty: serial: qcom_geni_serial: Wakeup IRQ cleanup
This patch is the continuation of below mentioned commits which adds wakeup
feature over the UART RX line.
1)commit
57713b5fc2b5 ("tty: serial: qcom_geni_serial: IRQ cleanup")[v2]
2)commit
2cdb5b922daf ("tty: serial: qcom_geni_serial: Wakeup over UART
RX")[v2]
The following cleanup is done based on upstream comment received on
subsequent versions of the above-mentioned commits to simplifying the code.
- Use devm_kasprintf API in place of scnprintf.
- Use dev_pm_set_dedicated_wake_irq API that will take care of
requesting and attaching wakeup irqs for devices. Also, it sets wakeirq
status to WAKE_IRQ_DEDICATED_ALLOCATED as a result enabling/disabling of
wake irq will be managed by suspend/resume framework. We can remove the
code for enabling and disabling of wake irq from the this driver.
- Use platform_get_irq_optional API to get optional wakeup IRQ for
device.
- Move ISR registration later in probe after uart port gets register with
serial core.
Patch link:
- https://patchwork.kernel.org/patch/
11189717/ (v3)
- https://patchwork.kernel.org/patch/
11227435/ (v4)
- https://patchwork.kernel.org/patch/
11241669/ (v5)
- https://patchwork.kernel.org/patch/
11258045/ (v6)
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/1578321905-25843-2-git-send-email-akashast@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>