All of lore.kernel.org
 help / color / mirror / Atom feed
* Fw: Linux kernel patch for Omron CS1W-CIF31
       [not found]   ` <OS3P286MB1495F452606C51D673D2519DF69C9@OS3P286MB1495.JPNP286.PROD.OUTLOOK.COM>
@ 2022-08-03  8:51     ` niek.nooijens
  2022-08-05 10:32       ` Johan Hovold
  0 siblings, 1 reply; 3+ messages in thread
From: niek.nooijens @ 2022-08-03  8:51 UTC (permalink / raw)
  To: linux-usb




From: Niek Nooijens / IAB <niek.nooijens@omron.com>
Sent: Wednesday, August 3, 2022 10:49 AM
To: Johan Hovold <johan@kernel.org>
Cc: linux-usb@vger.kernel.org <linux-usb@vger.kernel.org>
Subject: Re: Linux kernel patch for Omron CS1W-CIF31 
 
Hi Johan

Thanks for the feedback. I updated the patch and pasted the result below and in https://github.com/torvalds/linux/commit/03c572442d10dc88f7c50b9ea957894ebf702c84
scripts/checkpatch.pl states "0001-USB-serial-ftdi_sio-add-Omron-CS1W-CIF31-device-id.patch has no obvious style problems and is ready for submission." 
git-send-email doesn't seem to work unfortunately. So I'll send it in plain text this way. (I had outlook web clear all formatting).
If I can do anything more for you please let me know.

Niek Nooijens
Software Engineer
Omron Manufacturing of the Netherlands.

================begin patch================
From 03c572442d10dc88f7c50b9ea957894ebf702c84 Mon Sep 17 00:00:00 2001 
From: Niek Nooijens <niek.nooijens@omron.com>
Date: Mon, 1 Aug 2022 10:39:25 +0200
Subject: [PATCH] USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id

works perfectly with:
modprobe ftdi_sio
echo "0590 00b2" | tee
/sys/module/ftdi_sio/drivers/usb-serial\:ftdi_sio/new_id > /dev/null

but doing this every reboot is a pain in the ass.

Signed-off-by: Niek Nooijens <niek.nooijens@omron.com>
---
 drivers/usb/serial/ftdi_sio.c     | 2 ++
 drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index d5a3986dfee7..52d59be92034 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1045,6 +1045,8 @@ static const struct usb_device_id id_table_combined[] = {
      /* IDS GmbH devices */
      { USB_DEVICE(IDS_VID, IDS_SI31A_PID) },
      { USB_DEVICE(IDS_VID, IDS_CM31A_PID) },
+     /* Omron devices */
+     { USB_DEVICE(OMRON_VID, OMRON_CS1W_CIF31_PID) },
      /* U-Blox devices */
      { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) },
      { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 4e92c165c86b..b99714c2f8cd 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -1587,6 +1587,12 @@
 #define IDS_SI31A_PID              0x13A2
 #define IDS_CM31A_PID              0x13A3
 
+/*
+ * Omron corporation (https://www.omron.com/).
+ */
+ #define OMRON_VID                 0x0590
+ #define OMRON_CS1W_CIF31_PID            0x00b2
+
 /*
  * U-Blox products (http://www.u-blox.com).
  */
-- 
2.34.1
=========end patch==========



From: Johan Hovold <johan@kernel.org>
Sent: Wednesday, August 3, 2022 10:02 AM
To: Niek Nooijens / IAB <niek.nooijens@omron.com>
Subject: Re: Linux kernel patch for Omron CS1W-CIF31 
 
On Mon, Aug 01, 2022 at 09:01:13AM +0000, niek.nooijens@omron.com wrote:
> Hi there
> 
> From the get_maintainer.pl script I saw you were the maintainer for the usb-serial subsystem.
> This is my first patch submission so bear with me.
> I have an FTDI based USB-serial adapter we produce, the omron CS1W-CIF31 with VID 0x0590 and PID 0x00b2
> it's not picked up by the driver, but using:
> modprobe ftdi_sio
> echo "0590 00b2" | tee /sys/module/ftdi_sio/drivers/usb-serial\:ftdi_sio/new_id > /dev/null
> makes it work. Since it's annoying to execute every boot I thought, I might as well send a patch in.
> It's a single commit in my git fork, if that's easier: https://github.com/nieknooijens/linux/commit/9151b10a95f2dd0439f0f9759793b0d7d42de274
> 
> Hope this can be included in future versions!

Thanks for the patch. Looks mostly good, but you need to resend this
with the linux-usb@vger.kernel.org mailing list on CC.

Also note that the lists rejects HTML, so you probably want to look into
using git-send-email for sending. Try sending it to yourself first and
make sure it gets through alright (e.g. run git am and checkpatch.pl on
the result).

> patch below:
> 
> From 9151b10a95f2dd0439f0f9759793b0d7d42de274 Mon Sep 17 00:00:00 2001
> From: noonie <niek.nooijens@omron.com>

We need you full name here.

> Date: Mon, 1 Aug 2022 10:39:25 +0200
> Subject: [PATCH] Include omron VID and CS1W-CIF31 FTDI-based serial converter
>  PID in serial driver

Subject should be shorter and use a "USB: serial: ftdi_sio: " prefix.

        "USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id"

should do.

> works perfectly with:
> modprobe ftdi_sio
> echo "0590 00b2" | tee
> /sys/module/ftdi_sio/drivers/usb-serial\:ftdi_sio/new_id > /dev/null
> 
> but doing this every reboot is a pain in the ass.

You need to sign-off on your patch here (to declare that you are allowed
to contribute the change). See

        Documentation/process/submitting-patches.rst

for details.

> ---
>  drivers/usb/serial/ftdi_sio.c     | 2 ++
>  drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
> index d5a3986dfee7..da589c666b17 100644
> --- a/drivers/usb/serial/ftdi_sio.c
> +++ b/drivers/usb/serial/ftdi_sio.c
> @@ -1048,6 +1048,8 @@ static const struct usb_device_id id_table_combined[] = {
>       /* U-Blox devices */
>       { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) },
>       { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
> +     /* Omron devices */
> +     { USB_DEVICE(OMRON_VID, OMRON_CS1W_CIF31_PID) },
>       /* FreeCalypso USB adapters */
>       { USB_DEVICE(FTDI_VID, FTDI_FALCONIA_JTAG_BUF_PID),
>             .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
> diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
> index 4e92c165c86b..f527e43ee7b6 100644
> --- a/drivers/usb/serial/ftdi_sio_ids.h
> +++ b/drivers/usb/serial/ftdi_sio_ids.h
> @@ -1593,3 +1593,9 @@
>  #define UBLOX_VID                  0x1546
>  #define UBLOX_C099F9P_ZED_PID            0x0502
>  #define UBLOX_C099F9P_ODIN_PID           0x0503
> +
> +/*
> + * Omron corporation (https://www.omron.com/).
> + */
> + #define OMRON_VID                 0x0590
> + #define OMRON_CS1W_CIF31_PID            0x00b2

Try to keep these sections sorted by VID if possible (e.g. this one
should be placed above the u-blox section at least).

Johan

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Fw: Linux kernel patch for Omron CS1W-CIF31
  2022-08-03  8:51     ` Fw: Linux kernel patch for Omron CS1W-CIF31 niek.nooijens
