Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751433AbdFYVo0 (ORCPT ); Sun, 25 Jun 2017 17:44:26 -0400 Received: from zimbra.gr13.net ([46.4.151.110]:45062 "EHLO zimbra.gr13.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751349AbdFYVoZ (ORCPT ); Sun, 25 Jun 2017 17:44:25 -0400 To: linux-kernel@vger.kernel.org From: "Enrico Weigelt, metux IT consult" Subject: RFC: abstraction for RPC'ish hardware drivers ? mailbox ? netif ? Message-ID: <7e8b574f-3706-b954-b3c0-05cf50d544c4@gr13.net> Date: Sun, 25 Jun 2017 23:44:19 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1099 Lines: 37 Hi folks, I'm currently implementing drivers for an industrial backplane, (*1) which uses some kind of rpc / command-response mechanism. There're different variants, eg. some proprietary serial interface, USB link, pci cards, etc. On top of that there's a block-based command- response mechanism for talking to the individual cards (which may have multiple channels). In the device I'm currently working on, we have several cards, eg. CPU, PMU (power supply) and several IO modules. My primary goal is docking in the IO cards into IIO (and later the PMU into the power management infrastructure). So, I need layers: the serial port (using uart stuff), the packet layer and IIO. (and wire them via DT) I see two possible candidates here: a) mailbox b) network interface Both of them seem to be a good fit for packet-based interfaces, but the network layer might be too much overhead, and (IMHO) doesn't seem to be suited for direct use from (non network-protocol) drivers. What do you folks think ? --mtx -- Enrico, Sohn von Wilfried, a.d.F. Weigelt, metux IT consulting +49-151-27565287