Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10745274imu; Thu, 6 Dec 2018 06:11:28 -0800 (PST) X-Google-Smtp-Source: AFSGD/WdEklfssaED5gEhd5KECAmn7Qws0Mlmt3ZDmAUaJbVsCoiPYAlR69l6X5TEOpXdiH7rnf+ X-Received: by 2002:a62:6cc8:: with SMTP id h191mr29743236pfc.89.1544105488199; Thu, 06 Dec 2018 06:11:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544105488; cv=none; d=google.com; s=arc-20160816; b=Gpqd2TPkjoRQHWdG2OIXd2OAsiHrcbZPNZfy+LRMd46nhz1/NMdLnT35aACKQRJmHd GVYfvLMUk0Z6bPhUS4eYfodb8mYhZMAz7PuDVV6V0RlOjjUgIcnRODKj+Oog0nfS4UQd wM2Bnh5dlFiNzssqUv/2zYnpGgiUwlFZTgy+AJLqwnKrwV2vTyC6O4fOGMEkHlh2oEF1 WAgYRWzxTPf+Z8b+i2JhwNJb2cgUS968WjqkrCp0RGM6pTfY5gZqKIXreVvXrgh/lqIQ nfMonSgpgM70OkoNhGCjS6sx9xwvDBbCnABPwEqe3DEVGjY4MNnmust8fgHTjZkFWcqD vOuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=2C8kRr+G3uxM4WlfscdXp12RNhVO4i+GPYXe/zG6t3s=; b=uf50sqBtJc1mRBWkN7ngZTruRpTUw/lhwRmAu6vJkzRNhImhKbaP7PmjOBm7D6fDMs T0ejSWsqZd2ugN98p1CtmuWUFFDBZ8wIhCPUsynhviSkAxAegbFjFWqaM6ZemfeeuTi/ 0g8CUHxH1vA6yb6IBH/zS/PNX2qy+3bOPG7hGdu7Lxp9iugrn+dm19jXds6+XtczOdhp NVmRgA1piw7kRALTBEyYu1SFyhiASVj5TIo8vSmUBpk2VU3xfRj1Z3LVr5XVoGCRbygV XSA6OEBxlruLHZYuBkbGSecs414RdAWQbqPVriJ6exLJoJW1U+TdzQfBqsGKlfPNgT9s LaWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=G+oKTNUq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a13si396940pfd.3.2018.12.06.06.10.43; Thu, 06 Dec 2018 06:11:28 -0800 (PST) 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=@kernel.org header.s=default header.b=G+oKTNUq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729543AbeLFOHx (ORCPT + 99 others); Thu, 6 Dec 2018 09:07:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:34926 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727704AbeLFOHw (ORCPT ); Thu, 6 Dec 2018 09:07:52 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CEBFD20868; Thu, 6 Dec 2018 14:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1544105272; bh=BnvNRoLWokbZ7D8FHIz2PiJW1DFp4gXWpokmm1R+sqI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=G+oKTNUq2pYBgv1F1fzykZFuHEih20hD7sTIP309EinBnbSsOYU6bXH0mrGyZm+jx QiYY0MDF7ouBmteKFW2h0praLr504OKZVQXLt/+E4KyHZuzckjJDdOyRVvtqgCQ3GV I+HbwsvZZWeZRIL6Sh9EL5reXn53a/xHqLJkL+UM= Date: Thu, 6 Dec 2018 15:07:50 +0100 From: Greg KH To: Sven Van Asbroeck Cc: Sven Van Asbroeck , robh+dt@kernel.org, Linus Walleij , Lee Jones , mark.rutland@arm.com, Andreas =?iso-8859-1?Q?F=E4rber?= , treding@nvidia.com, David Lechner , noralf@tronnes.org, johan@kernel.org, Michal Simek , michal.vokac@ysoft.com, Arnd Bergmann , john.garry@huawei.com, geert+renesas@glider.be, robin.murphy@arm.com, paul.gortmaker@windriver.com, sebastien.bourdelin@savoirfairelinux.com, icenowy@aosc.io, Stuart Yoder , maxime.ripard@bootlin.com, Linux Kernel Mailing List , devicetree Subject: Re: [PATCH v5 1/6] fieldbus_dev: add Fieldbus Device subsystem. Message-ID: <20181206140750.GB18947@kroah.com> References: <20181204220224.27324-1-TheSven73@googlemail.com> <20181204220224.27324-2-TheSven73@googlemail.com> <20181205101659.GA27058@kroah.com> <20181205191724.GA434@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.1 (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 05, 2018 at 05:32:19PM -0500, Sven Van Asbroeck wrote: > Thanks :) > > On Wed, Dec 5, 2018 at 2:17 PM Greg KH wrote: > > > > Great, then call it a 'fieldbus' class, not "fieldbus_dev' class. > > Small nit: > > Hardware connected to a fieldbus comes in two distinct flavours: > - clients (e.g. thermometer, robotic arm) called "fieldbus devices" > - servers (e.g. a PLC) called "fieldbus controllers" > > Their userspace APIs will probably differ quite a lot. But servers are going to be much more rare, and odds are userspace is not going to need to control anything with them, right? > The userspace API created by the patch is only for clients a.k.a. > "fieldbus devices". That's why I'm writing 'fieldbus_dev' all over the place. > > For simplicity, we could change that to just 'fieldbus'. But would this get > us in trouble when, at some point, we want to add a userspace API for > servers a.k.a. "fieldbus controllers" ? Ick, yeah, I guess so, but planning for future events is not something we do well at all. Are you sure you will need fieldbus controllers as a class? And as these are really devices, why not make them a "device" and a bus? What type of topology do you have on these busses? Are everything "flat" and connected directly to a PCI/USB/platform device? Or are there multiple devices attached to a single controller? It really feels like you want to use 'struct device' and a bus_type and not a class here to me... thanks, greg k-h