From: Akash Asthana <akashast@codeaurora.org>
To: Stephen Boyd <swboyd@chromium.org>, gregkh@linuxfoundation.org
Cc: mgautam@codeaurora.org, linux-arm-msm@vger.kernel.org,
linux-serial@vger.kernel.org, mka@chromium.org
Subject: Re: [PATCH V7 1/2] tty: serial: qcom_geni_serial: Wakeup IRQ cleanup
Date: Tue, 26 Nov 2019 12:21:59 +0000 [thread overview]
Message-ID: <0101016ea7a9463f-6363f81f-3b22-4b66-b8c3-23c5bf1cc624-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <5ddbfbec.1c69fb81.c6c96.3c18@mx.google.com>
On 11/25/2019 9:36 PM, Stephen Boyd wrote:
> Quoting Akash Asthana (2019-11-25 07:08:50)
>> This patch is the continuation of below mentioned commits which adds wakeup
>> feature over the UART RX line.
>> 1)commit 3e4aaea7a039 ("tty: serial: qcom_geni_serial: IRQ cleanup")[v2]
>> 2)commit 8b7103f31950 ("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>
> Ok sure.
>
>> ---
>> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
>> index ff63728..55b1d8b 100644
>> --- a/drivers/tty/serial/qcom_geni_serial.c
>> +++ b/drivers/tty/serial/qcom_geni_serial.c
>> @@ -1302,50 +1294,58 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
>> port->rx_fifo_depth = DEF_FIFO_DEPTH_WORDS;
>> port->tx_fifo_width = DEF_FIFO_WIDTH_BITS;
>>
>> - scnprintf(port->name, sizeof(port->name), "qcom_geni_serial_%s%d",
>> - (uart_console(uport) ? "console" : "uart"), uport->line);
>> + port->name = devm_kasprintf(uport->dev, GFP_KERNEL,
>> + "qcom_geni_serial_%s%d",
>> + uart_console(uport) ? "console" : "uart", uport->line);
>> + if (!port->name)
>> + return -ENOMEM;
>> +
>> irq = platform_get_irq(pdev, 0);
>> if (irq < 0)
>> return irq;
>> uport->irq = irq;
>>
>> + if (!console)
>> + port->wakeup_irq = platform_get_irq_optional(pdev, 1);
> Is there a DT binding update for this? It would be nice if the GENI SE
> binding was updated to by YAML.
Yes, there is DT binding update for this. Ok I will update GENI SE
binding to YAML
>> +
>> + uport->private_data = drv;
>> + platform_set_drvdata(pdev, port);
>> + port->handle_rx = console ? handle_rx_console : handle_rx_uart;
>> + if (!console)
>> + device_create_file(uport->dev, &dev_attr_loopback);
>> +
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project
prev parent reply other threads:[~2019-11-26 12:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1574694511-31479-1-git-send-email-akashast@codeaurora.org>
2019-11-25 15:08 ` [PATCH V7 1/2] tty: serial: qcom_geni_serial: Wakeup IRQ cleanup Akash Asthana
2019-11-25 15:08 ` [PATCH V7 2/2] tty: serial: qcom_geni_serial: Move loopback support to TIOCM_LOOP Akash Asthana
[not found] ` <0101016ea31bae6b-614d45a0-ddb0-4f82-b906-48850f439280-000000@us-west-2.amazonses.com>
2019-11-25 16:06 ` [PATCH V7 1/2] tty: serial: qcom_geni_serial: Wakeup IRQ cleanup Stephen Boyd
2019-11-26 12:21 ` Akash Asthana [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=0101016ea7a9463f-6363f81f-3b22-4b66-b8c3-23c5bf1cc624-000000@us-west-2.amazonses.com \
--to=akashast@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mgautam@codeaurora.org \
--cc=mka@chromium.org \
--cc=swboyd@chromium.org \
/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).