From: Marek Vasut <marex@denx.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>,
Mirza Krak <mirza.krak@hostmobility.com>
Cc: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>,
Marc Kleine-Budde <mkl@pengutronix.de>,
Wolfgang Grandegger <wg@grandegger.com>
Subject: Re: [RFC] K-Line protocol via SocketCAN
Date: Wed, 15 Jun 2016 05:42:58 +0200 [thread overview]
Message-ID: <5760CEC2.2050701@denx.de> (raw)
In-Reply-To: <575F9FBD.2030809@hartkopp.net>
On 06/14/2016 08:10 AM, Oliver Hartkopp wrote:
>
>>> On 06/11/2016 09:42 PM, Marek Vasut wrote:
>>>> Well, I was talking about arinc 429 .
>>>>
>>>
>>> Ah - I remember that discussion:
>>> https://lwn.net/Articles/663130/
>>> http://thread.gmane.org/gmane.linux.network/385449
>>>
>>> What happed to it?
>>
>> Priorities shifted. I still hope to return to it and get it into
>> mainline proper. Since I did some digging in the socketcan recently,
>> I have a better understanding of it now too. I believe the agreement
>> there was to put it into the socketcan stack as an extension, does it
>> still make sense ?
>>
>
> There were intensive discussions about the original patchset and I think
> the copy&paste hell from the PF_CAN won't make it.
Yeah, that's pretty clear to me. But does it make sense to extend
socketcan with that arinc429 stuff instead then ?
> Let's see how the K-Line discussion opens your view :-)
Well it certainly was enlightening.
> (..)
>
>>> E.g. think about a chardev in /dev/kline0 which is located in
>>> linux/drivers/misc and which uses a tty under the hood.
>>>
>>> I'm not a K-Line specialist like Mirza who was able to point at timings
>>> that should be handled in user space and not in kernel space.
>>
>> If I start handling the timings in userspace, I won't be able to get to
>> the precision I need. That's the reason I'd like to put the kline ldisc
>> in kernel.
>>
>>> But if you implement a chardev driver which allows the configuration of
>>> these kernel relevant K-Line timings and makes use of the tty layer -
>>> what should be wrong with this approach?
>>>
>>> You would have a single user K-Line interface which can handle specific
>>> struct kline data. Fine.
>>
>> Hrm. I was just worried about adding new IOCTLs, but if that's fine, I
>> will reevaluate using just the ldisc.
>>
>
> Putting the really necessary timing requirements into the kernel into
> the ldisc need some configuration of that ldisc. AFAIK ldisc specific
> ioctls are the way to configure that kind of details.
>
> So let's see what happens when you post it.
Right.
>>>>> As K-Line never was multi-user capable by design the chardev
>>>>> approach is
>>>>> the most 'natural' concept IMHO.
>>>>
>>>> I could technically just implement this as a ldisc with some additional
>>>> ioctls, but is that really such a good idea ?
>>>
>>> Yes. It would be some kind of ldisc for a K-Line chardev driver (and not
>>> for a netdevice) like other ldiscs in linux/include/uapi/linux/tty.h
>>>
>>> Why do you feel this is not a good idea?
>>
>> It feels much better now, so I will poke into that.
>
> Thanks!
Thanks!
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2016-06-15 3:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-19 23:15 [RFC] K-Line protocol via SocketCAN Marek Vasut
2016-05-20 6:04 ` Mirza Krak
2016-05-20 6:28 ` Oliver Hartkopp
2016-05-20 11:59 ` Marek Vasut
2016-05-22 20:27 ` Patrick Menschel
2016-05-22 21:11 ` Marek Vasut
2016-06-01 2:26 ` Marek Vasut
2016-06-05 12:07 ` Oliver Hartkopp
2016-06-09 15:00 ` Marek Vasut
2016-06-09 18:29 ` Oliver Hartkopp
2016-06-09 19:21 ` Marek Vasut
2016-06-09 20:12 ` Oliver Hartkopp
2016-06-11 19:42 ` Marek Vasut
2016-06-12 19:28 ` Oliver Hartkopp
2016-06-13 22:07 ` Marek Vasut
2016-06-14 6:10 ` Oliver Hartkopp
2016-06-15 3:42 ` Marek Vasut [this message]
2016-06-15 6:57 ` Oliver Hartkopp
2016-06-15 11:05 ` Marek Vasut
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=5760CEC2.2050701@denx.de \
--to=marex@denx.de \
--cc=linux-can@vger.kernel.org \
--cc=mirza.krak@hostmobility.com \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
--cc=wg@grandegger.com \
/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).