Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-24 Thread Felipe Balbi
Petr Kulhavy writes: > On 18.02.2016 09:18, Felipe Balbi wrote: >> >>> Hi Felipe, >>> >>> I will do as soon as the patch 1/5 gets approved. >>> It seem to be a bit stuck at the moment as Rob Herring from the DT wants >>> the "mentor,power" >>> to be represented as a regulator,

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-24 Thread Petr Kulhavy
On 18.02.2016 09:18, Felipe Balbi wrote: Hi Felipe, I will do as soon as the patch 1/5 gets approved. It seem to be a bit stuck at the moment as Rob Herring from the DT wants the "mentor,power" to be represented as a regulator, whereas Sergei and me want to stick to the existing

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-19 Thread Bin Liu
Hi, On Fri, Feb 12, 2016 at 03:58:40PM +0100, Petr Kulhavy wrote: > This adds two functions to get DT properties "mentor,power" and "dr_mode": > musb_get_power() and musb_mode musb_get_mode() Please add revision # in the [PATCH...] prefix in subject. > > Signed-off-by: Petr Kulhavy

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-19 Thread Bin Liu
Hi, On Fri, Feb 19, 2016 at 02:08:37PM +0200, Felipe Balbi wrote: > > Hi, > > Sergei Shtylyov writes: > > On 2/19/2016 10:23 AM, Felipe Balbi wrote: > > > >>> This adds two functions to get DT properties "mentor,power" and > >>> "dr_mode": > >>>

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-19 Thread Felipe Balbi
Hi, Sergei Shtylyov writes: > On 2/19/2016 10:23 AM, Felipe Balbi wrote: > >>> This adds two functions to get DT properties "mentor,power" and >>> "dr_mode": >>> musb_get_power() and musb_mode musb_get_mode() >>> >>> Signed-off-by: Petr

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-19 Thread Sergei Shtylyov
On 2/19/2016 10:23 AM, Felipe Balbi wrote: This adds two functions to get DT properties "mentor,power" and "dr_mode": musb_get_power() and musb_mode musb_get_mode() Signed-off-by: Petr Kulhavy seems like I don't have patch 1/5. After fixing Sergei's comments, please resend

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-18 Thread Felipe Balbi
Hi, Sergei Shtylyov writes: > On 02/18/2016 11:18 AM, Felipe Balbi wrote: > > This adds two functions to get DT properties "mentor,power" and "dr_mode": > musb_get_power() and musb_mode musb_get_mode() > > Signed-off-by: Petr Kulhavy

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-18 Thread Sergei Shtylyov
On 02/18/2016 11:18 AM, Felipe Balbi wrote: This adds two functions to get DT properties "mentor,power" and "dr_mode": musb_get_power() and musb_mode musb_get_mode() Signed-off-by: Petr Kulhavy seems like I don't have patch 1/5. After fixing Sergei's comments, please resend

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-18 Thread Felipe Balbi
Hi, Petr Kulhavy writes: > On 17.02.2016 15:58, Felipe Balbi wrote: >> Hi, >> >> Petr Kulhavy writes: >>> This adds two functions to get DT properties "mentor,power" and "dr_mode": >>> musb_get_power() and musb_mode musb_get_mode() >>> >>> Signed-off-by: Petr

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-17 Thread Petr Kulhavy
On 17.02.2016 15:58, Felipe Balbi wrote: Hi, Petr Kulhavy writes: This adds two functions to get DT properties "mentor,power" and "dr_mode": musb_get_power() and musb_mode musb_get_mode() Signed-off-by: Petr Kulhavy seems like I don't have patch 1/5. After

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-17 Thread Felipe Balbi
Hi, Petr Kulhavy writes: > This adds two functions to get DT properties "mentor,power" and "dr_mode": > musb_get_power() and musb_mode musb_get_mode() > > Signed-off-by: Petr Kulhavy seems like I don't have patch 1/5. After fixing Sergei's comments, please

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-15 Thread Petr Kulhavy
Hello Sergei On 12.02.2016 18:50, Sergei Shtylyov wrote: +/* gets the "dr_mode" property from DT and converts it into musb_mode + * if the property is not found returns MUSB_UNDEFINED + */ +extern enum musb_mode musb_get_mode(struct device *dev); + +#if IS_ENABLED(CONFIG_OF) +/* gets the

[PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-12 Thread Petr Kulhavy
This adds two functions to get DT properties "mentor,power" and "dr_mode": musb_get_power() and musb_mode musb_get_mode() Signed-off-by: Petr Kulhavy --- drivers/usb/musb/musb_core.c | 37 + drivers/usb/musb/musb_core.h | 20

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-12 Thread Sergei Shtylyov
On 02/12/2016 05:58 PM, Petr Kulhavy wrote: This adds two functions to get DT properties "mentor,power" and "dr_mode": musb_get_power() and musb_mode musb_get_mode() s/musb_mode//. Signed-off-by: Petr Kulhavy [...] diff --git a/drivers/usb/musb/musb_core.h

[PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-11 Thread Petr Kulhavy
This adds two functions to get DT properties "mentor,power" and "dr_mode": musb_get_power() and musb_mode musb_get_mode() Signed-off-by: Petr Kulhavy --- drivers/usb/musb/musb_core.c | 36 drivers/usb/musb/musb_core.h | 13 + 2

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-11 Thread Petr Kulhavy
On 11.02.2016 15:05, Sergei Shtylyov wrote: +int ret; +unsigned power_ma; + +/* the "mentor,power" value is in milliamperes, whereas + * the mentor configuration is in 2mA units + */ +ret = of_property_read_u32(dev->of_node, "mentor,power", _ma); + +return ret ? 0

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-11 Thread Petr Kulhavy
On 11.02.2016 18:33, Sergei Shtylyov wrote: Actually, we also have UDC specific 'min_power' field and a number of other fields (does it really work w/o specifying 'clock' BTW?). I'd suggest a larger function, assigning directly to the platform data fields... Is there a property already

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-11 Thread Sergei Shtylyov
On 02/11/2016 08:55 PM, Petr Kulhavy wrote: Actually, we also have UDC specific 'min_power' field and a number of other fields (does it really work w/o specifying 'clock' BTW?). I'd suggest a larger function, assigning directly to the platform data fields... Is there a property already

Re: [PATCH 2/5] usb: musb: core: added helper functions for parsing DT

2016-02-11 Thread Sergei Shtylyov
On 02/11/2016 05:28 PM, Petr Kulhavy wrote: [...] +} +EXPORT_SYMBOL_GPL(musb_get_power); + [...] Actually, we also have UDC specific 'min_power' field and a number of other fields (does it really work w/o specifying 'clock' BTW?). I'd suggest a larger function, assigning directly to the