public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Frank Zago <frank@zago.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	Jan-Niklas Burfeind <kernel@aiyionpri.me>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Wolfram Sang <wsa@kernel.org>, Johan Hovold <johan@kernel.org>,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH 2/2] USB: misc: Add driver for the WCH CH341 in I2C/GPIO mode
Date: Mon, 19 Apr 2021 19:32:40 -0700	[thread overview]
Message-ID: <aa294927-b5d8-aee9-bfef-7aebfa63ef6e@infradead.org> (raw)
In-Reply-To: <20210420022520.47965-2-frank@zago.net>

Hi--

On 4/19/21 7:25 PM, Frank Zago wrote:
> From: frank zago <frank@zago.net>
> 

> 
> Signed-off-by: Frank Zago <frank@zago.net>
> Signed-off-by: frank zago <frank@zago.net>

Don't think you need both of those.

> ---
>  MAINTAINERS                         |   6 +
>  drivers/usb/misc/Kconfig            |  18 ++
>  drivers/usb/misc/Makefile           |   1 +
>  drivers/usb/misc/ch341/Kconfig      |   0
>  drivers/usb/misc/ch341/Makefile     |   3 +
>  drivers/usb/misc/ch341/ch341-core.c |  87 +++++++++
>  drivers/usb/misc/ch341/ch341-gpio.c | 249 ++++++++++++++++++++++++++
>  drivers/usb/misc/ch341/ch341-i2c.c  | 267 ++++++++++++++++++++++++++++
>  drivers/usb/misc/ch341/ch341.h      |  50 ++++++
>  9 files changed, 681 insertions(+)
>  create mode 100644 drivers/usb/misc/ch341/Kconfig
>  create mode 100644 drivers/usb/misc/ch341/Makefile
>  create mode 100644 drivers/usb/misc/ch341/ch341-core.c
>  create mode 100644 drivers/usb/misc/ch341/ch341-gpio.c
>  create mode 100644 drivers/usb/misc/ch341/ch341-i2c.c
>  create mode 100644 drivers/usb/misc/ch341/ch341.h
> 

> diff --git a/drivers/usb/misc/Kconfig b/drivers/usb/misc/Kconfig
> index 8f1144359012..2d4db92f0de4 100644
> --- a/drivers/usb/misc/Kconfig
> +++ b/drivers/usb/misc/Kconfig
> @@ -284,3 +284,21 @@ config BRCM_USB_PINMAP
>  	  This option enables support for remapping some USB external
>  	  signals, which are typically on dedicated pins on the chip,
>  	  to any gpio.
> +
> +config USB_CH341_CORE
> +	tristate "USB WinChipHead CH341 in I2C/SPI/GPIO mode"
> +	depends on USB && GPIOLIB && I2C && SPI
> +	help
> +
> +	  If you say yes to this option, support for the CH341 chips,
> +	  running in I2C/SPI/GPIO mode will be included. Some versions
> +	  of the chip do not support all the functionnalities but
> +	  there is no way to differentiate them. For instance the
> +	  CH341A and CH341B support everything while the CH341T can
> +	  only do I2C.
> +
> +	  The serial mode is not supported by this driver. Use the
> +	  CH341 USB serial driver.
> +
> +	  This driver can also be built as a module.  If so, the
> +	  module will be called ch341-buses.

Above should be in drivers/usb/misc/ch341/Kconfig file instead?

> diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile
> index 5f4e598573ab..95c0ca15b8c9 100644
> --- a/drivers/usb/misc/Makefile
> +++ b/drivers/usb/misc/Makefile
> @@ -32,3 +32,4 @@ obj-$(CONFIG_USB_CHAOSKEY)		+= chaoskey.o
>  obj-$(CONFIG_USB_SISUSBVGA)		+= sisusbvga/
>  obj-$(CONFIG_USB_LINK_LAYER_TEST)	+= lvstest.o
>  obj-$(CONFIG_BRCM_USB_PINMAP)		+= brcmstb-usb-pinmap.o
> +obj-$(CONFIG_USB_CH341_CORE)		+= ch341/
> diff --git a/drivers/usb/misc/ch341/Kconfig b/drivers/usb/misc/ch341/Kconfig
> new file mode 100644
> index 000000000000..e69de29bb2d1

Is that file (above) empty on purpose?

> diff --git a/drivers/usb/misc/ch341/Makefile b/drivers/usb/misc/ch341/Makefile
> new file mode 100644
> index 000000000000..7c6429e7a46e
> --- /dev/null
> +++ b/drivers/usb/misc/ch341/Makefile
> @@ -0,0 +1,3 @@
> +obj-$(CONFIG_USB_CH341_CORE) := ch341-buses.o
> +
> +ch341-buses-objs := ch341-core.o ch341-i2c.o ch341-gpio.o


-- 
~Randy


  reply	other threads:[~2021-04-20  2:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20  2:25 [PATCH 1/2] Revert "USB: serial: ch341: add new Product ID for CH341A" Frank Zago
2021-04-20  2:25 ` [PATCH 2/2] USB: misc: Add driver for the WCH CH341 in I2C/GPIO mode Frank Zago
2021-04-20  2:32   ` Randy Dunlap [this message]
2021-04-20  7:46 ` [PATCH 1/2] Revert "USB: serial: ch341: add new Product ID for CH341A" Greg Kroah-Hartman
2021-04-20 15:27   ` Frank Zago

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aa294927-b5d8-aee9-bfef-7aebfa63ef6e@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=frank@zago.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=kernel@aiyionpri.me \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox