Re: [PATCH] USB: serial: ftdi_sio: add id for Brainboxes VX-001 ExpressCard

From: Johan Hovold
Date: Fri Mar 28 2014 - 06:15:57 EST


On Tue, Mar 25, 2014 at 07:00:51PM +0000, Michele Baldessari wrote:
> Custom VID/PID for Brainboxes VX-001 ExpressCard RS232 as reported in
> https://bugzilla.redhat.com/show_bug.cgi?id=1071914

Thanks for the patch.

How about including the other PIDs listed in the report (in the attached
udev-rule) as well?

> Signed-off-by: Michele Baldessari <michele@xxxxxxxxxx>
> ---
> drivers/usb/serial/ftdi_sio.c | 2 ++
> drivers/usb/serial/ftdi_sio_ids.h | 7 +++++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
> index 44ab12986805..bf72063d6f48 100644
> --- a/drivers/usb/serial/ftdi_sio.c
> +++ b/drivers/usb/serial/ftdi_sio.c
> @@ -909,6 +909,8 @@ static const struct usb_device_id id_table_combined[] = {
> { USB_DEVICE(FTDI_VID, FTDI_Z3X_PID) },
> /* Cressi Devices */
> { USB_DEVICE(FTDI_VID, FTDI_CRESSI_PID) },
> + /* Brainbox Devices */
> + { USB_DEVICE(BRAINBOXES_VID, BRAINBOXES_VX_001_PID) },
> { } /* Terminating entry */
> };
>
> diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
> index e599fbfcde5f..ae842a203371 100644
> --- a/drivers/usb/serial/ftdi_sio_ids.h
> +++ b/drivers/usb/serial/ftdi_sio_ids.h
> @@ -1326,3 +1326,10 @@
> * Manufacturer: Cressi
> */
> #define FTDI_CRESSI_PID 0x87d0
> +
> +/*
> + * Product: ExpressCard 1 Port RS2323
> + * Manufacturer: Brainboxes
> + */

Could you just make this a "Brainboxes devices"-header and then list any
product in a comment following the PID instead? That would "scale"
better when adding more Brainboxes PIDs.

> +#define BRAINBOXES_VID 0x05d1
> +#define BRAINBOXES_VX_001_PID 0x1001

That is, something like:

/*
* Brainboxes devices
*/
#define BRAINBOXES_VID 0x05d1
#define BRAINBOXES_VX_001_PID 0x1001 /* ExpressCard 1 Port RS2323 */

Thanks,
Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/