- 15 8月, 2017 36 次提交
-
-
由 Baolin Wang 提交于
Integrate with the newly added USB charger interface to limit the current we draw from the USB input based on the input device configuration identified by the USB stack, allowing us to charge more quickly from high current inputs without drawing more current than specified from others. Signed-off-by: NMark Brown <broonie@kernel.org> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Acked-by: NLee Jones <lee.jones@linaro.org> Acked-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Baolin Wang 提交于
This patch introduces the usb charger support based on usb phy that makes an enhancement to a power driver. The basic conception of the usb charger is that, when one usb charger is added or removed by reporting from the extcon device state change, the usb charger will report to power user to set the current limitation. Power user can register a notifiee on the usb phy by issuing usb_register_notifier() to get notified by charger status changes or charger current changes. we can notify what current to be drawn to power user according to different charger type, and now we have 2 methods to get charger type. One is get charger type from extcon subsystem, which also means the charger state changes. Another is we can get the charger type from USB controller detecting or PMIC detecting, and the charger state changes should be told by issuing usb_phy_set_charger_state(). Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Baolin Wang 提交于
Introducing USB charger type and state definition can help to support USB charging which will be added in USB phy core. Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Jerry Zhang 提交于
Users can apply i/o in the wrong direction on an endpoint to stall it. In case there is an error that does not allow the endpoint to be stalled, we want the user to know. An operation to stall the endpoint will return EBADMSG if successful, EAGAIN if there are still queued requests, and other errors depending on the underlying implementation. Also remove the conditional since it is always true. Acked-by: NMichal Nazarewicz <mina86@mina86.com> Signed-off-by: NJerry Zhang <zhangjerry@google.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Al Cooper 提交于
If a phy is specified in the device tree node, get it and use it. This was based on a patch by: "Srinath Mannam <srinath.mannam@broadcom.com>" Signed-off-by: NAl Cooper <alcooperx@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Al Cooper 提交于
Many ARM based Broadcom STB SoC's have a USB BDC controller so enable this driver for these systems. Signed-off-by: NAl Cooper <alcooperx@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Al Cooper 提交于
This patch essentially clears the port status change bits at the correct times. It is necessary because the driver was not handling the change bits correctly for events during device connection/disconnection and bus enumeration. So, one of them (PCC) was left stuck sometimes causing the "xsf for ep not enabled" error we get on first connection. This was found by the Android team. This was debugged and fixed by Sasi Kumar. Signed-off-by: NAl Cooper <alcooperx@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Al Cooper 提交于
Based on a previous commit by Danesh Petigara <dpetigara@broadcom.com> that added resume to solve the following problem: "The BDC driver will fail after resuming from S3 suspend and this will cause any upper layer gadget driver to fail." This commit also adds support for suspend and manages the clock during suspend/resume. Signed-off-by: NAl Cooper <alcooperx@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Florian Fainelli 提交于
Allows Device Tree probing Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NAl Cooper <alcooperx@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Al Cooper 提交于
Signed-off-by: NAl Cooper <alcooperx@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Al Cooper 提交于
Newer SoC's have added a BDC clock to the Device Tree, so get and enable it. Signed-off-by: NAl Cooper <alcooperx@gmail.com> Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Al Cooper 提交于
Add Device Tree binding document for Broadcom USB Device Controller (BDC). Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NAl Cooper <alcooperx@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Al Cooper 提交于
The BDC endpoint status registers 0-7 were originally each going to be an array of regsiters. This was later changed to being a single register. The register definitions are being changed from: "#define BDC_EPSTS0(n) (0x60 + (n * 0x10))" to "#define BDC_EPSTS0 0x60" to reflect this change and to avoid future coding mistakes. Signed-off-by: NAl Cooper <alcooperx@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 David Lechner 提交于
This adds 3 new options to the RNDIS gadget function configs. It allows overriding the default USB interface class/subclass/protocol. The motivation for this is that if you set the values to "ef" (Misc), "04" (RNDIS), "01" (Ethernet) respectively, then the device will be recognized by the rndiscmp.inf file in Windows Vista and newer and will cause Windows to load the correct RNDIS driver without the need for a custom (signed) .inf file. Signed-off-by: NDavid Lechner <david@lechnology.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Arvind Yadav 提交于
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Arvind Yadav 提交于
attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Meng Dongyang 提交于
In the case hcd autosuspend is enabled, the hcd will enter L2 state if no device connected. But if the controller works in otg mode, the gadget driver still works in L0 state if connected with host. This may result in transfer fail when gadget enqueue new request but the hcd driver has set the global state into L2. This patch prevent the hcd enter L2 state if the controller work in device mode. Signed-off-by: NMeng Dongyang <daniel.meng@rock-chips.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Yoshihiro Shimoda 提交于
This patch fixes an issue that the spin_lock_init() is not called for almost all pipes. Otherwise, the lockdep output the following message when we connect a usb cable using g_ncm: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Reported-by: NKazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com> Fixes: b8b9c974 ("usb: renesas_usbhs: gadget: disable all eps when the driver stops") Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: NKazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Jack Pham 提交于
In the SG case this is already handled since a non-zero request->num_mapped_sgs is a clear indicator that dma_map_sg() had been called. While it would be nice to do the same for the singly mapped case by simply checking for non-zero request->dma, it's conceivable that 0 is a valid dma_addr_t handle. Hence add a flag 'dma_mapped' to struct usb_request and use this to determine the need to call dma_unmap_single(). Otherwise, if a request is not DMA mapped then the result of calling usb_request_unmap_request() would safely be a no-op. Signed-off-by: NJack Pham <jackp@codeaurora.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
USB gadget serial console works on functions other than the legacy configurations. Let the user enable it when using any function that uses the serial utilities. Signed-off-by: NThadeu Lima de Souza Cascardo <cascardo@cascardo.eti.br> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Bhumika Goyal 提交于
Make the structure const as it is only stored in the ops field of a usb_ep structure, which is of type const. Done using Coccinelle. Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Bhumika Goyal 提交于
Make the structure const as it is only stored in the ops field of a usb_ep structure, which is of type const. Done using Coccinelle. Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Bhumika Goyal 提交于
Make the structure const as it is only stored in the ops field of a usb_ep structure, which is of type const. Done using Coccinelle. Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Shawn Guo 提交于
The header clk-provider.h is there for clock drivers (providers) to include, not client drivers (consumers). That said, of_clk_get_parent_count() is a helper function for clock providers, not a clk API for consumers. Let's replace of_clk_get_parent_count() with of_count_phandle_with_args() call, so that we can remove the include of clk-provider.h. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Jerry Zhang 提交于
Currenly, f_midi_free uses snd_card_free, which will wait until the user has released the sound card before returning. However, if the user doesn't release the sound card, then f_midi_free can block for an arbitrary amount of time, which also blocks any gadget operations on that thread. Instead, we can use snd_card_free_when_closed which returns before all handles are released. Since f_midi can be accessed through rmidi if usb_put_function is called before release_card_device, add refcounting to f_midi_free and have rawmidi's private free call it. The f_midi memory is only kfreed when usb_put_function and release_card_device have both been called. Signed-off-by: NJerry Zhang <zhangjerry@google.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Badhri Jagan Sridharan 提交于
Add super speed descriptors for f_midi. Signed-off-by: NBadhri Jagan Sridharan <Badhri@google.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Colin Ian King 提交于
The while loop never terminates because the loop counter i is never decremented. Fix this by decrementing i. Detected by CoverityScan, CID#751073 ("Infinite Loop") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Julia Lawall 提交于
These snd_rawmidi_ops structures are only passed as the third argument of snd_rawmidi_set_ops. This argument is const, so the snd_rawmidi_ops structures can be const too. Done with the help of Coccinelle. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Chunfeng Yun 提交于
The mtu3 driver is a generic driver for MediaTek usb3 DRD IP, add a generic compatible to avoid confusion when support new SoCs but use a compatible with specific SoC's name "mt8173". Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Abdulhadi Mohamed 提交于
The current f_hid driver doesn't handle GET_PROCOTOL and SET_PROCOTOL requests, which are required to operate HID gadgets in BOOT mode. This patch implements this feature for devices that have the same implementation for REPORT and BOOT mode so that these devices are recognized by older BIOSes. Signed-off-by: NAbdulhadi Mohamed <abdulahhadi2@gmail.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Chunfeng Yun 提交于
Ip sleep will auto exit if vbus comparison circuit of u2 phy is disabled when system tries to enter suspend mode, so get vbus-valid status from mac but not from u2 phy when enable DRD mode to fix the issue. Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Chunfeng Yun 提交于
when the device is reset by host, the status of u1_enable and u2_enable should also be restored to default value. Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Chunfeng Yun 提交于
Add the delayed status handling. This is used by mass storage etc to gain some extra time to setup its internal status before it can proceed further requests, and once the gadget is ready, it will enqueue an empty packet which is used for synchronization. The issue may happen on some FGPA platform with very low cpu frequency. Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Fabio Estevam 提交于
Using devm_ioremap_resource() can make the code simpler, as it already does the resource NULL check. Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Julia Lawall 提交于
qe_ep0_desc is only passed as the second argument to qe_ep_init, which is const, so qe_ep0_desc can be const too. Done with the help of Coccinelle. Acked-by: NLi Yang <leoyang.li@nxp.com> Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Yoshihiro Shimoda 提交于
This patch adds support for R-Car M3-W. This patch also adds R-Car Gen3 generic version's compatible and changes ".compatible" in the usb3_of_match from "renesas,r8a7796-usb3-peri" to "renesas,rcar-gen3-usb3-peri". Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
- 09 8月, 2017 4 次提交
-
-
由 Yoshihiro Shimoda 提交于
This patch adds support for R-Car H3 ES2.0. Since this SoC revision doesn't need workaround for vbus detection and number of ramif is increased. So, this driver uses soc_device_match() to detect it. Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Yoshihiro Shimoda 提交于
This patch adds debugfs to set the "b-device" mode for using a board which is not connected to the ID pin (e.g. CN11 on Salvator-X). If we want to use peripheral mode on such a board, we have to disable VBUS output first. So, this patch can set such a mode as the following: # mount -t debugfs none /sys/kernel/debug # modprobe renesas_usb3 # modprobe g_mass_storage file=/dev/shm/test.bin # echo 1 > /sys/kernel/debug/ee020000.usb/b_device Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Chunfeng Yun 提交于
Add myself as maintainer of MediaTek USB3 DRD IP driver Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-
由 Chunfeng Yun 提交于
Provides a new vbus debugfs interface used to turn on/off vbus regulator, it also can be used to get/put reference count of vbus, due to sometimes we need keep it alive when manually switch mtu3 to device mode. Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
-