aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-26 00:52:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-26 17:13:01 -0400
commita8825734e9169ddd0a2a343ceb8ce7d3ecfa08a7 (patch)
treedbbc6657470410f1d257e10f31af5734894780d9 /drivers
parent2c7b871b9102c497ba8f972aa5d38532f05b654d (diff)
USB: serial: add driver for Suunto ANT+ USB device
This adds a driver for the Suunto ANT+ USB device, exposing it as a usb serial device. This lets the userspace "gant" program to talk to the device to communicate over the ANT+ protocol to any devices it finds. Reported-by: Steinar Gunderson <sgunderson@bigfoot.com> Tested-by: Steinar Gunderson <sgunderson@bigfoot.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/serial/Kconfig7
-rw-r--r--drivers/usb/serial/Makefile1
-rw-r--r--drivers/usb/serial/suunto.c41
3 files changed, 49 insertions, 0 deletions
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig
index 8c3a42ea910c..7eef9b33fde6 100644
--- a/drivers/usb/serial/Kconfig
+++ b/drivers/usb/serial/Kconfig
@@ -719,6 +719,13 @@ config USB_SERIAL_FLASHLOADER
719 To compile this driver as a module, choose M here: the 719 To compile this driver as a module, choose M here: the
720 module will be called flashloader. 720 module will be called flashloader.
721 721
722config USB_SERIAL_SUUNTO
723 tristate "USB Suunto ANT+ driver"
724 help
725 Say Y here if you want to use the Suunto ANT+ USB device.
726
727 To compile this driver as a module, choose M here: the
728 module will be called suunto.
722 729
723config USB_SERIAL_DEBUG 730config USB_SERIAL_DEBUG
724 tristate "USB Debugging Device" 731 tristate "USB Debugging Device"
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile
index f7130114488f..a14a870d993f 100644
--- a/drivers/usb/serial/Makefile
+++ b/drivers/usb/serial/Makefile
@@ -54,6 +54,7 @@ obj-$(CONFIG_USB_SERIAL_SIEMENS_MPI) += siemens_mpi.o
54obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS) += sierra.o 54obj-$(CONFIG_USB_SERIAL_SIERRAWIRELESS) += sierra.o
55obj-$(CONFIG_USB_SERIAL_SPCP8X5) += spcp8x5.o 55obj-$(CONFIG_USB_SERIAL_SPCP8X5) += spcp8x5.o
56obj-$(CONFIG_USB_SERIAL_SSU100) += ssu100.o 56obj-$(CONFIG_USB_SERIAL_SSU100) += ssu100.o
57obj-$(CONFIG_USB_SERIAL_SUUNTO) += suunto.o
57obj-$(CONFIG_USB_SERIAL_SYMBOL) += symbolserial.o 58obj-$(CONFIG_USB_SERIAL_SYMBOL) += symbolserial.o
58obj-$(CONFIG_USB_SERIAL_WWAN) += usb_wwan.o 59obj-$(CONFIG_USB_SERIAL_WWAN) += usb_wwan.o
59obj-$(CONFIG_USB_SERIAL_TI) += ti_usb_3410_5052.o 60obj-$(CONFIG_USB_SERIAL_TI) += ti_usb_3410_5052.o
diff --git a/drivers/usb/serial/suunto.c b/drivers/usb/serial/suunto.c
new file mode 100644
index 000000000000..2248e7a7d5ad
--- /dev/null
+++ b/drivers/usb/serial/suunto.c
@@ -0,0 +1,41 @@
1/*
2 * Suunto ANT+ USB Driver
3 *
4 * Copyright (C) 2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5 * Copyright (C) 2013 Linux Foundation
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation only.
10 */
11
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/tty.h>
15#include <linux/module.h>
16#include <linux/usb.h>
17#include <linux/usb/serial.h>
18#include <linux/uaccess.h>
19
20static const struct usb_device_id id_table[] = {
21 { USB_DEVICE(0x0fcf, 0x1008) },
22 { },
23};
24MODULE_DEVICE_TABLE(usb, id_table);
25
26static struct usb_serial_driver suunto_device = {
27 .driver = {
28 .owner = THIS_MODULE,
29 .name = KBUILD_MODNAME,
30 },
31 .id_table = id_table,
32 .num_ports = 1,
33};
34
35static struct usb_serial_driver * const serial_drivers[] = {
36 &suunto_device,
37 NULL,
38};
39
40module_usb_serial_driver(serial_drivers, id_table);
41MODULE_LICENSE("GPL");