[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190410102415.GH20058@kuha.fi.intel.com>
Date: Wed, 10 Apr 2019 13:24:15 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Chunfeng Yun <chunfeng.yun@...iatek.com>
Cc: Rob Herring <robh+dt@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mark Rutland <mark.rutland@....com>,
Matthias Brugger <matthias.bgg@...il.com>,
Adam Thomson <Adam.Thomson.Opensource@...semi.com>,
Li Jun <jun.li@....com>,
Badhri Jagan Sridharan <badhri@...gle.com>,
Hans de Goede <hdegoede@...hat.com>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Min Guo <min.guo@...iatek.com>,
Alan Stern <stern@...land.harvard.edu>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: Re: [v3 PATCH 6/6] usb: mtu3: register a USB Role Switch for dual
role mode
On Wed, Apr 03, 2019 at 10:09:14AM +0800, Chunfeng Yun wrote:
> +static int ssusb_role_sw_register(struct otg_switch_mtk *otg_sx)
> +{
> + struct usb_role_switch_desc role_sx_desc = { 0 };
> + struct ssusb_mtk *ssusb =
> + container_of(otg_sx, struct ssusb_mtk, otg_switch);
> +
> + if (!otg_sx->role_sw_used)
> + return 0;
> +
> + role_sx_desc.set = ssusb_role_sw_set;
> + role_sx_desc.get = ssusb_role_sw_get;
role_sw_desc.fwnode = dev_fwnode(ssusb->dev);
> + otg_sx->role_sw = usb_role_switch_register(ssusb->dev, &role_sx_desc);
> +
> + return PTR_ERR_OR_ZERO(otg_sx->role_sw);
> +}
thanks,
--
heikki
Powered by blists - more mailing lists