From: Akash Asthana <akashast@codeaurora.org>
To: Stephen Boyd <swboyd@chromium.org>, Greg KH <gregkh@linuxfoundation.org>
Cc: linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org,
mgautam@codeaurora.org
Subject: Re: [PATCH v4 1/2] tty: serial: qcom_geni_serial: IRQ cleanup
Date: Mon, 11 Nov 2019 12:35:09 +0530 [thread overview]
Message-ID: <31e62cb8-d169-dc56-d4b1-e60bffff93d0@codeaurora.org> (raw)
In-Reply-To: <5dc2f5c6.1c69fb81.3483d.c535@mx.google.com>
On 11/6/2019 10:03 PM, Stephen Boyd wrote:
Thanks for reviewing.
> Quoting Greg KH (2019-11-06 04:16:00)
>> On Tue, Nov 05, 2019 at 05:00:12PM -0800, Stephen Boyd wrote:
>>> Quoting Greg KH (2019-11-05 09:17:05)
>>>> On Tue, Nov 05, 2019 at 03:27:15PM +0530, Akash Asthana wrote:
>>>>> @@ -1307,7 +1307,21 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)
>>>>> port->handle_rx = console ? handle_rx_console : handle_rx_uart;
>>>>> if (!console)
>>>>> device_create_file(uport->dev, &dev_attr_loopback);
>>>>> - return uart_add_one_port(drv, uport);
>>>>> +
>>>>> + ret = uart_add_one_port(drv, uport);
>>>>> + if (ret)
>>>>> + return ret;
>>>> What is going to remove the sysfs file you just created above (in a racy
>>>> way, it's broken and needs to be fixed, but that's a different issue
>>>> here...)?
>>>>
>>>>
>>>>> +
>>>>> + irq_set_status_flags(uport->irq, IRQ_NOAUTOEN);
>>>>> + ret = devm_request_irq(uport->dev, uport->irq, qcom_geni_serial_isr,
>>>>> + IRQF_TRIGGER_HIGH, port->name, uport);
>>>>> + if (ret) {
>>>>> + dev_err(uport->dev, "Failed to get IRQ ret %d\n", ret);
>>>>> + uart_remove_one_port(drv, uport);
>>>>> + return ret;
>>>> Does this remove the sysfs file?
>>>>
>>> The loopback file isn't documented. It isn't removed when the driver is
>>> removed either. Can we just remove the whole thing? It would be nicer if
>>> that sort of thing was supported in the tty layer somehow. Is it?
>> I don't know what that file does, so yes, please delete it :)
This sysfs file was exposed to user to configure hardware to run in
loopback mode (sorting TX and RX lines).
We use this mode to sanity test TX and RX path of the driver after
making any code changes.
But we can remove this sysfs file and use TIOCM_LOOP to set HW in
loopback mode as suggested by stephen.
>> And as for support in the tty layer itself, if you figure out what it
>> does, sure, we can add support if needed.
>>
> I think it may be supported in the tty layer with TIOCM_LOOP already.
> Akash, can you confirm?
Yeah, its already supported in tty layer. We can call TIOCMSET ioctl
from user space test application with TIOCM_LOOP argument to configure
our HW in loopback mode.
I will remove all the code related to loopback sysfs.
Thanks for this suggestion.
--
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-11 7:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 9:57 [PATCH v4 1/2] tty: serial: qcom_geni_serial: IRQ cleanup Akash Asthana
2019-11-05 17:17 ` Greg KH
2019-11-06 1:00 ` Stephen Boyd
2019-11-06 12:16 ` Greg KH
2019-11-06 16:33 ` Stephen Boyd
2019-11-11 7:05 ` 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=31e62cb8-d169-dc56-d4b1-e60bffff93d0@codeaurora.org \
--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=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).