Received: by 10.223.185.116 with SMTP id b49csp2959918wrg; Mon, 5 Mar 2018 11:29:58 -0800 (PST) X-Google-Smtp-Source: AG47ELuF2sPcshWK0ldgdzpW58uDDobyU5ylFvmeJACCKvbsaV8AcInsIn2f3dW9oajImh2iQ0Z2 X-Received: by 2002:a17:902:ab89:: with SMTP id f9-v6mr13913418plr.369.1520278198873; Mon, 05 Mar 2018 11:29:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520278198; cv=none; d=google.com; s=arc-20160816; b=dtahqp+CuOGGWRajAyWdFj8XcsFCdhx0kU4cxf1F5nUL2CaGaRFUyRS/BiquU1Lg1h 8U0EHtBzi3aRmntcxDWIUJuZO1vayodpg9iEl2dCIDhMHc2pl2chKBq924hw5U7oJHI7 f3SWuHWxoOmp9vmOVxZF7jBshZDWM63WuYuyGCn+eL7ECi/LSSIwa7npkho7AcBwOWS3 ScQcDeorRxhrjstzAI17BGz86VYXDFEaDP10LRTUiLeklk+RRO79di4mXzmpbfNxiFdp OXgv01KGzSTJau/lcyFCsHEz+72b9mW3BSX8482bV+26/SLqtdzHocqlPtlZO31JOJ9t CHXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=SwnWeMThAwnr40d3IA6LXBslitWbYFBUysIcTgsc6OA=; b=KJ938i2YKkIa/osqgw6k1Lg/lNaxWUBzDBSAP0p6+lQMn8z+m1J3F5wfGQKvDeZ7hk 7/Y6TZ1E3JGeqGXFvmZR3/n74dJxxdtcP5HTKq0Frd5uaKlSLLsdhvcgoU91sKd6WKuo B4Ab/djW3y8ZaY4TG9VhgJpOH+vVJnby75utu4NEaXpW8GSA1PSR7QHMThRSDQ/BGMvD tZ8kubNVlUz20Rh2bL4bK7BpdKtRIFkn3OAnhU2BCOi5Mrt4binOzad62y0iwZWxXXa8 lAKt/+A/0WEKst3qNwrxK0VCIuYtwa4jS3yayRgPnmo2DJ/zMUluc6R+l+68xBLQmBZu x6zA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=o+fDE0eZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i35-v6si9714408plg.48.2018.03.05.11.29.44; Mon, 05 Mar 2018 11:29:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=o+fDE0eZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752918AbeCET2r (ORCPT + 99 others); Mon, 5 Mar 2018 14:28:47 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:26513 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751490AbeCET2p (ORCPT ); Mon, 5 Mar 2018 14:28:45 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w25JSi7p018902; Mon, 5 Mar 2018 13:28:44 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1520278124; bh=GIWHoGAZ92Un+5UBVmWSk4FJoylhHDJj8J7O+6ZsHpA=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=o+fDE0eZF6A4Q2YtZ/7X5LibqCcRA6IHan4GntoL44sdnKNx87b5GnYCiVYfhYWpP Ia3XwhKG4BJWh9+78AdjJ/jnIh8EiH2iyvZooWbK4S2cQr0C7xob7B6aMJM0MpGlU9 Nd3j+M+pXhVA18E76sNWbquJ+YAKc0ZLVG2uXngA= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w25JSiu8025670; Mon, 5 Mar 2018 13:28:44 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 5 Mar 2018 13:28:44 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 5 Mar 2018 13:28:44 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w25JSiLe015777; Mon, 5 Mar 2018 13:28:44 -0600 Date: Mon, 5 Mar 2018 13:28:44 -0600 From: Bin Liu To: Pali =?iso-8859-1?Q?Roh=E1r?= CC: Merlijn Wajer , Greg Kroah-Hartman , , , Ivaylo Dimitrov , Subject: Re: usb: musb: "(null)" in sysfs mode file after disabling a gadget (and at other times, system hangs) Message-ID: <20180305192844.GE14921@uda0271908> Mail-Followup-To: Bin Liu , Pali =?iso-8859-1?Q?Roh=E1r?= , Merlijn Wajer , Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Ivaylo Dimitrov , linux-omap@vger.kernel.org References: <20180302152712.GA22262@uda0271908> <20180302165439.62xw4slhhupy4vy5@pali> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180302165439.62xw4slhhupy4vy5@pali> User-Agent: Mutt/1.5.21 (2010-09-15) X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Merlijn, On Fri, Mar 02, 2018 at 05:54:39PM +0100, Pali Roh?r wrote: > On Friday 02 March 2018 17:47:52 Merlijn Wajer wrote: > > >> I would expect it to state "b_idle" instead of "(null)". > > > > > > Actually, I'd like to see (null) whenever a gadget driver is not loaded, > > > which indicates a gadget is not bound to the udc. > > > > Hm... Sounds fine to me. I'm using this mode in combination with the usb > > phy (vbus property) to detect if the phone is detect to a 'dumb' charger > > of a PC, but I can just always have a gadget loaded -- same as before, > > really. > > For detection if wallcharger or pc usb charger is connected, there is > isp1704_charger driver. It uses some standard ULPI interface. It reports > current_max and type (DCP - dedicated, CDP or just usb). The musb udc driver sets the state to b_idle without checking a gadget driver, this should be cleaned up. I have add this in my backlog. But if this issue doesn't bother you much right now, I will make the action low priority and address it later whenever I got time. (likely not very soon, I have a hand full of musb driver bugs to fix...) Regards, -Bin.