Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp13791736rwb; Sun, 27 Nov 2022 11:25:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf5L6Ac/1kZH62xxzezAh/frEGUGnCRYuwsfnFHd1ZDoU4/Rs3x8XvkHOWlYbgpHXQKTKbke X-Received: by 2002:a63:e20:0:b0:440:6e64:fb02 with SMTP id d32-20020a630e20000000b004406e64fb02mr23979274pgl.84.1669577102041; Sun, 27 Nov 2022 11:25:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669577102; cv=none; d=google.com; s=arc-20160816; b=wOpp1URmW6BL483YKy+YwiTPUUuayh/T14vAHM/IlqZ57mgaTeUTzWUcYVcQbHMfxd 6Qj5xQ4IxwAJbNs8b5v18B5BuCKZc0uocX8EHlKBjBt4l2/5VSifTWuxkK/zsIc/ybPC 1y6MLhytExuw/DXYr4GZd/Cfjt/VvtNsAaBdustt3EevEtwVsQjLb4qgIrnRVWpZZQiE NOFNnzjAGluJBAXqBhNGpzvlkO88QEJT+2YjUcA4AghZhji0dGerf5ME6AFWui4aYa+Y e54l+XBv1eAbq6BiMGwFO09pgZt4nPzHcdQbCKa1fwN0A99Krq/C8Z3HuxpfKmbTwT9G 2PMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=C+mZx1Eg6bo4mfX+DFliuwOi9n3vRN8QYXoOJN3XKzg=; b=wiZKxAdntv91dB0c8D8poUBCKEO/X3627174Yh3plM6vVhrOhWnjpJAoMIgCA2SZ8N mIbsfSqfd0AS/Q4nTwZZuc0vS3knF6pSWaa8Xy2u6Yyrb6dAby495jQeSVEtSEUs2qXD hoRvxNQDRBQqR1ufTKXqLOm2y+3lNkuRQgKFK/+mjKxFAO74dgvRqpf/NLjnvKmC0DVG F0SdIoIt6qd+gix+o6e2O6MBrDnTCF0GuzRA83VDIJJ4j6Tz3N2ZRNPtjdSGCebpqljF hj0T6lG0hwlVe2pxIwyWEyXF5hsS3kIKP9XQzTj/UUirdcP/LLHebMpFDGA4xZkKEtg5 psow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@fritzc.com header.s=dkim header.b=jWzEMUki; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14-20020a1709027d8e00b0017a0e8713cesi7890977plm.452.2022.11.27.11.24.51; Sun, 27 Nov 2022 11:25:02 -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=fail header.i=@fritzc.com header.s=dkim header.b=jWzEMUki; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229646AbiK0TS4 (ORCPT + 84 others); Sun, 27 Nov 2022 14:18:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbiK0TSs (ORCPT ); Sun, 27 Nov 2022 14:18:48 -0500 Received: from fritzc.com (mail.fritzc.com [IPv6:2a00:17d8:100::e31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E53F3A4; Sun, 27 Nov 2022 11:18:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fritzc.com; s=dkim; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=C+mZx1Eg6bo4mfX+DFliuwOi9n3vRN8QYXoOJN3XKzg=; b=jWzEMUkiw2c8kHimMLq5YPfDMl 8zx4jM3k6D+Xz0eHpryqHe8swrxyjuF7KWjH7U2bmjfjsIsHm47K8DRbjiHmZrb9Kok/yNnrJlDxJ H6NhXquUI/+PJ+mOlS82Qp+x7QxxDMs9Aru7mrg+GyOSz1Qn/esHMtGdAF32cSRo5O9o=; Received: from 127.0.0.1 by fritzc.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim latest) (envelope-from ) id 1ozMvf-000XD6-0c; Sun, 27 Nov 2022 20:03:03 +0100 From: Christoph Fritz To: Oliver Hartkopp , 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 Subject: [RFC][PATCH 0/2] LIN support for Linux Date: Sun, 27 Nov 2022 20:02:42 +0100 Message-Id: <20221127190244.888414-1-christoph.fritz@hexdev.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam_score: -1.0 X-Spam_bar: - X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 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 -- 2.30.2