Re: What driver for generic bulk to tty?

2013-03-20 Thread petr
this helps Petr On Wed, 20 Mar 2013 17:47:18 +0400, Sergei Organov wrote: Hi, What is recomended driver to use for a USB device that provides just 2 bulk end-points, in and out, to create a TTY to talk to it? Exact data formats that are used are application-specific, so only generic IO TTY-al

Re: What driver for generic bulk to tty?

2013-03-20 Thread petr
OK. Do you know the protocol? User space - use /proc entries. See Apogee CCD driver for an example, or ask me, I might be able to reveal parts of MI CCD driver which does that. Kernel space - see some existing (FTDI,..) drivers and write your own. Petr On Wed, 20 Mar 2013 18:41:41 +0400

Re: close blocks, if FIFO full on gagdet serial

2013-01-15 Thread Petr Masek
way, don't you think, taht 15 seconds is soo long timeout for flushing 8k buffer over usb? Even ordinary serial port set to 9600bd should transfer this amount of data twice. Would not 1s or even less do the job as well? Nevertheless, I guess, that we should discover, where the problem lies

[RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Petr Cvek
and changing it to new one. Signed-off-by: Petr Cvek --- drivers/usb/gadget/legacy/webcam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c index f9661cd627c8..988814f2e1c7 100644 --- a/drivers/usb/ga

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-23 Thread Petr Cvek
0x0102 EEM Gadget bcdDevice 4.07 iManufacturer 1 Linux Foundation iProduct2 Webcam gadget ... Best regards, Petr -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-01-24 Thread Petr Cvek
orage.ko anymore. > > Personally, I don't feel strongly about the legacy gadget > drivers. They're not really needed anymore as everything they do can be > done with configfs already. Perhaps we could schedule their removal for > v5.0? > If you want to remove legacy g_web

[BUG] usb: gadget: Kernel oops with UVC USB gadget and configfs

2017-01-24 Thread Petr Cvek
Setting the UVC gadget with configfs and then reloading UDC controler driver (pxa27x_udc) causes kernel to fail. UDC subsystem was patched only in decreasing maxpacket size for UVC, addition of more predefined endpoints for pxa27x_udc and addition of some debugging pr_info. Practically same beha

[PATCH] CB/CBI storage devices not working with CONFIG_VMAP_STACK=y

2016-11-10 Thread Petr Vandrovec
Hi, I've built 4.9.0-rc4 with CONFIG_VMAP_STACK=y, and while I can use bulk storage drives, I cannot use CB-based USB floppy drive: kernel complains (once) that DMA address is invalid, and after that log is full of device resets: Nov 7 12:18:42 petr-dev3 kernel: [ 25.929808] scsi 12:

[PATCH v2] Fix USB CB/CBI storage devices with CONFIG_VMAP_STACK=y

2016-11-10 Thread Petr Vandrovec
From: Petr Vandrovec Some code (all error handling) submits CDBs that are allocated on the stack. This breaks with CB/CBI code that tries to create URB directly from SCSI command buffer - which happens to be in vmalloced memory with vmalloced kernel stacks. Let's make copy of the comma

[PATCH 2/2] Drivers: MUSB: Davinci MUSB: added DT support

2016-01-21 Thread Petr Kulhavy
TI DaVinci MUSB driver equipped with DeviceTree support. Tested with AM1808 board and USB2.0 (OTG) in host mode. Signed-off-by: Petr Kulhavy --- .../devicetree/bindings/usb/da8xx-usb.txt | 52 +++ drivers/usb/musb/da8xx.c | 166

Re: [PATCH 2/2] Drivers: MUSB: Davinci MUSB: added DT support

2016-01-22 Thread Petr Kulhavy
are not the best bindings to take as an example. What would you recommend as a good example then? Regards Petr On 22.01.2016 00:07, Rob Herring wrote: On Thu, Jan 21, 2016 at 03:53:19PM +0100, Petr Kulhavy wrote: TI DaVinci MUSB driver equipped with DeviceTree support. Tested with AM1808 board

[PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-04 Thread Petr Kulhavy
TI DA8xx MUSB driver equipped with DeviceTree support. Tested with AM1808 board and USB2.0 (OTG) in host mode. Signed-off-by: Petr Kulhavy --- .../devicetree/bindings/usb/da8xx-usb.txt | 52 +++ drivers/usb/musb/da8xx.c | 166

Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-04 Thread Petr Kulhavy
d the driver can override it by calling dma_set_mask(). You're right these two lines can be completely removed as a) they are setting the wrong thing and b) platform_device_register_full() already sets the correct dma mask from the pinfo (in the original source file). I will prepare

[PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-05 Thread Petr Kulhavy
TI DA8xx MUSB driver equipped with DeviceTree support. Tested with AM1808 board and USB2.0 (OTG) in host mode. Signed-off-by: Petr Kulhavy --- .../devicetree/bindings/usb/da8xx-usb.txt | 63 drivers/usb/musb/da8xx.c | 162

Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-05 Thread Petr Kulhavy
ike this: static const struct of_device_id da8xx_id_table[] = { { .compatible = "ti,da850-musb" }, { .compatible = "ti,da830-musb" }, {}, }; MODULE_DEVICE_TABLE(of, da8xx_id_table); Thanks Petr -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-08 Thread Petr Kulhavy
hange of the da8xx USB and platform drivers. That's why I didn't go for that. Signed-off-by: Petr Kulhavy --- .../devicetree/bindings/usb/da8xx-usb.txt | 63 drivers/usb/musb/da8xx.c | 162 + include/linux/plat

Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-08 Thread Petr Kulhavy
+ +cfgchip2 = __raw_readl( +DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP2_REG)); That's why a PHY driver is needed. DA8XX_SYSCFG2_VIRT() shouldn't be used outside arch/arm/mach-davinci/. See above. Why are you not using CFGCHIP2 macro in this file as the

Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-08 Thread Petr Kulhavy
't seem to use it, it's used by the ohci-da8xx driver.I will do. Why doesn't the musb core use directly the USB_DR_MODE_xxx literals instead? MUSB driver predates these (DT specific?) definitions IIRC... Would it make sense to replace it with the newer USB_DR_MODE_xxx ? Pe

Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-08 Thread Petr Kulhavy
mentation/devicetree/bindings/ |wc -l 44 so better use specific model names in case we later find something that is different betweent the models. OK, thanks. Regards Petr -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majo

Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-08 Thread Petr Kulhavy
What shall we do? Regards Petr On 08.02.2016 13:25, Sergei Shtylyov wrote: On 2/8/2016 2:48 PM, Petr Kulhavy wrote: And the patch is against 3.17? You should only submit patches against the recent kernel. In this case, against the -next branch of Felipe's repo on kernel.org. Could you g

Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-09 Thread Petr Kulhavy
On 08.02.2016 18:55, Sergei Shtylyov wrote: On 02/08/2016 06:32 PM, Petr Kulhavy wrote: I have prepared the patch as per you comments. Unfortunately I cannot use the 4.5 kernel from Felipe's repo as the of_usb_get_dr_mode() has been replaced with of_usb_get_dr_mode_by_phy() which requi

[PATCH 2/2] USB: musb: DA8xx: Add DT support for the DA8xx driver

2016-02-09 Thread Petr Kulhavy
Adds DT support for the TI DA830 and DA850 USB driver. Signed-off-by: Petr Kulhavy --- drivers/usb/musb/da8xx.c | 136 +++ drivers/usb/musb/musb_core.c | 24 drivers/usb/musb/musb_core.h | 2 + 3 files changed, 162 insertions(+) diff

Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-10 Thread Petr Kulhavy
submitted the (hopefully) final version version of the patch based on Felipe's "next" branch and incorporating all you guys' feedback. Also the binding was submitted separately. Please let me know if anything else needs to be amended. Thanks Petr -- To unsubscribe from this list: s

Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support

2016-02-10 Thread Petr Kulhavy
rint the linux-usb list. I'm sorry! :-7 But sure, next time I'll copy the list as well. Petr -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 2/2] USB: musb: DA8xx: Add DT support for the DA8xx driver

2016-02-10 Thread Petr Kulhavy
Hello Sergei, On 10.02.2016 15:05, Sergei Shtylyov wrote: @@ -1,6 +1,9 @@ /* * Texas Instruments DA8xx/OMAP-L1x "glue layer" * + * DT support + * Copyright (c) 2016 Petr Kulhavy, Barix AG + * Could you place this after MV's copyright? I was trying to preserve

[PATCH 1/5] dt/bindings: Add binding for the DA8xx MUSB driver

2016-02-11 Thread Petr Kulhavy
This adds DT support for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. Signed-off-by: Petr Kulhavy --- .../devicetree/bindings/usb/da8xx-usb.txt | 47 ++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/da8xx-usb.txt

[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 +

[PATCH 5/5] usb: musb: core: added missing const qualifier to the config pointer in platform data

2016-02-11 Thread Petr Kulhavy
s added to protect the content of the config. Signed-off-by: Petr Kulhavy --- drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_core.h | 2 +- include/linux/usb/musb.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/driver

[PATCH 3/5] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-02-11 Thread Petr Kulhavy
This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver Signed-off-by: Petr Kulhavy --- drivers/usb/musb/da8xx.c | 88 1 file changed, 88 insertions(+) diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index b03d3b8

[PATCH 4/5] ARM: davinci: defined missing CFGCHIP2_REFFREQ_* macros in platform_data

2016-02-11 Thread Petr Kulhavy
Only few MUSB PHY PLL frequencies were defined. This patch defines macros for the missing frequencies: 19.2MHz, 38.4MHz, 13MHz, 26MHz, 20MHz, 40MHz Signed-off-by: Petr Kulhavy --- include/linux/platform_data/usb-davinci.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux

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

2016-02-11 Thread Petr Kulhavy
ork w/o specifying 'clock' BTW?). I'd suggest a larger function, assigning directly to the platform data fields... Is there a property already defined for the min_power? The clock doesn't seem to be used at all. Or did I miss something? Petr -- To unsubscribe from this lis

[PATCH 3/5] usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config

2016-02-11 Thread Petr Kulhavy
the content of the config. Signed-off-by: Petr Kulhavy --- drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_core.h | 2 +- include/linux/usb/musb.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index

Re: [PATCH 1/5] dt/bindings: Add binding for the DA8xx MUSB driver

2016-02-11 Thread Petr Kulhavy
da8xx? Petr -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2016-02-11 Thread Petr Kulhavy
there a property already defined for the min_power? No, not yet. Shall I define one? For instance "mentor,min_power" ? Or "mentor,device_power" ? Petr -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to

[PATCH 1/5] dt/bindings: Add binding for the DA8xx MUSB driver

2016-02-12 Thread Petr Kulhavy
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. Signed-off-by: Petr Kulhavy --- .../devicetree/bindings/usb/da8xx-usb.txt | 47 ++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/da8xx-usb.txt diff --git a

[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 +

[PATCH 5/5] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-02-12 Thread Petr Kulhavy
This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver Signed-off-by: Petr Kulhavy --- drivers/usb/musb/da8xx.c | 87 1 file changed, 87 insertions(+) diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index b03d3b8

Re: [PATCH 3/5] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-02-12 Thread Petr Kulhavy
Hello Sergei, I have just resent the 4 patches with the changes. The one you've already acknowledged I left out. Hope now everything is ok. Regards Petr -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.

[PATCH 3/5] usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config

2016-02-12 Thread Petr Kulhavy
content of the config. Signed-off-by: Petr Kulhavy --- drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_core.h | 2 +- include/linux/usb/musb.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index

[PATCH 4/5] ARM: davinci: defined missing CFGCHIP2_REFFREQ_* macros in platform_data

2016-02-12 Thread Petr Kulhavy
Only few MUSB PHY PLL frequencies were defined. This patch defines macros for the missing frequencies: 19.2MHz, 38.4MHz, 13MHz, 26MHz, 20MHz, 40MHz Signed-off-by: Petr Kulhavy --- include/linux/platform_data/usb-davinci.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/linux

Re: [PATCH 3/5] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-02-12 Thread Petr Kulhavy
On 12.02.2016 17:22, Sergei Shtylyov wrote: On 02/12/2016 06:01 PM, Petr Kulhavy wrote: I have just resent the 4 patches with the changes. The one you've already acknowledged I left out. Hope now everything is ok. Please always post the whole series, else the maintainers will ha

Re: [PATCH 1/5] dt/bindings: Add binding for the DA8xx MUSB driver

2016-02-12 Thread Petr Kulhavy
On 12.02.2016 17:21, Rob Herring wrote: On Thu, Feb 11, 2016 at 12:01:06PM +0100, Petr Kulhavy wrote: + - mentor,power : Specifies the maximum current in milliamperes the controller can + supply in host mode. Still a no for me. Looks like this just sets hcd->power_budget. This prope

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

2016-02-15 Thread Petr Kulhavy
s anyway. Kind of... What is the rule of thumb here? Regards Petr -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 1/5] dt/bindings: Add binding for the DA8xx MUSB driver

2016-02-16 Thread Petr Kulhavy
Hello Rob, is there any follow-up on this one? Thanks Petr On 12.02.2016 18:24, Petr Kulhavy wrote: On 12.02.2016 17:21, Rob Herring wrote: On Thu, Feb 11, 2016 at 12:01:06PM +0100, Petr Kulhavy wrote: + - mentor,power : Specifies the maximum current in milliamperes the controller can

Re: [PATCH 1/5] dt/bindings: Add binding for the DA8xx MUSB driver

2016-02-17 Thread Petr Kulhavy
Hello Rob, On 16.02.2016 21:05, Rob Herring wrote: On Fri, Feb 12, 2016 at 11:24 AM, Petr Kulhavy wrote: I understand your point that the description should be generic. However the USB 2.0 specification does not define any relation between the bMaxPower provided by the device and the actual

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 fixing

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

2016-02-24 Thread Petr Kulhavy
d that should do the job. I agree there won't be likely too many new MUSB designs anyway. Regards Petr -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/5 v7] dt/bindings: Add binding for the DA8xx MUSB driver

2016-02-24 Thread Petr Kulhavy
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. Signed-off-by: Petr Kulhavy --- v1: v2: - using standard properties "dr_mode", "mentor,power", "mentor,num-eps", "mentor,multipoint", "mentor,ram-bits" - using "ti,"

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

2016-02-24 Thread Petr Kulhavy
This adds two functions to get DT properties "mentor,power" and "dr_mode": musb_get_power() and musb_get_mode() Signed-off-by: Petr Kulhavy --- v4: - created musb_get_dr_mode() v5: - musb_get_dr_mode() renamed to musb_get_mode() - added musb_get_power() v6: - musb

[PATCH 5/5 v7] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-02-24 Thread Petr Kulhavy
This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver Signed-off-by: Petr Kulhavy Tested-by: Petr Kulhavy Acked-by: Sergei Shtylyov --- v1: v2: - using standard MUSB properties "dr_mode", "mentor,power", "mentor,num-eps", "mentor,multipoi

[PATCH 3/5 v7] usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config

2016-02-24 Thread Petr Kulhavy
content of the config. Signed-off-by: Petr Kulhavy Acked-by: Sergei Shtylyov --- v5: v6: - whitespace formatting corrected v7: drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_core.h | 2 +- include/linux/usb/musb.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions

[PATCH 4/5 v7] ARM: davinci: defined missing CFGCHIP2_REFFREQ_* macros for MUSB PHY

2016-02-24 Thread Petr Kulhavy
Only few MUSB PHY reference clock frequencies were defined. This patch defines macros for the missing frequencies: 19.2MHz, 38.4MHz, 13MHz, 26MHz, 20MHz, 40MHz Signed-off-by: Petr Kulhavy Acked-by: Sergei Shtylyov --- v5: v6: v7: include/linux/platform_data/usb-davinci.h | 6 ++ 1

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

2016-02-24 Thread Petr Kulhavy
ns 0 + */ +extern u8 musb_get_power(struct device *dev); +#endif + Now that you hard-coded the value, you don't need this function any more. I have left it there so it can be used by the other drivers. Petr -- To unsubscribe from this list: send the line "unsubscribe linux-usb"

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

2016-02-25 Thread Petr Kulhavy
On 24.02.2016 18:30, Sergei Shtylyov wrote: On 02/24/2016 08:10 PM, Petr Kulhavy wrote: +#if IS_ENABLED(CONFIG_OF) +/* gets the "mentor,power" property from DT + * and converts it from mA to 2mA units for the "power" parameter + * in struct musb_hdrc_platform_data

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

2016-02-25 Thread Petr Kulhavy
d. There already 3 opinions at the moment: 1) hard code - Felipe, Rob 2) use the "mentor,power" - Sergei, Petr 3) use a regulator - Rob So unless this conflict is resolved it is slightly difficult to submit a patch that would get accepted. How can we resolve this conflict ? Regar

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

