Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp14469400rwb; Mon, 28 Nov 2022 01:04:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf7TXriJBDMqXoqO+MZfWoSw8MaE3qZfQcO+1CpRBI0dexEqTO2iqRgJSYsw/RXwcRaYEcrh X-Received: by 2002:a63:500b:0:b0:440:4ad7:cde9 with SMTP id e11-20020a63500b000000b004404ad7cde9mr26089924pgb.308.1669626271471; Mon, 28 Nov 2022 01:04:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669626271; cv=none; d=google.com; s=arc-20160816; b=p37R7Sz/R6ARIhjlVm+uhIDeRYtGeQaOA5VdyjWkmMC4NE9SDgt3FpuC8HI/MGPJQz X2hPlfyW8AyOH/hBFZOruqisV+iKXz8yQQMzLbcDN2vR5X/RzU7FkmCbKMtqozBTHpo1 PnVDS+pxzgyeh/K9OAsrVwSazMSXDqt1BQf2EhkAOtsqHyqCUyA+AvxEzoBg5LDpUhFl tCDwHmMdWul+ediMUOV2xacm0SgWBb2FHTn1rQHlYZKaY0tkpNQ0A16mLJ7jBfpqLlPG F0T5pjK7REaVKluHg71VgE4vIk86bDn7W8U4YlamL0je1AIVNw2Nl65Rfcz48SArKNPj skgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=r8DNEtzdUr23A31WbyF9m0tTQ4gvOo1TVcul6uPNYC4=; b=p3s3UeNHnblD/OHWdQ9AQLCQxf8qIE9hza+aL0KJ0lkmUqRk9U6YEFWzavJCLEh0hj VgelN5qJsM+daek/LWqUQC0q/cyvMLoGniscDzKSJEVbJZWIEKYhgnEAmc7I6pIbZ78f T9ZUYPImz1ljFaiUQFfNHN6jwfDP+8af4t6rGv+U2IIZxH9h3m0ViWAUd9pKdIB0kUpN fcSTfldAot9JefOh5+zlY/O5ET3KVLQRiCe7aMdlWC8owqsBUlsAlLGhefzW+qOASJtt E15u4N+pNpwe1fIjjwsZBD7mOQj5WfnmD9sPrFXeR9OjUrabD+g+LFZfy4qXWQeE1Pto 4xbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hartkopp.net header.s=strato-dkim-0002 header.b=APDHWcTR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=hartkopp.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w10-20020a170902e88a00b0018929921900si12661395plg.80.2022.11.28.01.04.20; Mon, 28 Nov 2022 01:04:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hartkopp.net header.s=strato-dkim-0002 header.b=APDHWcTR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=hartkopp.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229754AbiK1IWR (ORCPT + 83 others); Mon, 28 Nov 2022 03:22:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbiK1IV5 (ORCPT ); Mon, 28 Nov 2022 03:21:57 -0500 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [81.169.146.165]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA007167F4; Mon, 28 Nov 2022 00:21:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1669623711; s=strato-dkim-0002; d=hartkopp.net; h=In-Reply-To:From:References:Cc:To:Subject:Date:Message-ID:Cc:Date: From:Subject:Sender; bh=r8DNEtzdUr23A31WbyF9m0tTQ4gvOo1TVcul6uPNYC4=; b=APDHWcTRLcAPh/L9ddyE3tqfyZ+vvfPXmy2/10noa5JyGTY5IJmucicG5K9FUDqIHq 9VwN1XjHttm9f7BTXe6NwFsGLcsuYQLb5o1QjwiILaGhmtL2AN/RAUh5SR/gD5k1tIw0 eIynHhMVQfH0qTkdm4BJiTJyY+yujZ2W4cZHFgril/qeZMpW00kLDD22trZWB6tXL04c gzQJtCPZtGkq/hyd6dZHxKfSWxoSlSBLQsn0TnjLwOLQoPQ9KOHv+nEARmrNIYsOSCwB UBYDaxKxvVz5Y79RHcPCUs9o24TjPPyG/xnXGjl6U4uVdLHg2g9XMtAnbWXpiEjBvvI8 Sk6A== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P2MHfkW8eP4Mre39l357AZT/I7AY/7nT2yrDxb8mjG14FZxedJy6qgO1qCHSa1GLptZHusx3hdIrpKytISr6hZqJAw==" X-RZG-CLASS-ID: mo00 Received: from [IPV6:2a00:6020:1cfd:d104::923] by smtp.strato.de (RZmta 48.2.1 AUTH) with ESMTPSA id Dde783yAS8LoOkk (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 28 Nov 2022 09:21:50 +0100 (CET) Message-ID: <58a773bd-0db4-bade-f8a2-46e850df9b0b@hartkopp.net> Date: Mon, 28 Nov 2022 09:21:44 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [RFC][PATCH 0/2] LIN support for Linux To: Christoph Fritz , Pavel Pisa , Richard Weinberger , Andreas Lauser , Wolfgang Grandegger , Marc Kleine-Budde , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221127190244.888414-1-christoph.fritz@hexdev.de> Content-Language: en-US From: Oliver Hartkopp In-Reply-To: <20221127190244.888414-1-christoph.fritz@hexdev.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Christoph, are you already aware of this LIN project that uses the Linux SocketCAN infrastructure and implements the LIN protocol based on a serial tty adaption (which the serial LIN protocol mainly is)? https://github.com/lin-bus IIRC the implementation of the master/slave timings was the biggest challenge and your approach seems to offload this problem to your USB-attached hardware right? Can I assume there will be a similar CAN-controlled programming interface to create real time master/slave protocol frames like in a usual CAN/LIN adapter (e.g. https://www.peak-system.com/PCAN-LIN.213.0.html) ?? Best regards, Oliver On 27.11.22 20:02, Christoph Fritz wrote: > The intention of this series is to kick off a discussion about how to > support LIN (ISO 17987) [0] in Linux. > > This series consist of two patches which are two individual proposals > for adding LIN abstraction into the kernel. > > One approach is to add LIN ontop of CANFD: > [RFC] can: introduce LIN abstraction > > The other approach is adding a new type of CAN-socket: > [RFC] can: Add LIN proto skeleton > > These patches are abstracting LIN so that actual device drivers can > make use of it. > > For reference, the LIN-ontop-of-CANFD variant already has a device > driver using it (not part of this series). It is a specially built USB > LIN-BUS adapter hardware called hexLIN [1]. Its purpose is mainly to > test, adapt and discuss different LIN APIs for mainline Linux kernel. > But it can already be used productively as a Linux LIN node in > controller (master) and responder (slave) mode. By sysfs, hexLIN > supports different checksum calculations and setting up a > responder-table. > > For more info about hexLIN, see link below [1]. > > We are looking for partners with Linux based LIN projects for funding. > > [0]: https://en.wikipedia.org/wiki/Local_Interconnect_Network > [1]: https://hexdev.de/hexlin/ > > Christoph Fritz (1): > [RFC] can: Introduce LIN bus as CANFD abstraction > > Richard Weinberger (1): > [RFC] can: Add LIN proto skeleton > > drivers/net/can/Kconfig | 10 ++ > drivers/net/can/Makefile | 1 + > drivers/net/can/lin.c | 181 +++++++++++++++++++++++++++ > include/net/lin.h | 30 +++++ > include/uapi/linux/can.h | 8 +- > include/uapi/linux/can/lin.h | 15 +++ > include/uapi/linux/can/netlink.h | 1 + > net/can/Kconfig | 5 + > net/can/Makefile | 3 + > net/can/lin.c | 207 +++++++++++++++++++++++++++++++ > 10 files changed, 460 insertions(+), 1 deletion(-) > create mode 100644 drivers/net/can/lin.c > create mode 100644 include/net/lin.h > create mode 100644 include/uapi/linux/can/lin.h > create mode 100644 net/can/lin.c >