Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2843199ybi; Sun, 9 Jun 2019 22:46:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJOcG2Ex3QJ4ChcBqJ7sKRzb5vulY6yoUU78Hw1bJ15a3+QItOvhL0oS54VrkjIUuFaSFF X-Received: by 2002:a17:902:760f:: with SMTP id k15mr43965469pll.125.1560145614298; Sun, 09 Jun 2019 22:46:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560145614; cv=none; d=google.com; s=arc-20160816; b=1J5W3XjzZYoLuaeD3KLFBekCJQDq1UnhmJ47m22oTKcn0mFvFM2OGddRgfyjNIB7BV aHocUPHvgUBlux1di1nyqlmnFuS5mi9SXCg4sPjQXE6OVYepHw/hHv7AYm5lVDU9xjM7 QqSJFgQ7wbe7OB/BhB1Iwz3qcQPanEWhjEVlylw2Je/U0M0YKG7nnHUFHvfPVdB/CWDW vLMQ6kT33tvtupVzt+vMK+aeGBS7cB0AplRpmbe4s091f0vA5GG3CtRflGrjoX8qZBTz frQ+y23tPmcgZ0fprz7HdGB5zbIRu/cQK9o3oTN6K3+rWyf9GUMtNbOf7vmczeL+TJR4 uH6A== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jFjgjSUEKRW8v/PBr8uM0Wg98cLQUz1sDSFbELuCUcE=; b=VlW0YgB1q0TEf1w2fWliQyZabPNc1Tixr4aWmA0jyP8fHZXFw4wF6IGTAEEULSEv9I uP18Fz76B4UTAvw2p2dLN3xdhv5saeGJRMGivFF6g6HtCAe2GJPTqD4sSV8I4uI+yCLX W1eh+y6SkgUa9zS7yTCtGO1mcVQJiEtgI80FQ0SmQ1Acr54yzxme7KDtMS2cAUdCAXXE DZrVf9IgNEmreByZJPyYAsaYK7iU2Ycl3VfScGSgPyTLYig0eI9n5CLduKyrGgCf6IBz eO+Nze3omInR715G+6zjnUSiTPdeYpKLreFs1c0pyLpgV/XwUXeDMhXJ/MFzNUGEnhyh /TjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tNpoArwW; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s138si9378074pfc.148.2019.06.09.22.46.39; Sun, 09 Jun 2019 22:46:54 -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=@linaro.org header.s=google header.b=tNpoArwW; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387666AbfFJFpx (ORCPT + 99 others); Mon, 10 Jun 2019 01:45:53 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:37004 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387541AbfFJFpx (ORCPT ); Mon, 10 Jun 2019 01:45:53 -0400 Received: by mail-wr1-f65.google.com with SMTP id v14so7777494wrr.4 for ; Sun, 09 Jun 2019 22:45:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=jFjgjSUEKRW8v/PBr8uM0Wg98cLQUz1sDSFbELuCUcE=; b=tNpoArwWtBlJJRHsX/hPjx3MAZiZF6YYEpBq1FZbegPrk37BcYygSrcUN8yzmYfKxE 6Zn5krotmeemt02oNjpS09FXQzSJ/AaQGMigsNRiSIKwElOWrnlfhiCh4Spw1bskMiEe EJmLKrkXk4EXISbu6avfVBowRhv7a9FFpcW0Gmy8ICfOncRxrqmybcc56uyjnUMh9r1M z7RImAYTxvbh3xK5KtXDzSSlrpXFbCUfoyeD8xd12w6OFGO47uAjsS9CjR1YQj2uFmll ncarxHU9gZeKeAGz5xE6p6SPd70HwJ1cwAdTIajngGvCJvUaC5wO/XbqiCtD+NXeYMg9 Fj3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=jFjgjSUEKRW8v/PBr8uM0Wg98cLQUz1sDSFbELuCUcE=; b=Mxq4paJL1h5XWjQKAbIZWpvug0RST6lwziXdei75SGEmoa0OU1sj+AODmUvHhsSbrk +AdD0HzD2R9eRYHKv6pgfBJFW5DLrENqqP3EyawbG2auUa3oqtUZ0pEehXpScEwzGmyK uTrJBIMoObsro5NANHcLk6/qaTJ/hBOqUBroF7mjEAsm62BUHW6ke8QqarhNN++hZ60k pCuIv3O/AllC4wsbPxNUeKgwoMRBDsbZ6a04radwXf8xgX2253jQo4KV/YIDRd71piKH nsQL1RsmCF/hWO2K7HmbaL2Uws2DRGlUWTipg4LCSLIKL9AHzTM6I2Z2S1N7HbJ77rCA diOw== X-Gm-Message-State: APjAAAXoh83mBB0F4R7nfVb7jSB2OkMFz0IyWx9otdVFcO8lBFanqR+y ukHBS4FNBC4ovKNnYsZGby4IUw== X-Received: by 2002:a5d:680a:: with SMTP id w10mr23479652wru.42.1560145551475; Sun, 09 Jun 2019 22:45:51 -0700 (PDT) Received: from dell ([2.31.167.229]) by smtp.gmail.com with ESMTPSA id e13sm21851849wra.16.2019.06.09.22.45.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Jun 2019 22:45:50 -0700 (PDT) Date: Mon, 10 Jun 2019 06:45:48 +0100 From: Lee Jones To: "Life is hard, and then you die" Cc: Jiri Kosina , Benjamin Tissoires , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-input@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] mfd: apple-ibridge: Add Apple iBridge MFD driver. Message-ID: <20190610054548.GD4797@dell> References: <20190422031251.11968-1-ronald@innovation.ch> <20190422031251.11968-2-ronald@innovation.ch> <20190507122415.GC29524@dell> <20190609234951.GB16597@innovation.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190609234951.GB16597@innovation.ch> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 09 Jun 2019, Life is hard, and then you die wrote: > > On Tue, May 07, 2019 at 01:24:15PM +0100, Lee Jones wrote: > > On Sun, 21 Apr 2019, Ronald Tschalär wrote: > > > > > The iBridge device provides access to several devices, including: > > > - the Touch Bar > > > - the iSight webcam > > > - the light sensor > > > - the fingerprint sensor > > > > > > This driver provides the core support for managing the iBridge device > > > and the access to the underlying devices. In particular, since the > > > functionality for the touch bar and light sensor is exposed via USB HID > > > interfaces, and the same HID device is used for multiple functions, this > > > driver provides a multiplexing layer that allows multiple HID drivers to > > > be registered for a given HID device. This allows the touch bar and ALS > > > driver to be separated out into their own modules. > > > > > > Signed-off-by: Ronald Tschalär > > > --- > > > drivers/mfd/Kconfig | 15 + > > > drivers/mfd/Makefile | 1 + > > > drivers/mfd/apple-ibridge.c | 883 ++++++++++++++++++++++++++++++ > > > > I haven't taken a thorough look through, but I can tell you that the > > vast majority of what you're trying to do here does not belong in > > MFD. MFD drivers are used to register child devices. Almost all > > functionality or 'real work' should be contained in the drivers the > > MFD registers, not in the MFD parent itself. You will need to move > > all 'real work' out into the subordinate device drivers for > > acceptance. > > Thanks for your feedback. That was/is the idea: the actual Touch Bar > and ALS driver code is in separate modules - what is left in the > appple-ibridge mfd driver is a fairly generic hid driver > demultiplexer. However, that could be moved out into it's own > helper/module. > > Having said that, it looks like the preference is to do all of this as > a hid driver with virtual hid devices instead of as an mfd driver. Sounds like a better approach. -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog