Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp699861yba; Wed, 24 Apr 2019 08:13:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKpXYzFgkD7ZyQKcPGMOLucUB7iEoYD8IAJeers0A1oEa3EfgS2iJgnfxO4+LtyfnzHe3R X-Received: by 2002:a65:51c8:: with SMTP id i8mr30894861pgq.175.1556118799034; Wed, 24 Apr 2019 08:13:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556118799; cv=none; d=google.com; s=arc-20160816; b=btPWEuGadfg6qtMIbRFKNVZxTXa9YKrMJRfNopPwJjFBOh5bA2UnOIwa8WCdv/6+4t SMA5pR2OgztsbuYgbEKD1JUtOt/zNI5X60I1H+3mlyzaVSbd8rOh/OFGvZvZkE/3NwGM DCm3HXMtmAD2SVzYl+yQ9EOWOdLiBwVdtm+pm0VrJ+zpNR3W5L/op9Xszwkzjh3gbahQ JPfuto1EpbXzNmNcPYHfzox7TAqFa3D6mESUIQotuWboS6KCsFlfUrhHhSRv9zs45a7x nIavjwFrHSsch01RbOyuSeYh5HpbXHTzRg1LLwo273MpvSkBwhPEfHDWxfFGL7rG5+0i 4VyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=c5b1SSwWrbMSWeHJT9LSNjf6Sf7GaupVu/R4M530q+Q=; b=edTiIBtiQ4niuJlKmA2GBwhjd4pzeptVVec80zoGy2pH5lVSZEsuTGFQc0Ax0ILs9B 85HyecMUecMKskVl/FcQ1iMHxZMXEkFfuUcmBoIPsumZkvNskg4CFS6yT6taO96+++Jl 88XarZF6P8kGhL5Qn114oH+8Kzlmo0V36lf1wUz+X30EqB/SVF/Jq+9jzHCJM2LAhJcw l0LB+LACTX4svikL7gxXNNDT4WVmn/AyM2DO36CLboN3ioHBt0qAFKCzlrEYDe6t9go/ v3spBU+UoB6dC+Gs0S/Gvybb1fE8mNAf4p7XIMZNjlIOIwWoKnlp9eEnpe2z17PMrUEC HKaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="llwhd/u9"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k91si19671720pld.87.2019.04.24.08.13.03; Wed, 24 Apr 2019 08:13:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="llwhd/u9"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731002AbfDXPKa (ORCPT + 99 others); Wed, 24 Apr 2019 11:10:30 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:35490 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727876AbfDXPK3 (ORCPT ); Wed, 24 Apr 2019 11:10:29 -0400 Received: by mail-ot1-f66.google.com with SMTP id m10so16467197otp.2; Wed, 24 Apr 2019 08:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c5b1SSwWrbMSWeHJT9LSNjf6Sf7GaupVu/R4M530q+Q=; b=llwhd/u9jhAdJR80lPLwvLXhdH9NVwDfMRCJP0upafUi+2a0yufmLyarnasjWcn6I1 +YY9pNWFrNOk1QtVJDAmZZnfodsOziE2T75HEPCSD3lUwI8SkpwciH3juvAFjIyx1XE1 4hRxyMxsa1zjbxTY3S0N8VK3kLW9yfOMyuBMEphXdgvMbfXOyfOqugixFRvc+2iTOsTa g5oY6Xrixj8mOODg32L7yGPy6jzL8J0/U0snbI3j9PS1Pfs4EedGBXNVRCOzgxqAB9hq pYz3yrunyYFB8s/ueSKse7H+LCNm1L8JupOmopyZwNpXlfM3Tl2NNhsJFJkwfdHvFAno 1nCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c5b1SSwWrbMSWeHJT9LSNjf6Sf7GaupVu/R4M530q+Q=; b=DAqV56mQwvWuUkooCb0aZP92aVWZnzvseqdvHp/XI4azW5mhwRgNF0IjQ/jtqV/bvy kqgUTAebM3gGpit7xyvTFdnuEyyft03X5qRGZcfxSsLsk2fQxLl653w53aNUhWYwwVfB CNJPt5SJe1r0tHLFX9zTM1C4sRfgY85PmmdvuOvnSyWffJGLogLZ6Meh/Ic50yVVBeFO LwW6hbcw5+IqS5w2XxZJPiZKJ751a/awV3GbkHzoLumozLVciL/tnBH2LAjbKRo3vxX2 rJWvMknyYlyCS/PUEUaLKyDnyXzsioZhx3XKz0dufNmPIJlPi0ya6oKIWb3NVOeBA5LT rHVw== X-Gm-Message-State: APjAAAUt5MJ5Gb2T3+UDdhUHfJ+bISV4PwQZdk+sjDelYwXDexXvg8kV 14KILsPlzrp62sV0sqWHb6Z4dG8Hf35eqElGbHU= X-Received: by 2002:a05:6830:2144:: with SMTP id r4mr18039151otd.250.1556118628400; Wed, 24 Apr 2019 08:10:28 -0700 (PDT) MIME-Version: 1.0 References: <20190409144250.7237-1-TheSven73@gmail.com> <982e69c6-4e68-6f62-8bed-cd5a1802272b@metux.net> <23a25601-ed98-5348-9bac-bf8fc2baea5e@metux.net> <7ceaeb70-f937-bd84-95e5-d7a6baeb5d87@metux.net> <06024a8a-ad00-8062-215b-01b2f95a6e24@hartkopp.net> In-Reply-To: From: Sven Van Asbroeck Date: Wed, 24 Apr 2019 11:10:17 -0400 Message-ID: Subject: Re: [PATCH v10 0/7] Add Fieldbus subsystem + support HMS Profinet card To: Oliver Hartkopp Cc: =?UTF-8?Q?Andreas_F=C3=A4rber?= , "Enrico Weigelt, metux IT consult" , Linus Walleij , Lee Jones , mark.rutland@arm.com, treding@nvidia.com, David Lechner , noralf@tronnes.org, johan@kernel.org, Michal Simek , michal.vokac@ysoft.com, Arnd Bergmann , Greg KH , john.garry@huawei.com, geert+renesas@glider.be, robin.murphy@arm.com, Paul Gortmaker , sebastien.bourdelin@savoirfairelinux.com, icenowy@aosc.io, Stuart Yoder , "J. Kiszka" , maxime.ripard@bootlin.com, Linux Kernel Mailing List , netdev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Oliver, thank you for your input, appreciate it ! On Wed, Apr 24, 2019 at 7:50 AM Oliver Hartkopp wrote: > > I hopefully got it right by: You implemented a standardized chardev ABI > that enables a data exchange between userspace and kernel, where other > drivers can register 'from inside the kernel', that feel like being a > fieldbus controller?!? Close ! Devices that "feel like" a Fieldbus _device_ can register. The subsystem is called fieldbus_dev "fieldbus device" because it abstracts Linux fieldbus clients that want to expose themselves as e.g. an actuator, motor, console light, switch, ... The commit message fully describes this, and so does the Documentation. Any improvements are welcome. https://lkml.org/lkml/2019/4/16/817 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fieldbus/Documentation/fieldbus_dev.txt?h=staging-next During one of the eleven review cycles, drivers/fieldbus_dev got truncated to drivers/fieldbus because the reviewers felt that _dev was redundant, given the lack of other fieldbus subsystems. This subsystem came about because I'm trying to mainline support for three HMS cards: FLNet, Profinet and CC-Link. These cards are not controllers, but slaves on the bus. All three make heavy use of process memory. From the get-go, the kernel reviewers made it clear that the userspace cannot be specific and must be generic. So I crafted a generic ABI that works for clients on process-memory based busses, and called it 'fieldbus_dev', for lack of a better name. I'm by no means a fieldbus expert. It seems that the term 'fieldbus' is much broader than these process-memory based standards? I am open to any _concrete_ naming suggestions that can get consensus. I'm a bit confused by Wikipedia's entry for fieldbus. It suggests that IEC 61158 and Fieldbus are interchangeable? https://en.wikipedia.org/wiki/Fieldbus Fieldbus is the name of a family of industrial computer network protocols used for real-time distributed control, standardized as IEC 61158. > > How can this fit together for me and what would be the plan to cover > CANopen or EtherCAT in the fieldbus subsystem? Does it need some kind of > CANopen protocol driver that registers to your ABI and speaks to CAN > interfaces on the other side? Given that CAN/EtherCAT are not process memory based (that I know of), the fieldbus_dev subsystem is probably not a good fit. Also no good for bus controllers, the subsystem deals with slave devices only. Sven