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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C0F7AC001DE for ; Fri, 4 Aug 2023 16:07:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 38FA186942; Fri, 4 Aug 2023 18:06:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="BQICZ6fJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 227B386942; Fri, 4 Aug 2023 18:06:51 +0200 (CEST) Received: from mail-ot1-x32a.google.com (mail-ot1-x32a.google.com [IPv6:2607:f8b0:4864:20::32a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 254D3861EB for ; Fri, 4 Aug 2023 18:06:48 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-6bca6c06e56so2101401a34.1 for ; Fri, 04 Aug 2023 09:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1691165207; x=1691770007; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VvMeanjol7aRDOmcVWHleL6tfPLfes5Jxf2snlXEVpM=; b=BQICZ6fJS9uyiOt2+jyPhjiUYk+SJpAC1HP6zu5mw+jWaIZHWwBHIF9q10sBMzbsqx Ji5dpiFql0LGARv6Fektz4OeWIGNNssbfo5qw4traZdmBPO6wGG+033Qv4nAFJ7HUR4T NUeYOXVxgRZPSrKgjOIRRLNBZiySqha0ccRtk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691165207; x=1691770007; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VvMeanjol7aRDOmcVWHleL6tfPLfes5Jxf2snlXEVpM=; b=OP1ZqltFq1W+SBVJXuHh1du8et3t6xfnPIyWat7H5JD809rauWIeo3udbVzrzLUDhh u74XDj4F6gKKmiJ2qA4pT23pETuAoIOd1NqFqCAIACKmCMMRk+5DEEeaoDSoJB/8ZHSU BphXiKKLF4K8JC6S7IR9myEs4P2j0Vb+ONPhuWF7FgXeqaWVtn7+jpFKwv4inH6IQ3ab t2O6oYUe0U9Zvsx6pr/5DxHClK9/jXei+AL4a1S6XqJNGvD5GDxavByG+E5wXJfUv5iI l5oIebF6UxReMxjbcDmyEVVgnJnEhS5XKyJrPNvxJx+sDtsHO9ZhR9y8ii92E5OJMrh/ r8uQ== X-Gm-Message-State: AOJu0Yyj7KD1QLCAiCAjU0HKZ3XXu3pztPNwRcECwUuT2r+UsMIxKUh2 iOtOzZBC2JuE3qxhPSOiMx0pGA== X-Google-Smtp-Source: AGHT+IHc5DG92vPUiAd5Tm5OAVtnKUWT5jEAIN4w59/VVwyv1XDu+FpZ0H+vhGcdt0BUe2wZT4cMrw== X-Received: by 2002:a9d:7a93:0:b0:6b9:350e:4051 with SMTP id l19-20020a9d7a93000000b006b9350e4051mr2173087otn.4.1691165206807; Fri, 04 Aug 2023 09:06:46 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-c37f-6e0c-fce7-d587.res6.spectrum.com. [2603:6081:7b00:6400:c37f:6e0c:fce7:d587]) by smtp.gmail.com with ESMTPSA id a10-20020a5b0aca000000b00d1dffdd7a97sm678610ybr.57.2023.08.04.09.06.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 09:06:46 -0700 (PDT) Date: Fri, 4 Aug 2023 12:06:44 -0400 From: Tom Rini To: Marek Vasut Cc: u-boot@lists.denx.de, Kevin Hilman , Lukasz Majewski , Miquel Raynal , Simon Glass Subject: Re: [PATCH v5 3/3] usb: gadget: ether: Handle gadget driver registration in probe and remove Message-ID: <20230804160644.GQ3630934@bill-the-cat> References: <20230804154111.97042-1-marex@denx.de> <20230804154111.97042-3-marex@denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Oq9/HzRjxHC2XWNa" Content-Disposition: inline In-Reply-To: <20230804154111.97042-3-marex@denx.de> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean --Oq9/HzRjxHC2XWNa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 04, 2023 at 05:41:11PM +0200, Marek Vasut wrote: > Move the ethernet gadget driver registration and removal from ethernet > bind and unbind callbacks into driver DM probe and remove callbacks. > This way, when the driver is bound, which is triggered deliberately > using 'bind' command, the USB ethernet gadget driver is instantiated > and bound to the matching UDC. In reverse, when the driver is unbound, > which is again triggered deliberately using 'unbind' command, the USB > ethernet gadget driver instance is removed. >=20 > Effectively, this now behaves like running either 'ums' or 'dfu' or > any other commands utilizing USB gadget functionality. >=20 > This also drops use of usb_gadget_release() and moves the use of > usb_gadget_initialize() into usb_ether_init() used only by legacy > platforms that do not use 'bind' command properly yet. Those have > no place in drivers. >=20 > Signed-off-by: Marek Vasut Tested-by: Tom Rini --=20 Tom --Oq9/HzRjxHC2XWNa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmTNIhQACgkQFHw5/5Y0 tyw3jAv/QzRn2FfUeTHU10i3vC9+mgaOs8Avs0gC7JsMWo/MRwHBQjc4cSfiLh2G UF7E6Lv/eVmhwR5afagcPaiBpIE2N3XfQyz2kwdnH0kk+l/zRrR70nAuFhEdKy8L w9xS1F7smg4pLzugCYEQZirw+neUc2lAkvfP3tP/Pyj4q9pI+ZpjOu8jBvao6ZHN Wem3q6cc+i+CKM74LG1PGhcIT85d6pYAxVTHUGlaTVu64v9GJpLZWr1LvWGUS8RL 8GyhjBt56Rc9UJ6RYDfPA701+QXHdMKHWZ0GYFr1eicm1Nw2l4vR1qYuaj941Crv oRQIo+ZG+tvbS1phojYNenox5Xu04gpq7TCsfvAAbHOwwSF/L8H9QSJnNCCIp5bZ Q1cYi6TOuCaEy/K2miCIz0y2AWk7J9o92u1jlrv4selWJU64KPCxv5NrShPhZCbe 1JkMtU/DvIvou6H3fyjKm3YBSHHmwQWwoqwfRCLeihasr47N13BQ47xg9QbChaP2 x9TG1TCG =GlFP -----END PGP SIGNATURE----- --Oq9/HzRjxHC2XWNa--