All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Patrick Menschel <menschel.p@posteo.de>,
	linux-can <linux-can@vger.kernel.org>
Subject: Re: [PATCH 4/5][RFC] can: kline: Add KLine rtnl configuration options
Date: Sun, 12 Jun 2016 19:34:04 +0200	[thread overview]
Message-ID: <575D9D0C.8080903@denx.de> (raw)
In-Reply-To: <575D8160.4060702@posteo.de>

On 06/12/2016 05:36 PM, Patrick Menschel wrote:
> Am 11.06.2016 um 21:40 schrieb Marek Vasut:
>> On 06/09/2016 10:21 PM, Menschel.P wrote:
>>> Hello Marek,
>>
>> Hi,
>>
>>> these look like the timing parameters for KWP2000 protocol.
>>>> +struct kline_timing {
>>>> +    __u32 w0;
>>>> +    __u32 w1;
>>>> +    __u32 w2;
>>>> +    __u32 w3;
>>>> +    __u32 w4;
>>>> +    __u32 w5;
>>>> +    __u32 p1;
>>>> +    __u32 p2_94;
>>>> +    __u32 p2_08;
>>>> +    __u32 p3;
>>>> +    __u32 p4;
>>>> +};
>>> The wX parameters are the wake up timings and the pX are the response
>>> timings in between tester and ecu.
>>> Imho the protocol needs to be separated from the device driver since
>>> there are other protocols like kwp500 and kwp1281 that use k-line.
>>
>> Do you have some idea how to design the framework ?
>>
> 
> Hi,
> 
> As I wrote before, I favor the serial port since K-Line is pure serial
> communication.
> Let the serial driver do the wakeup pattern in kernel space by using
> pinctl to pull up/ down the line for the necessary time.

Not the serial driver, this can be all moved into a line discipline
to avoid adding cruft into the serial driver itself. But how do you
propose to configure the necessary timings, by IOCTLs ? That feels
like bloating the interface. Sysfs might also work, though I am not
sure about that.

> If no pinctl available use regular RTS/CTS pins with external
> transistors. There is already an extension for RS485 support, e.g. RX/TX
> switching of the transceiver PHY.

The RS485 bit can only ever work if the UART supports it. I have seen
some parts using GPIO for the switching and that cannot work reliably
on higher-speed links.

> The protocol handler would hand the wakeup parameters to the serial
> driver when Open() is called.

How ?

> Regards,
> Patrick
> 


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2016-06-12 17:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-09 19:21 [PATCH 1/5][RFC] can: slcan: Replace sizeof struct can_frame with CAN_MTU Marek Vasut
2016-06-09 19:21 ` [PATCH 2/5][RFC] can: Factor out alloc_socketdev() Marek Vasut
2016-06-09 19:21 ` [PATCH 3/5][RFC] can: Add register_candevice() Marek Vasut
2016-06-09 19:21 ` [PATCH 4/5][RFC] can: kline: Add KLine rtnl configuration options Marek Vasut
2016-06-09 20:21   ` Menschel.P
2016-06-11 19:40     ` Marek Vasut
2016-06-12 15:36       ` Patrick Menschel
2016-06-12 17:34         ` Marek Vasut [this message]
2016-06-09 19:21 ` [PATCH 5/5][RFC] can: kline: Add KLine ldisc Marek Vasut
2016-06-17  9:24 ` [PATCH 1/5][RFC] can: slcan: Replace sizeof struct can_frame with CAN_MTU Marc Kleine-Budde
2016-06-17  9:25   ` 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=575D9D0C.8080903@denx.de \
    --to=marex@denx.de \
    --cc=linux-can@vger.kernel.org \
    --cc=menschel.p@posteo.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.