From: Niek Nooijens / IAB <niek.nooijens@xxxxxxxxx> Sent: Wednesday, August 3, 2022 10:49 AM To: Johan Hovold <johan@xxxxxxxxxx> Cc: linux-usb@xxxxxxxxxxxxxxx <linux-usb@xxxxxxxxxxxxxxx> 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@xxxxxxxxx> 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@xxxxxxxxx> --- 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@xxxxxxxxxx> Sent: Wednesday, August 3, 2022 10:02 AM To: Niek Nooijens / IAB <niek.nooijens@xxxxxxxxx> Subject: Re: Linux kernel patch for Omron CS1W-CIF31 On Mon, Aug 01, 2022 at 09:01:13AM +0000, niek.nooijens@xxxxxxxxx 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@xxxxxxxxxxxxxxx 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@xxxxxxxxx> 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