Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp655795ybl; Tue, 28 Jan 2020 09:33:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwze3SwNfYb3fAYHXLomIiUrFX0Glnz5S1pTxuDvtS6bfZQyd6f7f5eouEVwoxIjWjW6YyS X-Received: by 2002:a54:4f04:: with SMTP id e4mr3409116oiy.111.1580232839543; Tue, 28 Jan 2020 09:33:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580232839; cv=none; d=google.com; s=arc-20160816; b=0X73ARSVA2Ebqi+R+0fx0TMOSH9JW3ML80pC3uBKUPQ/D3+ws+Q8qCuLxgc8f1JiGB CEARAwuj3nsv4NS9sVhuva8V11jIiO2SPJUe8xd89lvJ1PF7b6ZCfTZ2xNQsdZzea1Nc nieDMvHx252OFQrqwxR4qB6a4GrPe6cKQKIJDhbRgO1J1VsJiHZlbvT3W0o4NnqnPWRn FEgPgwcA+2Ae3n2Wl/WXGLjnxnQEEvkFdDeJXDs1wll7+aBy8BSuFJKpxZ6Xq0LHwqHP q/LftL8H52SRbyXZe2qwzNhzRVsC/3pe+xxpBmXWwHTxBIKzbd7fqBk4WEBVq/o2xDFE MhpA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=UEHKbjV0nqlBA9um3vA2rHSRrf9BUyNOWdNP0/CH1zQ=; b=gUwddf7/FBxDSz2vC9Lhy8SqZmpVUIovSTO+6siSQ6DNHk6oLugiqqabIURknxCYZN cLNzc/n4SnsvX9ibD8vfLo58hdl0EoUne6bJT+VU8uf7XKcfXLV6rAVd/zPJsVpoBc0e PzlEdbdaYgShFvjs+c1pWRuuXqM11fHTdT32p4rIvaJAez1OqY7S93Ijs5r/WBWBqH/d M+yTZ7RCHmWq86/MVA0+Ybjj2iHh76n7OkjD04+vRT2Kw9uhzExM1mo1sT0vHZBI+a75 d8RDfbYHiK/nwVoWJEoMA6+6YLo7AhaFtYrNHLVm9PpqDdUbCHqDwRCIf81q5gnSXi5Z mTqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rCOoAVHU; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si8619669oth.158.2020.01.28.09.33.46; Tue, 28 Jan 2020 09:33:59 -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=@gmail.com header.s=20161025 header.b=rCOoAVHU; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726481AbgA1Rcv (ORCPT + 99 others); Tue, 28 Jan 2020 12:32:51 -0500 Received: from mail-wr1-f48.google.com ([209.85.221.48]:37690 "EHLO mail-wr1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726066AbgA1Rcv (ORCPT ); Tue, 28 Jan 2020 12:32:51 -0500 Received: by mail-wr1-f48.google.com with SMTP id w15so17053934wru.4; Tue, 28 Jan 2020 09:32:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UEHKbjV0nqlBA9um3vA2rHSRrf9BUyNOWdNP0/CH1zQ=; b=rCOoAVHUuXEwpmWpZvFfgWUGpJd5f9Co2EQ/jOAaZkSBXnB1B5H2apc95dtNF/YDzv 5D4yYxYnElORcJr62gw5/mS6XRokF81sBCeBps2Q9rhKwqF9dB7MEdUdtOD6Y4ST7ioS 4g7pJgbGV8j9vlXOoiNUu1wl9vhD/VIzxfskS2/jZtCaLcq8Bh/gGj+LxqhKHMTuGPZd hSqZK0cyvBMcFqRwa38gBnMf7Zg8Zmvd7t0Hg0x5a2FCZU4gpDNx80VHFa261ntDXmP5 wJ+u+gtTyEGib8iMN+LMfDR4TVaBMCbqx7BGuQdj/HJuVP9TYWXgtqNhEUmqLDd+/w1+ k/kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UEHKbjV0nqlBA9um3vA2rHSRrf9BUyNOWdNP0/CH1zQ=; b=g6yIk38JzP12Uw2n9fMHlbzPHiIiCjk0WAaJmgdCx+8PjsVTAMRJwJTa2bs/nQTL9U +TqMhBmXz2k8rDsbulGeqgYBqkOvPGxweetw3qoU4YCt14DHUnDSdU2Agi9PH85Kj5oQ mvfUS1F3a1bbTmmYTtwfpQPjgWLm/vXPJe3Dl5Uu58jfFdGI3Mhuk2mk10IvkR3uxQna dguMBhNHpSP7QNYICZQrcFydaA4LCg4jkNx3CeJP3hxIaHU5FBko/lnNxIucr/OD27Wz Bw1kxFbcZQIUEg4QosDBS8Az70LwUnSiPqONM7qIVo/9FD1VuYBjBr13XrAinhdohpxQ dxkA== X-Gm-Message-State: APjAAAWcoSC4TShO7v7SJAaXfWWe2uStNT7OSASIFu0GQ9uG5xFbqbLe 8Mpoyzs8b7BephrTE+GkZIE= X-Received: by 2002:adf:dd46:: with SMTP id u6mr28613441wrm.13.1580232768634; Tue, 28 Jan 2020 09:32:48 -0800 (PST) Received: from localhost (p2E5BEF3F.dip0.t-ipconnect.de. [46.91.239.63]) by smtp.gmail.com with ESMTPSA id d14sm28185347wru.9.2020.01.28.09.32.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2020 09:32:47 -0800 (PST) Date: Tue, 28 Jan 2020 18:32:44 +0100 From: Thierry Reding To: Nagarjuna Kristam Cc: balbi@kernel.org, gregkh@linuxfoundation.org, jonathanh@nvidia.com, mark.rutland@arm.com, robh+dt@kernel.org, kishon@ti.com, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [Patch V3 03/18] phy: tegra: xusb: Add usb-role-switch support Message-ID: <20200128173244.GA2293590@ulmo> References: <1577704195-2535-1-git-send-email-nkristam@nvidia.com> <1577704195-2535-4-git-send-email-nkristam@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PNTmBPCT7hxwcZjr" Content-Disposition: inline In-Reply-To: <1577704195-2535-4-git-send-email-nkristam@nvidia.com> User-Agent: Mutt/1.13.1 (2019-12-14) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --PNTmBPCT7hxwcZjr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 30, 2019 at 04:39:40PM +0530, Nagarjuna Kristam wrote: > If usb-role-switch property is present in USB 2 port, register > usb-role-switch to receive usb role changes. >=20 > Signed-off-by: Nagarjuna Kristam > --- > V3: > - Driver aborts if usb-role-switch is not added in dt forotg/peripheral > roles. > - Added role name strings instead of enum values in debug prints. > - Updated arguments and variable allignments as per Thierry inputs. > --- > V2: > - Removed dev_set_drvdata for port->dev. > - Added of_platform_depopulate during error handling and driver removal. > --- > drivers/phy/tegra/Kconfig | 1 + > drivers/phy/tegra/xusb.c | 57 +++++++++++++++++++++++++++++++++++++++++= ++++++ > drivers/phy/tegra/xusb.h | 3 +++ > 3 files changed, 61 insertions(+) >=20 > diff --git a/drivers/phy/tegra/Kconfig b/drivers/phy/tegra/Kconfig > index f9817c3..df07c4d 100644 > --- a/drivers/phy/tegra/Kconfig > +++ b/drivers/phy/tegra/Kconfig > @@ -2,6 +2,7 @@ > config PHY_TEGRA_XUSB > tristate "NVIDIA Tegra XUSB pad controller driver" > depends on ARCH_TEGRA > + select USB_CONN_GPIO > help > Choose this option if you have an NVIDIA Tegra SoC. > =20 > diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c > index f98ec39..11ea9b5 100644 > --- a/drivers/phy/tegra/xusb.c > +++ b/drivers/phy/tegra/xusb.c > @@ -523,6 +523,7 @@ static int tegra_xusb_port_init(struct tegra_xusb_por= t *port, > port->dev.type =3D &tegra_xusb_port_type; > port->dev.of_node =3D of_node_get(np); > port->dev.parent =3D padctl->dev; > + port->dev.driver =3D padctl->dev->driver; This looks wrong. I don't think driver's are supposed to set this because it basically means that the device is being attached to the driver, but in this case it doesn't get probed by the driver and in fact the ports don't match the pad controller, so they can't really be driven by the same driver. Is there any particular reason why you need this? Thierry --PNTmBPCT7hxwcZjr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAl4wcDkACgkQ3SOs138+ s6FsghAAoD/UomjaeZd8bY2R43NpHXrHIRhlcnRJUrm2NQzod8kdj9tkUH093usf t+oPi+lizbJqV3P8wJUrk0wNPAz1B+2TchrcpuWXzc/orwcMhQVhV4Vw/B3psEo3 jxL0UE5bhSdErLS4enDP8lu9XiKfDBM5rXwroRYYWogQK86I3RLPeW+WJEzLbDfR gJH47XBA7ZMTP3EmBXd92NZZA0+2CSiAjwoT5QC4+EJpYdhJTDPjmxQbZY/dHB37 TKu7s1tJMSz14Vkypgh2ExUufbk+f3JlYEka2R+DWXHSN3e2vLixoMtVIwYlaM33 AWAlBHW7iJPxGmoZLY3QyjF3fZOMvOzRRI/GwIbY+F6kwPFEiZHmoPruBVLKyg4a 4q0hkBD/O2Q/8A/boju/7eUVw3WXRFzVvSYHoKVvl3rsY6o4hIlAuGj6crkaDarh gPJYvJh6eDY5snTEM98/Xmrme82PKLaXJGcf8FBZ1ZCUQoak4EX2mop+30Ml38Ly ABLHIaubha4ciqJ4DZwX5lwuUQyEXSgr1IKeLklGBuIvK6ffvsjSK9fYHasGUrmz V2W+urskYuFQPefo0zND/vBGFtYTWbFz+cQxNWz/F4uU1j8adbVb5txSgOleRutF lXfIGLpnOk+eGhf/it6b6phm/AKz2FgJt3d2E4xNMq27JuMUsuk= =nbqn -----END PGP SIGNATURE----- --PNTmBPCT7hxwcZjr--