2016-02-26 Thread Petr Kulhavy
On 26.02.2016 04:15, Bin Liu wrote: On Thu, Feb 25, 2016 at 01:04:13PM +0100, Petr Kulhavy wrote: Well, so we're still at the same point - there is a fundamental mismatch in the different developers' view how the "power" parameter should be represented. There already 3 op

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

2016-02-29 Thread Petr Kulhavy
On 26.02.2016 15:23, Bin Liu wrote: Hi, On Fri, Feb 26, 2016 at 10:29:12AM +0100, Petr Kulhavy wrote: On 26.02.2016 04:15, Bin Liu wrote: On Thu, Feb 25, 2016 at 01:04:13PM +0100, Petr Kulhavy wrote: Well, so we're still at the same point - there is a fundamental mismatch in the diff

[PATCH, RFC] USB: Gadget: UVC: Add missing call for additional setup data

2016-08-07 Thread Petr Cvek
Some UVC commands require additional data (non zero uvc->event_length). Add usb_ep_queue() call, so uvc_function_ep0_complete() can be called and send received data to the userspace. Signed-off-by: Petr Cvek --- drivers/usb/gadget/function/f_uvc.c | 7 +++ 1 file changed, 7 inserti

[PATCH] USB: Gadget: UVC: Add missing call for additional setup data

