Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp989472pxp; Wed, 16 Mar 2022 23:39:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXPKy9RQRBN8h20rvkPBw7bQc2Z361l9wgi4SfKqph5AvpP1O1r56yyAL80bHxk/KPT78U X-Received: by 2002:a63:2a95:0:b0:37c:46b0:2088 with SMTP id q143-20020a632a95000000b0037c46b02088mr2604901pgq.150.1647499145675; Wed, 16 Mar 2022 23:39:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647499145; cv=none; d=google.com; s=arc-20160816; b=IBOy4b494UTpk9Cfpi66wPaEM+OU87sVVkT8iPTGR52onHgLCDd8fKQN+bf7j5nge4 BtGjDBKl8oueziRRY+UuPFC2lUN2ZFx9RZV2Yr4PNWbVQCw/DXzNV4zHTS+i8QOeHoio joK/4HX56DZv+NchmVI/s7N2WnxBrRySnLIBhV8qUME9Pc01BGTuP5wJ8MwLWoU2iLp9 tQCLmWvOyEDt00EitITlniiyafAFiH8UksAp5w8IBw85XXVlDLchnat0VikapLu395pw o5Ajq9LHwzxDPEdNl8bxxYh9vAgEX4s/6GTJcTI2Fk+H6h/JjCzBC6XpHV8QlppjbCeS VvUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=POhFPKDu05rnolEnCMUfGWyfG7SKY0U5Ki6iIBt2QSc=; b=W8xipTnRmSTslalQo9+b0iWAFu+jFpR3zi7Qnli7BxYAehWl3sAp179rzdjyeenJBi hbZjP0WMynfUa+EYACLAjAFFdd+l0uQrLN0t6UF4+Roawsdi6AOOxZ30lUMiR5k3GA4G HWOVj8AjsGQdLTdd44Mc5g4Htpz/mxkgw4BQIQC53m9gvOdFolQ/+HtcZ0R7MnH1z15Z dQbj4pDhAs+3G41z9fRvctg7Q8zZuX7hj+Ln5WRaVR5hR/w2wgAMVy31j9w7+sKJQYhq OHHS9ALwubjAM9wDUWKum+i3nh12O+kjivrZC8annas8zq8soMYjiaxHlbCbxBOiJ8Hx 0B0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IBHTPOQc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id f21-20020a637555000000b003816043f050si1309405pgn.581.2022.03.16.23.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:39:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IBHTPOQc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 560B52BEC67; Wed, 16 Mar 2022 22:25:12 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349518AbiCOPAN (ORCPT + 99 others); Tue, 15 Mar 2022 11:00:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231588AbiCOPAI (ORCPT ); Tue, 15 Mar 2022 11:00:08 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BCE122BE0 for ; Tue, 15 Mar 2022 07:58:55 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id q7-20020a7bce87000000b00382255f4ca9so1586536wmj.2 for ; Tue, 15 Mar 2022 07:58:55 -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; bh=POhFPKDu05rnolEnCMUfGWyfG7SKY0U5Ki6iIBt2QSc=; b=IBHTPOQcn29kklQGIliTcHYKIlLy1dPyQq5MpQtQ8Rur3tD04R7Y+eUXGEt1fzLVQx YIZL2dYJxijss5RL7iOr9hlNcGqQT33rAntIGNNjyH/O5yI5OdL9zZYFi+FpumuGVt17 tmg9yV0NlLZEpcDrhh60IiQQcnlIkltBGP9tfOgyQRPExk+dLmcFoSnEiU775LZOU7+S Hg/lKJ7Ge0hO9wW31M6fXsQRogJIf38lBdD2kS47wH0P1vj9PhRYJ+ZItuDjO3P7hfqq zpzziIwKe+EYrLat07rpOVazT0RRsZ4ybUb81s3QBbqI9Qln6+f9XEPRutI7nD6brxY8 I9YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=POhFPKDu05rnolEnCMUfGWyfG7SKY0U5Ki6iIBt2QSc=; b=FomRksPSeNB27zw1Lozq+KJuf4sX+gPgSzZULC/vsyGonBtXWB2yzZdWKsz2BEv1/B 1frk+cRGVjfgu0Lzbe3dpgzd9+FYa5IuA4xNpOkZB8F1kYt0aVVPcdlE7iAcFESCmcLj kuyEcLhkOmMjQuQdd56H2ylUVmDl5P1IV+rnZE0n0tcCvOHh1Kv1VMG/nxxTmd6e3jNf aWWaH/TIIXdw/lFIy9in6OumCtYOqp0P5zheOZc89iVh9grismtmBq2xNrqibjcFzrLD Bd3CBTNcV0c2w65Ft3JzOvSHoJW4MzY2/nicofSSx0BrEhMW7IdYWmSySu0xORz1OmzM EUvw== X-Gm-Message-State: AOAM5323dw0qJV8FI63jTQYQwLiCOWKjaE9vSXK2dzQFG5vdbsM4f3QR Wjm9BWZ2fM82PVDeZKZCF0trvQ== X-Received: by 2002:a05:600c:4608:b0:38c:6ba3:1c9f with SMTP id m8-20020a05600c460800b0038c6ba31c9fmr93477wmo.39.1647356333964; Tue, 15 Mar 2022 07:58:53 -0700 (PDT) Received: from google.com (cpc155339-bagu17-2-0-cust87.1-3.cable.virginm.net. [86.27.177.88]) by smtp.gmail.com with ESMTPSA id y12-20020adff14c000000b001f04d1959easm15759411wro.13.2022.03.15.07.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Mar 2022 07:58:53 -0700 (PDT) Date: Tue, 15 Mar 2022 14:58:51 +0000 From: Lee Jones To: frank zago Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Jan-Niklas Burfeind , Bartosz Golaszewski , Wolfram Sang , Johan Hovold , linux-usb@vger.kernel.org, gunar@schorcht.net Subject: Re: [PATCH v3] mfd: ch341: add driver for the WCH CH341 in I2C/GPIO mode Message-ID: References: <20220314030937.22762-1-frank@zago.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220314030937.22762-1-frank@zago.net> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 13 Mar 2022, frank zago wrote: > The CH341 is a multifunction chip, presenting 3 different USB PID. One > of these functions is for I2C/SPI/GPIO. This new driver manages I2C > and GPIO. > > The I2C interface can run at 4 different speeds. This driver currently > only offer 100MHz. Tested with a variety of I2C sensors, and the IIO > subsystem. > > The GPIO interface offers 16 GPIOs. 6 are read/write, and 10 are > read-only. > > Signed-off-by: frank zago > --- > > Changes from v2: > - bug fixes > - more robust USB enumeration > - Changed to an MFD driver as suggested Perhaps you should have engaged with me before potentially wasting your valuable time. MFD is designed to take a parent platform driver and split it out into various sub-systems. If you don't use the MFD Core API (which is the case here) it is not an MFD. MFD is not a dumping ground for collections of random device drivers. I have no problem with you placing registration and core code inside MFD (that *is* what it was designed for), but the leaf 'functionality' should be placed in more appropriate locations. I2C => drivers/i2c SPI => drivers/spi GPIO => drivers/gpio (or perhaps drivers/pinctrl) USB => drivers/usb UART => drivers/tty/serial Etc ... Find places for everything. Anything left over, give to Greg (drivers/misc). :) -- Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog