Re: [linux-sunxi] Re: [PATCH v3 1/2] phy-sun4i-usb: Use of_match_node to get model specific config data

2015-11-27 Thread Hans de Goede
Hi, On 27-11-15 11:37, Hans de Goede wrote: Hi, On 27-11-15 09:53, Maxime Ripard wrote: On Thu, Nov 26, 2015 at 01:11:32PM +0100, Hans de Goede wrote: +enum sun4i_usb_phy_type { + sun4i_a10_phy, + sun8i_a33_phy, +}; + +struct sun4i_usb_phy_cfg { + int num_phys; + u32 d

Re: [linux-sunxi] Re: [PATCH v3 1/2] phy-sun4i-usb: Use of_match_node to get model specific config data

2015-11-27 Thread Hans de Goede
Hi, On 27-11-15 09:53, Maxime Ripard wrote: On Thu, Nov 26, 2015 at 01:11:32PM +0100, Hans de Goede wrote: +enum sun4i_usb_phy_type { + sun4i_a10_phy, + sun8i_a33_phy, +}; + +struct sun4i_usb_phy_cfg { + int num_phys; + u32 disc_thresh; + enum sun4i_usb_phy_type ty

Re: [linux-sunxi] Re: [PATCH v3 1/2] phy-sun4i-usb: Use of_match_node to get model specific config data

2015-11-27 Thread Maxime Ripard
On Thu, Nov 26, 2015 at 01:11:32PM +0100, Hans de Goede wrote: > >>+enum sun4i_usb_phy_type { > >>+ sun4i_a10_phy, > >>+ sun8i_a33_phy, > >>+}; > >>+ > >>+struct sun4i_usb_phy_cfg { > >>+ int num_phys; > >>+ u32 disc_thresh; > >>+ enum sun4i_usb_phy_type type; > >>+

Re: [linux-sunxi] Re: [PATCH v3 1/2] phy-sun4i-usb: Use of_match_node to get model specific config data

2015-11-26 Thread Hans de Goede
Hi, On 26-11-15 05:22, Chen-Yu Tsai wrote: On Thu, Nov 26, 2015 at 12:50 AM, Hans de Goede wrote: Use of_match_node instead of calling of_device_is_compatible a ton of times to get model specific config data. Signed-off-by: Hans de Goede --- Changes in v3: -New patch in v3 of this patch-set

Re: [linux-sunxi] Re: [PATCH v3 1/2] phy-sun4i-usb: Use of_match_node to get model specific config data

2015-11-25 Thread LABBE Corentin
On Thu, Nov 26, 2015 at 12:22:59PM +0800, Chen-Yu Tsai wrote: > On Thu, Nov 26, 2015 at 12:50 AM, Hans de Goede wrote: > > + > > static const unsigned int sun4i_usb_phy0_cable[] = { > > EXTCON_USB, > > EXTCON_USB_HOST, > > @@ -511,10 +578,16 @@ static int sun4i_usb_phy_probe(struc