2016-08-17 Thread Petr Cvek
Some UVC commands require additional data (non zero uvc->event_length). Add usb_ep_queue() call, so uvc_function_ep0_complete() can be called and send received data to the userspace. Signed-off-by: Petr Cvek --- drivers/usb/gadget/function/f_uvc.c | 7 +++ 1 file changed, 7 inserti

[PATCH 3/5 v8] usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config

2016-03-07 Thread Petr Kulhavy
content of the config. Signed-off-by: Petr Kulhavy Acked-by: Sergei Shtylyov Signed-off-by: Bin Liu --- v5: v6: - whitespace formatting corrected v7: v8: drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_core.h | 2 +- include/linux/usb/musb.h | 2 +- 3 files changed, 3

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

2016-03-07 Thread Petr Kulhavy
This adds the function musb_get_mode() to get the DT property "dr_mode" Signed-off-by: Petr Kulhavy --- v4: - created musb_get_dr_mode() v5: - musb_get_dr_mode() renamed to musb_get_mode() - added musb_get_power() v6: - musb_get_power() : added missing boundary check for the max

[PATCH 4/5 v8] ARM: davinci: defined missing CFGCHIP2_REFFREQ_* macros for MUSB PHY

2016-03-07 Thread Petr Kulhavy
Only few MUSB PHY reference clock frequencies were defined. This patch defines macros for the missing frequencies: 19.2MHz, 38.4MHz, 13MHz, 26MHz, 20MHz, 40MHz Signed-off-by: Petr Kulhavy Acked-by: Sergei Shtylyov Signed-off-by: Bin Liu --- v5: v6: v7: v8: include/linux/platform_data

[PATCH 5/5 v8] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-03-07 Thread Petr Kulhavy
This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver Signed-off-by: Petr Kulhavy Tested-by: Petr Kulhavy Acked-by: Sergei Shtylyov --- v1: v2: - using standard MUSB properties "dr_mode", "mentor,power", "mentor,num-eps", "mentor,multipoi

[PATCH 1/5 v8] dt/bindings: Add binding for the DA8xx MUSB driver

2016-03-07 Thread Petr Kulhavy
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. Signed-off-by: Petr Kulhavy --- v1: v2: - using standard properties "dr_mode", "mentor,power", "mentor,num-eps", "mentor,multipoint", "mentor,ram-bits" - using "ti,"

Re: [PATCH 5/5 v8] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-03-07 Thread Petr Kulhavy
Hello On 07.03.2016 14:29, Sergei Shtylyov wrote: Hello. On 3/7/2016 2:20 PM, Petr Kulhavy wrote: @@ -544,17 +643,25 @@ static int da8xx_probe(struct platform_device *pdev) pinfo.data = pdata; pinfo.size_data = sizeof(*pdata); +ret = regulator_enable(glue->vbus_sup

Re: [PATCH 5/5 v8] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-03-08 Thread Petr Kulhavy
On 07.03.2016 18:56, Sergei Shtylyov wrote: On 03/07/2016 07:08 PM, Petr Kulhavy wrote: Hello On 07.03.2016 14:29, Sergei Shtylyov wrote: Hello. On 3/7/2016 2:20 PM, Petr Kulhavy wrote: @@ -544,17 +643,25 @@ static int da8xx_probe(struct platform_device *pdev) pinfo.data = pdata

[PATCH 1/5 v9] dt/bindings: Add binding for the DA8xx MUSB driver

2016-03-09 Thread Petr Kulhavy
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. Signed-off-by: Petr Kulhavy --- v1: v2: - using standard properties "dr_mode", "mentor,power", "mentor,num-eps", "mentor,multipoint", "mentor,ram-bits" - using "ti,"

[PATCH 3/5 v9] usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config

2016-03-09 Thread Petr Kulhavy
content of the config. Signed-off-by: Petr Kulhavy Acked-by: Sergei Shtylyov Signed-off-by: Bin Liu --- v5: v6: - whitespace formatting corrected v7: v8: v9: drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_core.h | 2 +- include/linux/usb/musb.h | 2 +- 3 files changed, 3

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

2016-03-09 Thread Petr Kulhavy
This adds the function musb_get_mode() to get the DT property "dr_mode" Signed-off-by: Petr Kulhavy --- v4: - created musb_get_dr_mode() v5: - musb_get_dr_mode() renamed to musb_get_mode() - added musb_get_power() v6: - musb_get_power() : added missing boundary check for the max

[PATCH 4/5 v9] ARM: davinci: defined missing CFGCHIP2_REFFREQ_* macros for MUSB PHY

2016-03-09 Thread Petr Kulhavy
Only few MUSB PHY reference clock frequencies were defined. This patch defines macros for the missing frequencies: 19.2MHz, 38.4MHz, 13MHz, 26MHz, 20MHz, 40MHz Signed-off-by: Petr Kulhavy Acked-by: Sergei Shtylyov Signed-off-by: Bin Liu --- v5: v6: v7: v8: v9: include/linux

[PATCH 5/5 v9] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-03-09 Thread Petr Kulhavy
This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver Signed-off-by: Petr Kulhavy Tested-by: Petr Kulhavy --- v1: v2: - using standard MUSB properties "dr_mode", "mentor,power", "mentor,num-eps", "mentor,multipoint", "mentor,ram-

Re: [PATCH 5/5 v9] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-03-10 Thread Petr Kulhavy
On 09.03.2016 21:00, Bin Liu wrote: Hi, On Wed, Mar 09, 2016 at 10:25:27AM +0100, Petr Kulhavy wrote: +static inline int get_phy_refclk_cfg(struct device_node *np) +{ + u32 freq; + + if (of_property_read_u32(np, "ti,usb2-phy-refclock-hz", &freq)) +

Re: [PATCH 5/5 v9] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-03-10 Thread Petr Kulhavy
On 09.03.2016 12:53, Sergei Shtylyov wrote: Hello. On 3/9/2016 12:25 PM, Petr Kulhavy wrote: This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver Signed-off-by: Petr Kulhavy Tested-by: Petr Kulhavy [...] diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c

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

2016-03-11 Thread Petr Kulhavy
This adds the function musb_get_mode() to get the DT property "dr_mode" Signed-off-by: Petr Kulhavy Acked-by: Sergei Shtylyov --- v4: - created musb_get_dr_mode() v5: - musb_get_dr_mode() renamed to musb_get_mode() - added musb_get_power() v6: - musb_get_power() : added missin

[PATCH 5/5 v10] usb: musb: da8xx: Add DT support for the DA8xx driver

2016-03-11 Thread Petr Kulhavy
This adds DT support for TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver Signed-off-by: Petr Kulhavy Tested-by: Petr Kulhavy --- v1: v2: - using standard MUSB properties "dr_mode", "mentor,power", "mentor,num-eps", "mentor,multipoint", "mentor,ram-

[PATCH 4/5 v10] ARM: davinci: defined missing CFGCHIP2_REFFREQ_* macros for MUSB PHY

2016-03-11 Thread Petr Kulhavy
Only few MUSB PHY reference clock frequencies were defined. This patch defines macros for the missing frequencies: 19.2MHz, 38.4MHz, 13MHz, 26MHz, 20MHz, 40MHz Signed-off-by: Petr Kulhavy Acked-by: Sergei Shtylyov Signed-off-by: Bin Liu --- v5: v6: v7: v8: v9: v10: include/linux

[PATCH 1/5 v10] dt/bindings: Add binding for the DA8xx MUSB driver

2016-03-11 Thread Petr Kulhavy
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. Signed-off-by: Petr Kulhavy --- v1: v2: - using standard properties "dr_mode", "mentor,power", "mentor,num-eps", "mentor,multipoint", "mentor,ram-bits" - using "ti,"

[PATCH 3/5 v10] usb: musb: core: added missing const qualifier to musb_hdrc_platform_data::config

2016-03-11 Thread Petr Kulhavy
content of the config. Signed-off-by: Petr Kulhavy Acked-by: Sergei Shtylyov Signed-off-by: Bin Liu --- v5: v6: - whitespace formatting corrected v7: v8: v9: v10: drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_core.h | 2 +- include/linux/usb/musb.h | 2 +- 3 files

Re: [PATCH 1/5 v10] dt/bindings: Add binding for the DA8xx MUSB driver

2016-03-11 Thread Petr Kulhavy
On 11.03.2016 16:51, Bin Liu wrote: Hi, On Fri, Mar 11, 2016 at 09:29:45AM +0100, Petr Kulhavy wrote: DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. It seems the dts(i) file is not touched in this patch set, so DA8xx MUSB still does not use DT with these patches? Or did I

Re: [PATCH 1/5 v10] dt/bindings: Add binding for the DA8xx MUSB driver

2016-03-11 Thread Petr Kulhavy
On 11.03.2016 17:06, Bin Liu wrote: Hi, On Fri, Mar 11, 2016 at 04:58:52PM +0100, Petr Kulhavy wrote: On 11.03.2016 16:51, Bin Liu wrote: Hi, On Fri, Mar 11, 2016 at 09:29:45AM +0100, Petr Kulhavy wrote: DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx MUSB driver. It seems the dts(i

Re: [PATCH 1/5 v10] dt/bindings: Add binding for the DA8xx MUSB driver

2016-03-19 Thread Petr Kulhavy
On 11.03.2016 19:24, Sergei Shtylyov wrote: On 03/11/2016 07:21 PM, Petr Kulhavy wrote: I am having 2nd thought on parsing the clock prop, Sergei's comment might be better. I will look more on this over this weekend. (DT is not in my expertise...) Regards, -Bin. I like Sergei's

Re: [PATCH 1/5 v10] dt/bindings: Add binding for the DA8xx MUSB driver

2016-04-04 Thread Petr Kulhavy
working on getting the da8xx ohci driver working with device tree. It has similar clock issues (in fact, the ohci clock is a child of the musb clock). Petr, give me a day or two and will have post some patches. It will have a clock that can be used here for clk_get_rate(). Hi David, I'm

Re: [BUG] usb: gadget: Kernel oops with UVC USB gadget and configfs

2017-02-05 Thread Petr Cvek
Dne 4.2.2017 v 23:42 Robert Jarzmik napsal(a): > Petr Cvek writes: > >> Setting the UVC gadget with configfs and then reloading UDC controler driver >> (pxa27x_udc) causes kernel to fail. >> >> UDC subsystem was patched only in decreasing maxpacket size for UVC,

Re: [BUG] usb: gadget: Kernel oops with UVC USB gadget and configfs

2017-02-11 Thread Petr Cvek
Hi any news? Petr Dne 4.2.2017 v 23:42 Robert Jarzmik napsal(a): > Petr Cvek writes: > >> Setting the UVC gadget with configfs and then reloading UDC controler driver >> (pxa27x_udc) causes kernel to fail. >> >> UDC subsystem was patched only in decreasing ma

Re: [BUG] usb: gadget: Kernel oops with UVC USB gadget and configfs

2017-02-12 Thread Petr Cvek
Dne 12.2.2017 v 13:02 Robert Jarzmik napsal(a): > Petr Cvek writes: > >> Hi >> >> any news? > > Yeah, I don't have the error on my mainstone, which kind of hinders my debug > capability. > > I have tried your script, and this is what I get : >

[RFC] usb: gadget: scheduling while atomic in pxa27x_udc, IS_ERR_OR_NULL test, duplicated definition

2017-02-21 Thread Petr Cvek
it have to return from a first branch (e.g. my device does not have phy)? And finally it seems definitions from drivers/usb/gadget/udc/pxa27x_udc.c are duplicated: static void udc_enable(struct pxa_udc *udc); static void udc_disable(struct pxa_udc *udc); I will send patch serie

[PATCH 0/2] usb: gadget: Fixes for pxa27x_udc

2017-02-22 Thread Petr Cvek
Two simple fixes for pxa27x gadget UDC. First one remove function declaration duplication, second one add test for a valid pointer before function call as it can be called with an error value in the pointer. Petr Cvek (2): [TRIVIAL] usb: gadget: Remove duplicated function declaration in

[PATCH 2/2] usb: gadget: Add test if argument pointer has a valid value in pxa27x_udc

2017-02-22 Thread Petr Cvek
Move call usb_put_phy(udc->transceiver) inside a valid pointer test. Reported-by: robert.jarz...@free.fr Signed-off-by: Petr Cvek --- drivers/usb/gadget/udc/pxa27x_udc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/

[PATCH 1/2] [TRIVIAL] usb: gadget: Remove duplicated function declaration in pxa27x_udc

2017-02-22 Thread Petr Cvek
Remove duplicated function declaration for udc_enable() and udc_disable(). Signed-off-by: Petr Cvek --- drivers/usb/gadget/udc/pxa27x_udc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c index 7fa60f5b7ae4

Re: [RFC] usb: gadget: scheduling while atomic in pxa27x_udc, IS_ERR_OR_NULL test, duplicated definition

2017-02-22 Thread Petr Cvek
Dne 22.2.2017 v 21:46 Robert Jarzmik napsal(a): > Petr Cvek writes: > > Hi Petr, > >> I found a few problems with the PXA27x UDC. >> >> usb_function_activate() in drivers/usb/gadget/composite.c >> >> does spin_lock_irqsave() and then calls >&

[PATCH v2 0/2] usb: gadget: pxa27x: Duplicated definition and valid pointer fixes

2017-02-23 Thread Petr Cvek
Two simple fixes for pxa27x gadget UDC. First one remove function declaration duplication, second one add test for a valid pointer before function call as it can be called with an error value in the pointer. Changes from v1: * Shorter titles, corrected Robert Jarzmik's signature Petr Cv

[PATCH v2 1/2] usb: gadget: pxa27x: Remove duplicate function prototype

2017-02-23 Thread Petr Cvek
Functions udc_enable() and udc_disable() have a duplicated prototype. Remove it. Signed-off-by: Petr Cvek --- drivers/usb/gadget/udc/pxa27x_udc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c index e1335ad5bce9

[PATCH v2 2/2] usb: gadget: pxa27x: Test for a valid argument pointer

2017-02-23 Thread Petr Cvek
A call usb_put_phy(udc->transceiver) must be tested for a valid pointer. Use an already existing test for usb_unregister_notifier call. Reported-by: Robert Jarzmik Signed-off-by: Petr Cvek --- drivers/usb/gadget/udc/pxa27x_udc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) d

Re: usb: gadget: webcam broken?

2017-03-01 Thread Petr Cvek
the control endpoint. >> >> If I revert the following commit everything works fine. >> commit 4fbac5206afd01b717d4bdc58793d471f3391b4b >> Author: Petr Cvek >> Date: Wed Aug 17 12:36:57 2016 +0200 >> >> usb: gadget: uvc: Add missing call for addition

Re: [RFC] usb: gadget: uvc: webcam gadget USB PID is using value from a different gadget

2017-03-06 Thread Petr Cvek
Dne 24.1.2017 v 19:20 Felipe Balbi napsal(a): > > Hi, > > Petr Cvek writes: >>> Greg KH writes: >>>>>>> fine by me. Just lsusb will look funky ;-) >>>>>> >>>>>> Heh, true, but I thought lsusb would use a string if t

Re: usb: gadget: webcam broken?

2017-03-06 Thread Petr Cvek
Dne 2.3.2017 v 09:19 Roger Quadros napsal(a): > Petr, > > On 02/03/17 06:57, Petr Cvek wrote: >> Dne 2.3.2017 v 00:22 Laurent Pinchart napsal(a): >>> Hi Roger, >>> >>> On Wednesday 01 Mar 2017 17:09:51 Roger Quadros wrote: >>>> Hi, >>&

Re: [PATCH] usb: gadget: uvc: Missing files for configfs interface

2017-03-06 Thread Petr Cvek
Dne 7.3.2017 v 06:58 Laurent Pinchart napsal(a): > Hi Petr, > > Thank you for the patch. > > On Tuesday 07 Mar 2017 00:57:20 Petr Cvek wrote: >> Commit 76e0da34c7ce ("usb-gadget/uvc: use per-attribute show and store >> methods") caused a stringification

[PATCH] usb: gadget: uvc: Missing files for configfs interface

2017-03-07 Thread Petr Cvek
inition of "aname" to the main macro and name the filenames as originaly intended. Signed-off-by: Petr Cvek --- drivers/usb/gadget/function/uvc_configfs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/dr

usb: gadget: pxa27x_udc: race condition with g_webcam

2017-03-08 Thread Petr Cvek
guments depends on an actual configuration). /*g_webcam*/ PXA_EP_IN_INT(7,1, 3, 0, 0), PXA_EP_IN_ISO(8,4, 3, 1, 1), [1] http://elixir.free-electrons.com/source/drivers/usb/gadget/udc/pxa27x_udc.c?v=4.10#L2004 [2] https://github.com/madscientist42/uvc-gadget/co

[solution] usb: gadget: uvc: configfs: fails to enumerate in HOST

2017-03-08 Thread Petr Cvek
) were named "aname". Add the definition of "aname" to the main macro and name the filenames as originaly intended. Signed-off-by: Petr Cvek --- drivers/usb/gadget/function/uvc_configfs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers

  1   2   >