From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4265FC433EF for ; Thu, 16 Jun 2022 05:09:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229742AbiFPFJq (ORCPT ); Thu, 16 Jun 2022 01:09:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbiFPFJp (ORCPT ); Thu, 16 Jun 2022 01:09:45 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8385E56B35; Wed, 15 Jun 2022 22:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:Content-Type :In-Reply-To:From:References:To:Subject:MIME-Version:Date:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description; bh=8mZ1bXeHffFC/kHmIXWI5Muej2f+NxPZdpt2fFJLCPg=; b=pwLr72dcqADpqWELJCQtWR6StY fuboEy9QOQJ/IPzSuw2Mjmq9P95HaWH/L+Gl7M+ZJ43parY5YaQQMmS2FWsxQfso5RDLoLVsujWFt HZIkOnTrJ76lQxPhS1gs/J95YzxEXr8Vbdv+w8YyfVM+ffGs7qWvpI04jcuME70RoQBgMGKnun4J8 IIZ41IPOjTu7Yb8uWhimoxa9ICjR3sU3X7TcSFf2YzcMpEM4gurASEm5mDBBU2m8g61Hse2WfLC52 C3xW4LM3pX8Q8LQlWftdVdqykqCTZ8D5mui0YOoIL64wYNycVGcJIHkLx8Y5Lzft2nc0v4ben4wkv qFH6n6Fw==; Received: from [2601:1c0:6280:3f0::aa0b] by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o1hlC-008KMC-CQ; Thu, 16 Jun 2022 05:09:39 +0000 Message-ID: Date: Wed, 15 Jun 2022 22:09:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v6 3/4] i2c: ch341: add I2C MFD cell driver for the CH341 Content-Language: en-US To: frank zago , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Bartosz Golaszewski , Wolfram Sang , Johan Hovold , linux-usb@vger.kernel.org, Lee Jones , Linus Walleij , linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org References: <20220616013747.126051-1-frank@zago.net> <20220616013747.126051-4-frank@zago.net> From: Randy Dunlap In-Reply-To: <20220616013747.126051-4-frank@zago.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Hi-- On 6/15/22 18:37, frank zago wrote: > The I2C interface can run at 4 different speeds. This driver currently > only offer 100kHz. Tested with a variety of I2C sensors, and the IIO > subsystem. > > Signed-off-by: frank zago > --- > MAINTAINERS | 1 + > drivers/i2c/busses/Kconfig | 10 + > drivers/i2c/busses/Makefile | 1 + > drivers/i2c/busses/i2c-ch341.c | 377 +++++++++++++++++++++++++++++++++ > 4 files changed, 389 insertions(+) > create mode 100644 drivers/i2c/busses/i2c-ch341.c > > diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig > index a1bae59208e3..db9797345ad5 100644 > --- a/drivers/i2c/busses/Kconfig > +++ b/drivers/i2c/busses/Kconfig > @@ -1199,6 +1199,16 @@ config I2C_RCAR > > comment "External I2C/SMBus adapter drivers" > > +config I2C_CH341 > + tristate "CH341 USB to I2C support" > + select MFD_CH341 > + help > + If you say yes to this option, I2C support will be included for the > + WCH CH341, a USB to I2C/SPI/GPIO interface. > + > + This driver can also be built as a module. If so, the module > + will be called i2c-ch341. I haven't tested it, but just from reading, it looks like this one needs a "depends on USB" since it selects MFD_CH341, which depends on USB, and since 'select' ignores dependency chains. The GPIO driver (patch 2/4) already depends on USB. -- ~Randy