From patchwork Tue Mar 30 14:38:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 12172727 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21C80C433E2 for ; Tue, 30 Mar 2021 14:38:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E2ABF619D7 for ; Tue, 30 Mar 2021 14:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232156AbhC3OiS (ORCPT ); Tue, 30 Mar 2021 10:38:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:50514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231982AbhC3OiF (ORCPT ); Tue, 30 Mar 2021 10:38:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 79774619CD; Tue, 30 Mar 2021 14:38:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617115085; bh=g73wNQL4k2lRInaQ6dxIl0zoTR2Hfi58MBlUV2HHCkc=; h=From:To:Cc:Subject:Date:From; b=md9IPXStO783PgnO1IrO+hK6MdBy1oTGbtqgwYY5Q3FwdGSkLOt11S7DP94G9SiUs vJ2x6LgsYhDBzSdcKXMflQ4NSrcPDg98mq5KBiXxS8U6cFGeGn5Ze02izDv9UpRcbF cwOtCsM0GU6o2N2Mxy7kj63adb8GhFejM915GG2BXakf+whcA41tAi+pQK8v/g2kbY jE7Q+BcGxkMaamYLarzvo3/3EOnte7zaTKo9TdO45Arrfmpv32OiyWD31gqL4h36Ns TwrsnDmsfZv7qlfS+v/y8mNfniawIh2W2g/j4rNCXNQhPunPalz3Akpcp8KRbem/OV sqpghxoYqkjzA== Received: from johan by xi.lan with local (Exim 4.93.0.4) (envelope-from ) id 1lRFVj-0002Ni-89; Tue, 30 Mar 2021 16:38:27 +0200 From: Johan Hovold To: Johan Hovold Cc: Mauro Carvalho Chehab , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] USB: serial: add support for multi-interface functions Date: Tue, 30 Mar 2021 16:38:16 +0200 Message-Id: <20210330143820.9103-1-johan@kernel.org> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org A single USB function can be implemented using a group of interfaces and this is for example commonly used for Communication Class devices. This series adds support for multi-interface functions to USB serial core and exports an interface that allows drivers to claim a second sibling interface. The interface could easily be extended to allow claiming further interfaces if ever needed. The final patch uses the new interface to properly claim both the control and data interface of Maxlinear/Exar devices. Johan Johan Hovold (4): USB: serial: drop unused suspending flag USB: serial: refactor endpoint classification USB: serial: add support for multi-interface functions USB: serial: xr: claim both interfaces drivers/usb/serial/usb-serial.c | 135 ++++++++++++++++++++++++-------- drivers/usb/serial/xr_serial.c | 26 +++++- include/linux/usb/serial.h | 8 +- 3 files changed, 131 insertions(+), 38 deletions(-) Reviewed-by: Greg Kroah-Hartman