Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932450AbdCUMX2 (ORCPT ); Tue, 21 Mar 2017 08:23:28 -0400 Received: from terminus.zytor.com ([65.50.211.136]:47026 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757000AbdCUMXZ (ORCPT ); Tue, 21 Mar 2017 08:23:25 -0400 Date: Tue, 21 Mar 2017 05:21:06 -0700 From: tip-bot for Lu Baolu Message-ID: Cc: mathias.nyman@linux.intel.com, baolu.lu@linux.intel.com, johan@kernel.org, tglx@linutronix.de, peterz@infradead.org, gregkh@linuxfoundation.org, mingo@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, torvalds@linux-foundation.org Reply-To: peterz@infradead.org, tglx@linutronix.de, johan@kernel.org, mathias.nyman@linux.intel.com, baolu.lu@linux.intel.com, gregkh@linuxfoundation.org, torvalds@linux-foundation.org, hpa@zytor.com, linux-kernel@vger.kernel.org, mingo@kernel.org In-Reply-To: <1490083293-3792-5-git-send-email-baolu.lu@linux.intel.com> References: <1490083293-3792-5-git-send-email-baolu.lu@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/debug] usb/serial: Add DBC debug device support to usb_debug Git-Commit-ID: 57fb47279a04cd53641dc5ae55a6d47e4f32a2fd X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2442 Lines: 72 Commit-ID: 57fb47279a04cd53641dc5ae55a6d47e4f32a2fd Gitweb: http://git.kernel.org/tip/57fb47279a04cd53641dc5ae55a6d47e4f32a2fd Author: Lu Baolu AuthorDate: Tue, 21 Mar 2017 16:01:32 +0800 Committer: Ingo Molnar CommitDate: Tue, 21 Mar 2017 12:30:17 +0100 usb/serial: Add DBC debug device support to usb_debug This patch adds DBC debug device support to the usb_debug driver. Signed-off-by: Lu Baolu Acked-by: Thomas Gleixner Acked-by: Johan Hovold Cc: Greg Kroah-Hartman Cc: Linus Torvalds Cc: Mathias Nyman Cc: Peter Zijlstra Cc: linux-usb@vger.kernel.org Link: http://lkml.kernel.org/r/1490083293-3792-5-git-send-email-baolu.lu@linux.intel.com Signed-off-by: Ingo Molnar --- drivers/usb/serial/usb_debug.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index ca2fa5b..92f7e5c 100644 --- a/drivers/usb/serial/usb_debug.c +++ b/drivers/usb/serial/usb_debug.c @@ -32,7 +32,18 @@ static const struct usb_device_id id_table[] = { { USB_DEVICE(0x0525, 0x127a) }, { }, }; -MODULE_DEVICE_TABLE(usb, id_table); + +static const struct usb_device_id dbc_id_table[] = { + { USB_DEVICE(0x1d6b, 0x0004) }, + { }, +}; + +static const struct usb_device_id id_table_combined[] = { + { USB_DEVICE(0x0525, 0x127a) }, + { USB_DEVICE(0x1d6b, 0x0004) }, + { }, +}; +MODULE_DEVICE_TABLE(usb, id_table_combined); /* This HW really does not support a serial break, so one will be * emulated when ever the break state is set to true. @@ -71,9 +82,20 @@ static struct usb_serial_driver debug_device = { .process_read_urb = usb_debug_process_read_urb, }; +static struct usb_serial_driver dbc_device = { + .driver = { + .owner = THIS_MODULE, + .name = "xhci_dbc", + }, + .id_table = dbc_id_table, + .num_ports = 1, + .break_ctl = usb_debug_break_ctl, + .process_read_urb = usb_debug_process_read_urb, +}; + static struct usb_serial_driver * const serial_drivers[] = { - &debug_device, NULL + &debug_device, &dbc_device, NULL }; -module_usb_serial_driver(serial_drivers, id_table); +module_usb_serial_driver(serial_drivers, id_table_combined); MODULE_LICENSE("GPL");