Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2644165ybi; Sun, 9 Jun 2019 17:12:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqW4yMh63rcpMwhbHN4g9l8iMBujL1xskW/DGd4QqvZIK73xqLDO/jef/TIwP5WR3PTgcp X-Received: by 2002:a17:902:e58b:: with SMTP id cl11mr47346021plb.24.1560125574062; Sun, 09 Jun 2019 17:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560125574; cv=none; d=google.com; s=arc-20160816; b=BYWJn9520PaKSxhxjmRHtxERoF+6GEt0vaiOGCmODOVotqWRHFnsj7rm6OkN8pTLRp IPqpppIGswPZmUNnh/Cp3TRIY/WpUNYAooBF9WelKn7eF2dZ6/ACrYbL58h7cROVwrCD 96BcWPe1xNC7zRxw9ZzvJ4SawsReqyPkQaWnC5rlrZaxaSl6WifJtGjK43VV9svdzNRO 7lbJpnaihBJC/fFIBAjLvi4fvtVG0k7wfIxCAZEHoxwUKTe25WWu7JdPSEFbyiagnZob 8YEW9ajEWrMkMGXIh2bZWRpg9x4mxgZGqqRrSkf9Md2oU1FLrb0BK+Q2UMR0Lx9aSPsw hMmA== 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:dkim-signature:dkim-filter :date; bh=BSS23tILDkVwboike2uZGQWESGv2m47oeGg1PaeJI3Q=; b=wxmEyjq89nUOzMoOi07WNDbaDuZF1AXM9QrugrkKszs/3oLdJqfvuICMJaXz+Ys1+v jx+4BwQhLFCfC9grQ1kxcW/reO7DDyEno7Druv+o11E228UlfWsuSHK+gVMLgAITFQfR nHVQAwT9Ib9pZ+ThWV95uoI2ZZQS8TNNZiCR+KLTVhVVaQMpCo1WjYY/5/KVwBGqkQ6U gSNNkaxiWgzk6FjYX5xJw+clr2dJYNyeuvQQeUA5/b1hmacs5Qh9SkZOXFdZ09LTaTgy oNopFo0ggv24XGC2pm0ZHcG60EmTQMj4cmefP3zBd1QSDJtx3V6xvHD7aQLiQAT/gc7f e/9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@innovation.ch header.s=default header.b=UoEcJ4Sm; 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=innovation.ch Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7si8020484pgu.3.2019.06.09.17.12.05; Sun, 09 Jun 2019 17:12: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=@innovation.ch header.s=default header.b=UoEcJ4Sm; 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=innovation.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729908AbfFJAAL (ORCPT + 99 others); Sun, 9 Jun 2019 20:00:11 -0400 Received: from chill.innovation.ch ([216.218.245.220]:49098 "EHLO chill.innovation.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729384AbfFJAAL (ORCPT ); Sun, 9 Jun 2019 20:00:11 -0400 X-Greylist: delayed 618 seconds by postgrey-1.27 at vger.kernel.org; Sun, 09 Jun 2019 20:00:10 EDT Date: Sun, 9 Jun 2019 16:49:51 -0700 DKIM-Filter: OpenDKIM Filter v2.10.3 chill.innovation.ch A26B764015B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=innovation.ch; s=default; t=1560124191; bh=BSS23tILDkVwboike2uZGQWESGv2m47oeGg1PaeJI3Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UoEcJ4SmOat+geX/ToaeClL5OWUMOcZtQbilOeVHd/T3KEV2prnxw3sHL/4XYktm9 GKpjhqoYfqq4lGYXAXp2lsrxSXPTVkMkCqae1cxD5mWaIfoFeod6lZpnLVjUh1T0Ky XO5CXtVyqXMNnQD6OZHOlh6kdpZge+mLheyEO9dCZnMEQKLDICjjBNX4Z6Gf0L+xn1 syya05TH+Kdg2z8bwYmT0gswyZ4bJFCdxr5tHulQmJaueFl7mpGd0K3QVGhM6EsUc4 DR75KXkogj1ASnws0GA66ImIuBuU7pluht3O2drCeKg816zdLIBrhS66bd1nwOBkyd JPezy840ZTCLw== From: "Life is hard, and then you die" To: Lee Jones 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: <20190609234951.GB16597@innovation.ch> References: <20190422031251.11968-1-ronald@innovation.ch> <20190422031251.11968-2-ronald@innovation.ch> <20190507122415.GC29524@dell> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190507122415.GC29524@dell> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Cheers, Ronald