@ 2022-08-05 10:32       ` Johan Hovold
       [not found]         ` <OS3P286MB1495E9C194761F73D84E34DAF6639@OS3P286MB1495.JPNP286.PROD.OUTLOOK.COM>
  0 siblings, 1 reply; 3+ messages in thread
From: Johan Hovold @ 2022-08-05 10:32 UTC (permalink / raw)
  To: niek.nooijens; +Cc: linux-usb

On Wed, Aug 03, 2022 at 08:51:18AM +0000, niek.nooijens@omron.com wrote:

> From: Niek Nooijens / IAB <niek.nooijens@omron.com>
> Sent: Wednesday, August 3, 2022 10:49 AM
> To: Johan Hovold <johan@kernel.org>
> Cc: linux-usb@vger.kernel.org <linux-usb@vger.kernel.org>
> Subject: Re: Linux kernel patch for Omron CS1W-CIF31 
>  
> Hi Johan
> 
> Thanks for the feedback. I updated the patch and pasted the result
> below and in
> https://github.com/torvalds/linux/commit/03c572442d10dc88f7c50b9ea957894ebf702c84
> scripts/checkpatch.pl states
> "0001-USB-serial-ftdi_sio-add-Omron-CS1W-CIF31-device-id.patch has no
> obvious style problems and is ready for submission." 

Thanks for the update. Your v2 looks good, but there's still some
problem with the formatting as your mailer is corrupting the patch (e.g.
replacing tabs with spaces).

That's why I suggested you send the patch to yourself and run
checkpatch.pl on it after it's been sent by mail.

> git-send-email doesn't seem to work unfortunately. So I'll send it in
> plain text this way. (I had outlook web clear all formatting).

If you're not able to get git-send-email to work, you can send the patch
to me as an attachment and I'll get it merged. That won't happen for a
few weeks (e.g. after the merge window has closed) so you got plenty of
time if you want get your patch-submission infrastructure set up.

Johan

> ================begin patch================
> From 03c572442d10dc88f7c50b9ea957894ebf702c84 Mon Sep 17 00:00:00 2001 
> From: Niek Nooijens <niek.nooijens@omron.com>
> Date: Mon, 1 Aug 2022 10:39:25 +0200
> Subject: [PATCH] USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id
> 
> works perfectly with:
> modprobe ftdi_sio
> echo "0590 00b2" | tee
> /sys/module/ftdi_sio/drivers/usb-serial\:ftdi_sio/new_id > /dev/null
> 
> but doing this every reboot is a pain in the ass.
> 
> Signed-off-by: Niek Nooijens <niek.nooijens@omron.com>
> ---
>  drivers/usb/serial/ftdi_sio.c     | 2 ++
>  drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
> index d5a3986dfee7..52d59be92034 100644
> --- a/drivers/usb/serial/ftdi_sio.c
> +++ b/drivers/usb/serial/ftdi_sio.c
> @@ -1045,6 +1045,8 @@ static const struct usb_device_id id_table_combined[] = {
>       /* IDS GmbH devices */
>       { USB_DEVICE(IDS_VID, IDS_SI31A_PID) },
>       { USB_DEVICE(IDS_VID, IDS_CM31A_PID) },
> +     /* Omron devices */
> +     { USB_DEVICE(OMRON_VID, OMRON_CS1W_CIF31_PID) },
>       /* U-Blox devices */
>       { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ZED_PID) },
>       { USB_DEVICE(UBLOX_VID, UBLOX_C099F9P_ODIN_PID) },
> diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
> index 4e92c165c86b..b99714c2f8cd 100644
> --- a/drivers/usb/serial/ftdi_sio_ids.h
> +++ b/drivers/usb/serial/ftdi_sio_ids.h
> @@ -1587,6 +1587,12 @@
>  #define IDS_SI31A_PID              0x13A2
>  #define IDS_CM31A_PID              0x13A3
>  
> +/*
> + * Omron corporation (https://www.omron.com/).
> + */
> + #define OMRON_VID                 0x0590
> + #define OMRON_CS1W_CIF31_PID            0x00b2
> +
>  /*
>   * U-Blox products (http://www.u-blox.com).
>   */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fw: Linux kernel patch for Omron CS1W-CIF31
       [not found]         ` <OS3P286MB1495E9C194761F73D84E34DAF6639@OS3P286MB1495.JPNP286.PROD.OUTLOOK.COM>
@ 2022-08-29 13:28           ` Johan Hovold
  0 siblings, 0 replies; 3+ messages in thread
From: Johan Hovold @ 2022-08-29 13:28 UTC (permalink / raw)
  To: niek.nooijens; +Cc: linux-usb

On Mon, Aug 08, 2022 at 07:06:59AM +0000, niek.nooijens@omron.com wrote:
> Hi Johan
> 
> I attached it by email.
> Don't worry about the merge window. I'm just glad to help!

Now applied, thanks.

Johan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-29 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <OS3P286MB149554090367DE82B0D687FFF69A9@OS3P286MB1495.JPNP286.PROD.OUTLOOK.COM>
     [not found] ` <YuorqOROzWlh8MY9@hovoldconsulting.com>
     [not found]   ` <OS3P286MB1495F452606C51D673D2519DF69C9@OS3P286MB1495.JPNP286.PROD.OUTLOOK.COM>
2022-08-03  8:51     ` Fw: Linux kernel patch for Omron CS1W-CIF31 niek.nooijens
2022-08-05 10:32       ` Johan Hovold
     [not found]         ` <OS3P286MB1495E9C194761F73D84E34DAF6639@OS3P286MB1495.JPNP286.PROD.OUTLOOK.COM>
2022-08-29 13:28           ` Johan Hovold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.