Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp410770pxp; Wed, 16 Mar 2022 08:15:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDs47Jazt0Rb0CkNnsmWR4l1JfS7+r0k7ijd5PnE97qQ39iPURD3cpdoCHf9AO5aTj8Uhd X-Received: by 2002:a50:d711:0:b0:410:a51a:77c5 with SMTP id t17-20020a50d711000000b00410a51a77c5mr8905edi.154.1647443724853; Wed, 16 Mar 2022 08:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647443724; cv=none; d=google.com; s=arc-20160816; b=BmMRr8Nao+zaGXr6V8KnG1uIO30epvSlgFbzVaI+KFjyNoHxus0+S4qNP1FoVJmW3U EMiL2vg6LDO6e7Ezw2CxAJ6lfgA2onJjAu4iZAkem4lFH5BazqI2/bRkB2uT3M9bzC6U UHtMrcTLPzVwcBC9d6HeVozE0XDcnHDiJvnqKzBDNisB9hH6evFJumsljUMntKrNLO9w 56vmayU4CLVVvQbM8kquvk0x1fy7LmLWBAUeKweqKUOXjAEn+cimkg3ZDrLoOIBfCVkm K7WZL11nCt7lOCJD4d9R2RbEofXM51q9s5m2nEP8VPg2MNW1mNQeyHtVy/ZpbNTNr5Tx oIaw== 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=kgNwF822XLCpGGuXU87MYUal/QeHjmk53OqzbsvP3bY=; b=gyhdjIEypp4aIa2Rz/ZS5+kOkIHuVHLz7Ui2Oe2lyubGVMx0qXnyYwTB1fwgDFBqoz hwEY8XAuQdRtk8RhjO49YviFU8M98Z1Ou6YPCjkuYkXnkyHpRD/qd32qAPxVASVimM5C ECrO8Ht/XdD1/1W55x964ILzHd+H/2RI34RvrM9sqBVMfyNjFLiMYPCdQOKizBGLvZWL 9o0yVjHNlmqTeDQmgKyonmhh2DScCn6hAeAc5E+e67lffQx9tvgsVQIJseqX6Iyj+YwD pFf1sIFdXI2vPXYeWIYk0T5sv+kcNrULNTJ1uc1aEnrv0oYFA3PzqkCUK5vwGbfhOT2+ Pgaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xD/WCj/A"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qa42-20020a17090786aa00b006da86dcfd6fsi1476123ejc.14.2022.03.16.08.14.56; Wed, 16 Mar 2022 08:15:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="xD/WCj/A"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1354218AbiCPHa4 (ORCPT + 99 others); Wed, 16 Mar 2022 03:30:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237548AbiCPHax (ORCPT ); Wed, 16 Mar 2022 03:30:53 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF2ABBC32 for ; Wed, 16 Mar 2022 00:29:38 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id bi13-20020a05600c3d8d00b0038c2c33d8f3so60417wmb.4 for ; Wed, 16 Mar 2022 00:29:38 -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=kgNwF822XLCpGGuXU87MYUal/QeHjmk53OqzbsvP3bY=; b=xD/WCj/AZbGlstB61QBDFLGXR/Q1SP1OwvMRpNEHYlufjUEV/fKRX43+FBYIWRB0mf WVCcyBCJ4q+y+xkzlWFsmRK3x3aWWobiSZZ2vdJs3IOQMVrU94MJdN6vz5Ovn7wfa5o4 ET7lGASgldMyWo+jbMPLLaIgBLsK2xFBgLY7aggnDiAy7bMK/0vvkVURJG5iWdm0WWcL UZtGMCGvt/mbF8H/jU+std2FfmIxQvj6Ht9Yqa18vsT7KyTG3L35XnIpwyaK01wpyVPk d+b6Kc8t3fZetoIQTo0BoVhBFpafF//kYTtojPOh71qD3DF1npK5grUvsKtw06O+T5YW IRSw== 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=kgNwF822XLCpGGuXU87MYUal/QeHjmk53OqzbsvP3bY=; b=VWp2iI55M3m7VizfI9gU4XW4EJObqwe9TENBfrZe55PU1/loEuXpOIfd8JvqwfsY3q +zpPQoThC6/JXTpDsmn1AeTJHHdAyOWASkWvIitwwWA/FJw8ZfQEnFEewPipB+D2mNUM tkfLj4e0e2m3M6SqQc/w0+TZDOSY/czD7mypSxROrftk0hQpWaf6j8rXHhrMawAYG8iB 9FXdMHujuGsW3o3hIfd1g79+UGUjlSHCrIQILa0XxbB3reX7oXhduvZ59bYlnqDWxvU2 y8zO+8Af3Beeuq15FiU1sFbtTPhl+26nuIm7KesKHulgTmJe95Gr1U3AAdzuKNaUgNIC s8SQ== X-Gm-Message-State: AOAM531ZNNXJG0L2DC3x4u0Eu2YCxiuOy360AzpxnYq9ZdJx1wirYEyr MZaRD/++oavXo8lcRi7tgpb61v/h6d4fpw== X-Received: by 2002:a05:600c:3d07:b0:38b:94f2:5d17 with SMTP id bh7-20020a05600c3d0700b0038b94f25d17mr5139780wmb.67.1647415776688; Wed, 16 Mar 2022 00:29:36 -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 p18-20020adfba92000000b001e4ae791663sm932414wrg.62.2022.03.16.00.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 00:29:36 -0700 (PDT) Date: Wed, 16 Mar 2022 07:29:34 +0000 From: Lee Jones To: Frank Zago Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, 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: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Tue, 15 Mar 2022, Frank Zago wrote: > Hello Lee, > > >> 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). :) > > > > AFAICS that works if the driver is built-in, but not as a module. How did you reach that conclusion? I expect most of the drivers in MFD and their children to be modules. `git grep module_.*_driver -- drivers/mfd/` > I'd prefer that driver to be a module if desired, and have all its files in the same > place instead of scattered in various directories. The design and organisation of the kernel does not work like that. > I can try drivers/misc if it's a better place. I suspect you'll receive the same advice from Greg and Arnd. -- Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog