diff mbox series

Linux kernel patch for Omron CS1W-CIF31

Message ID OS3P286MB14959D8566969A709A50F2A7F69C9@OS3P286MB1495.JPNP286.PROD.OUTLOOK.COM (mailing list archive)
State New, archived
Headers show
Series Linux kernel patch for Omron CS1W-CIF31 | expand

Commit Message

niek.nooijens@omron.com Aug. 3, 2022, 8:51 a.m. UTC
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(+)

Comments

Johan Hovold Aug. 5, 2022, 10:32 a.m. UTC | #1
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).
>   */
Johan Hovold Aug. 29, 2022, 1:28 p.m. UTC | #2
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
diff mbox series

Patch

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).
  */