From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 680EFC433F5 for ; Mon, 8 Nov 2021 13:08:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 410A861207 for ; Mon, 8 Nov 2021 13:08:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238950AbhKHNKv (ORCPT ); Mon, 8 Nov 2021 08:10:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:45810 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbhKHNKv (ORCPT ); Mon, 8 Nov 2021 08:10:51 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 426EA610A3; Mon, 8 Nov 2021 13:08:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636376886; bh=bj/44GOaEYn/oc6G4GCZyTMbO8CLeGl7MkVSo3yUrwE=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=bKTM1ewVi1gqEMDwbfDCJwB7Yt8R9IgXic6pFasJnchFd5AzXYJOT1TD2+o+TkovP Vj8phmn75FMout/Rqhv1qvIpLhLp2XduzB6SXy/e0G+ZdRWZ+aV7pWd9FnaDEggeJC gvE4SPQa7p7iZ+u4QYnV/ccVjtLCsQPoHWXQLFQKS9YstSz3dLd0kNMCyLhwMdv7Kv dzDx6Xu0Q08/Mun5ljkrnZrH2ycaIcOeoa1JB+oD+G0Bgh936mdjfUgzaip7RBRdv5 UW54Nq/CWXbUYtEPq7YCmHCUZQuVir7kj7NtSIVpdsDZ/C1gQ/Os3Eg7dVFNh6533W 9z7Voc6Kc87/w== References: User-agent: mu4e 1.6.6; emacs 28.0.60 From: Felipe Balbi To: Shantur Rathore Cc: linux-usb@vger.kernel.org Subject: Re: usb-gadget: dynamic reconfiguration Date: Mon, 08 Nov 2021 15:07:26 +0200 In-reply-to: Message-ID: <87sfw6eqx8.fsf@kernel.org> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi, Shantur Rathore writes: > Hi all, > > I am trying to figure out if it's possible to reconfigure a usb-gadget > when it's live. > The idea is to create a gadget with 1 function - lets say a serial gadget. > > Upon communication with the host, the host could specify (via Serial > communication) which is the next gadget it needs for example a mass > storage or ecm and the next gadget can be added to the configuration. > > For now this only works if the gadget is disconnected and reconnected > to the UDC. > > I want to understand if it is technically possible to add more > functions to a live config without affecting existing functions. the only thing you can do is upon a certain command, logically disconnect from the bus and connect again as a new device. -- balbi