Konrad Dybcio
e225947035
dt-bindings: usb: fsa4480: Use generic node name
...
Node names should be generic. Change fsa4480@ to typec-mux@.
Fixes: 01afa882f1 ("dt-bindings: usb: Add binding for fcs,fsa4480")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230130113151.2130063-1-konrad.dybcio@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 10:39:29 +01:00
Jonathan Neuschäfer
c2c304dfc9
dt-bindings: usb: phy: nop: Fix a typo ("specifiy")
...
Spell it correctly as "specify".
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230129124258.1295503-1-j.neuschaefer@gmx.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 10:39:19 +01:00
Krzysztof Kozlowski
d4f6b987f3
dt-bindings: usb: samsung,exynos-dwc3: allow unit address in DTS
...
The Samsung Exynos SoC USB 3.0 DWC3 Controller is a simple wrapper of
actual DWC3 Controller device node. It handles necessary Samsung
Exynos-specific resources (regulators, clocks), but does not have its
own MMIO address space.
However neither simple-bus bindings nor dtc W=1 accept device nodes in
soc@ node which do not have unit address.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230127211748.260718-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 10:39:13 +01:00
Yang Yingliang
21ef9c91f0
usb: fotg210: fix return value check in fotg210_probe()
...
devm_platform_get_and_ioremap_resource() never returns NULL pointer,
it will return ERR_PTR() when it fails, so replace the check with
IS_ERR().
Fixes: baef5330d3 ("usb: fotg210: Acquire memory resource in core")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230130120633.3342285-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 10:39:03 +01:00
Anand Moon
8cb9c36b81
dt-bindings: usb: vialab,vl817: Cleanup compatible, reset-gpios and required
...
Cleanup by removing unneeded quotes from refs and
add maxItems to reset-gpios and fix the required list.
Fixes: 31360c28df ("dt-bindings: usb: Add binding for Via lab VL817 hub controller")
Signed-off-by: Anand Moon <linux.amoon@gmail.com >
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230130084744.2539-5-linux.amoon@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 10:38:20 +01:00
Mark Tomlinson
ff826648e1
USB: MAX3421: Handle USB NAK correctly
...
A USB peripheral can respond with a NAK if it is not yet ready to
send/receive data. In this case, the transaction should be retried. The
MAX3421 driver did do this, and switched to a different type of retry
after a number of 'fast' retries. On at least some USB flash devices,
this second type of retry never succeeds. This patch changes the
behaviour so that 'fast' retries continue.
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz >
Link: https://lore.kernel.org/r/20230127024734.8777-1-mark.tomlinson@alliedtelesis.co.nz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 10:38:05 +01:00
Krzysztof Kozlowski
7194e5e090
dt-bindings: usb: qcom,dwc3: allow required-opps
...
Few Qualcomm SoCs require minimum performance level of power domain, so
allow it:
sm8550-mtp.dtb: usb@a6f8800: 'required-opps' does not match any of the regexes: '^usb@[0-9a-f]+$', 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Reviewed-by: Abel Vesa <abel.vesa@linaro.org >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230127121122.342191-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 10:38:00 +01:00
Andy Shevchenko
582cef4385
usg: gadget: Move validation out of lock in webusb_bcdVersion_store()
...
Validation has nothing to do with any protected data,
move it out of the lock and make code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230127112638.84806-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 10:37:51 +01:00
Andy Shevchenko
2bf40502ba
usb: gadget: Use correct APIs and data types for UUID handling
...
We have two types for UUIDs depending on the byte ordering.
Instead of explaining how bytes should go over the wire,
use dedicated APIs and data types. This removes a confusion
over the byte ordering.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Tested-By: Jó Ágila Bitsch <jgilab@gmail.com >
Link: https://lore.kernel.org/r/20230125143425.85268-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 10:37:29 +01:00
Randy Dunlap
e4157519ad
Documentation: usb: correct spelling
...
Correct spelling problems for Documentation/usb/ as reported
by codespell.
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Cc: linux-usb@vger.kernel.org
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: linux-doc@vger.kernel.org
Link: https://lore.kernel.org/r/20230127064005.1558-33-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 10:10:52 +01:00
Michael Grzeschik
2d83eb5d24
usb: uvc: use v4l2_fill_fmtdesc instead of open coded format name
...
Since v4l2_fill_fmtdesc will be called in the ioctl v4l_enum_fmt anyway.
We can set the format description and compressed flag from v4l_fill_fmtdesc
and can remove the extra name field in uvc_format_desc.
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com >
Tested-by: Daniel Scally <dan.scally@ideasonboard.com >
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Link: https://lore.kernel.org/r/20230126231456.3402323-6-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 09:40:43 +01:00
Michael Grzeschik
8ecb17a86c
usb: uvc: make uvc_format_desc table const
...
Since the uvc_fmts array can not be modified we declare it const and
change every user of the uvc_format_by_guid function aswell.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com >
Tested-by: Daniel Scally <dan.scally@ideasonboard.com >
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de >
Link: https://lore.kernel.org/r/20230126231456.3402323-5-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 09:40:42 +01:00
Michael Grzeschik
466be4c9a6
usb: uvc: move uvc_fmts and uvc_format_by_guid to own compile unit
...
The media driver USB_VIDEO_CLASS and USB_F_UVC are using the same
function uvc_format_by_guid. Since the function is inline, every user
will get a copy of the used uvc_fmts array and the function. This patch
moves the code to an own compile unit and add this dependency as
UVC_COMMON to both users.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com >
Tested-by: Daniel Scally <dan.scally@ideasonboard.com >
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de >
Link: https://lore.kernel.org/r/20230126231456.3402323-4-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 09:40:42 +01:00
Michael Grzeschik
e1d5d71d18
usb: uvc: move media/v4l2-uvc.h to usb/uvc.h
...
Since the headerfile is only used in usb devices it is better
placed with the other usb files.
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com >
Tested-by: Daniel Scally <dan.scally@ideasonboard.com >
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de >
Link: https://lore.kernel.org/r/20230126231456.3402323-3-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 09:40:42 +01:00
Marek Vasut
015d44c2b7
media: uvcvideo: Add GUID for BGRA/X 8:8:8:8
...
The Cypress EZUSB FX3 UVC example can be configured to report pixel
format "e436eb7e-524f-11ce-9f53-0020af0ba770". This is its GUID for
BGRA/X 8:8:8:8.
The UVC 1.5 spec [1] only defines GUIDs for YUY2, NV12, M420 and I420.
This seems to be an extension documented in the Microsoft Windows Media
Format SDK[2]. This Media Format SDK defines this GUID as corresponding
to `MEDIASUBTYPE_RGB32`, which is confirmed by [4] as `MEDIASUBTYPE_ARGB32`
has different GUID.
Note that in my case, the FX3 UVC can output either channel order,
BGR or RGB or any other mix for that matter. Since Linux commit
1b8dc32286 ("[media] uvcvideo: Add GUID for BGR 8:8:8")
defined a GUID for `MEDIASUBTYPE_RGB24` channel order as BGR, keep
this change consistent and define `MEDIASUBTYPE_RGB32` as BGR as well.
Document [3] also indicates the channel order is BGR.
[1] https://www.usb.org/document-library/video-class-v15-document-set
[2] https://learn.microsoft.com/en-us/windows/win32/wmformat/media-type-identifiers
[3] https://learn.microsoft.com/en-us/windows/win32/directshow/uncompressed-rgb-video-subtypes
[4] https://gix.github.io/media-types/
Signed-off-by: Marek Vasut <marex@denx.de >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Ricardo Ribalda <ricardo@ribalda.com >
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de >
Link: https://lore.kernel.org/r/20230126231456.3402323-2-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-31 09:40:42 +01:00
Greg Kroah-Hartman
745656a39e
Merge tag 'media-uvc-next-20230115' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux into usb-next
...
Merge in this tag from the media tree so that future USB uvc patches
will apply properly.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
* tag 'media-uvc-next-20230115' of git://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux: (27 commits)
media: uvcvideo: Silence memcpy() run-time false positive warnings
media: uvcvideo: Quirk for autosuspend in Logitech B910 and C910
media: uvcvideo: Fix race condition with usb_kill_urb
media: uvcvideo: Use standard names for menus
media: uvcvideo: Fix power line control for Lenovo Integrated Camera
media: uvcvideo: Refactor power_line_frequency_controls_limited
media: uvcvideo: Refactor uvc_ctrl_mappings_uvcXX
media: uvcvideo: Implement mask for V4L2_CTRL_TYPE_MENU
media: uvcvideo: Extend documentation of uvc_video_clock_decode()
media: uvcvideo: Limit power line control for Acer EasyCamera
media: uvcvideo: Refactor __uvc_ctrl_add_mapping
media: uvcvideo: Fix handling on Bitmask controls
media: uvcvideo: Do not return positive errors in uvc_query_ctrl()
media: uvcvideo: Return -EACCES for Wrong state error
media: uvcvideo: Improve error logging in uvc_query_ctrl()
media: uvcvideo: Check for INACTIVE in uvc_ctrl_is_accessible()
media: uvcvideo: Factor out usb_string() calls
media: uvcvideo: Limit power line control for Acer EasyCamera
media: uvcvideo: Recover stalled ElGato devices
media: uvcvideo: Remove void casting for the status endpoint
...
2023-01-31 09:35:41 +01:00
Biju Das
c52c9acc41
xhci: host: Add Renesas RZ/V2M SoC support
...
RZ/V2M is similar to R-Car XHCI but it doesn't require any
firmware, we need to reset the USB Host reset release in DRD Module
before accessing host registers.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Link: https://lore.kernel.org/r/20230121145853.4792-10-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:48:17 +01:00
Biju Das
224eb5311d
usb: host: xhci-plat: Add reset support
...
Add optional reset support. This is in preparation to adding USB xHCI
support for RZ/V2M SoC.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/20230121145853.4792-9-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:48:16 +01:00
Biju Das
8c6e8b0961
usb: host: xhci-plat: Improve clock handling in probe()
...
It is always better to acquire all the clock resources first and
then do the clock operations.
This patch acquires all the optional clocks first and then calls
corresponding prepare_enable().
There is no functional change.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be >
Link: https://lore.kernel.org/r/20230121145853.4792-8-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:48:16 +01:00
Biju Das
3827fa1ef3
usb: gadget: udc: renesas_usb3: Add role switch support for RZ/V2M
...
As RZ/V2M has both HOST and PERI reset module, we need to do reset release
before accessing registers in respective IP module.
This patch adds role switch support for RZ/V2M.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Link: https://lore.kernel.org/r/20230121145853.4792-7-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:48:16 +01:00
Biju Das
9cad72dfc5
usb: gadget: Add support for RZ/V2M USB3DRD driver
...
The RZ/V2M USB3.1 Gen1 Interface (USB) composed of a USB3.1 Gen1 Dual Role
Device controller (USB3DRD), a USB3.1 Gen1 Host controller (USB3HOST), a
USB3.1 Gen1 Peripheral controller (USB3PERI).
The reset for both host and peri are located in USB3DRD block. The
USB3DRD registers are mapped in the AXI address space of the Peripheral
module.
Add USB3DRD driver to handle reset for both host and peri modules.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Link: https://lore.kernel.org/r/20230121145853.4792-6-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:48:16 +01:00
Biju Das
9486e56c49
dt-bindings: usb: Add RZ/V2M USB3DRD binding
...
Add device tree bindings for the RZ/V2{M, MA} USB3DRD module.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230121145853.4792-5-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:47:03 +01:00
Biju Das
2c5502a4dc
dt-bindings: usb: renesas,usb3-peri: Document RZ/V2MA bindings
...
Document RZ/V2MA usb3-peri bindings. RZ/V2MA usb3-peri is identical
to one found on the RZ/V2M SoC. No driver changes are required as
generic compatible string "renesas,rzv2m-usb3-peri" will be used as
a fallback.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Acked-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230121145853.4792-4-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:47:03 +01:00
Biju Das
29218d6ce4
dt-bindings: usb: renesas,usb3-peri: Update reset, clock-name and interrupts properties
...
On RZ/V2M, USB3DRD module manages the drd_reset. Moreover, the interrupts
drd, gpi and bc are part of USB3DRD block. This patch removes
drd_reset and the interrupts drd, bc and gpi from usb3_peri bindings.
After this, there is only one reset and interrupts and therefore
removing reset-names and interrupt-names as well.
Whilst, Update the clock-name "aclk"->"axi" to make it consistent with
DRD and host blocks.
There is any harm in making such a change as, no users of
renesas,r9a09g011-usb3-peri yet in kernel release.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230121145853.4792-3-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:47:03 +01:00
Biju Das
e696d70f60
dt-bindings: usb: renesas,usb-xhci: Document RZ/V2M support
...
Document the RZ/V2M SoC bindings.
The RZ/V2M SoC is a little different to the R-Car implementations.
You can access the registers associated with the currently set DRD mode,
therefore as part of init, we have to set the DRD mode to host.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com >
Reviewed-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230121145853.4792-2-biju.das.jz@bp.renesas.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:47:03 +01:00
Sing-Han Chen
331df1f3bb
usb: gadget: tegra-xudc: Add Tegra234 support
...
This commit adds support for XUSB device mode controller support on
Tegra234 SoC. This is very similar to the existing Tegra194 XUDC.
Signed-off-by: Sing-Han Chen <singhanc@nvidia.com >
Signed-off-by: Wayne Chang <waynec@nvidia.com >
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Acked-by: Thierry Reding <treding@nvidia.com >
Link: https://lore.kernel.org/r/20230119104208.28726-5-jonathanh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:46:20 +01:00
Wayne Chang
f816267867
dt-bindings: usb: tegra-xudc: Add Tegra234 XUDC support
...
Extend the Tegra XUSB controller device (XUDC) tree binding with
Tegra234 support.
Signed-off-by: Wayne Chang <waynec@nvidia.com >
Co-developed-by: Jon Hunter <jonathanh@nvidia.com >
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Acked-by: Thierry Reding <treding@nvidia.com >
Link: https://lore.kernel.org/r/20230119104208.28726-4-jonathanh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:46:13 +01:00
Jon Hunter
173bee52a0
dt-bindings: usb: tegra-xudc: Add dma-coherent for Tegra194
...
DMA operations for XUSB device controller are coherent for Tegra194 and
so update the device-tree binding to add this property.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Acked-by: Thierry Reding <treding@nvidia.com >
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org >
Link: https://lore.kernel.org/r/20230119104208.28726-2-jonathanh@nvidia.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:46:10 +01:00
Rob Herring
ec13100fcf
dt-bindings: usb: Convert Nuvoton EHCI to DT schema
...
The Nuvoton EHCI binding is just some compatible strings, so add it to the
generic-ehci.yaml schema.
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230110-dt-usb-v3-5-5af0541fcf8c@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:45:07 +01:00
Rob Herring
c1140ebfd7
dt-bindings: usb: Convert Marvell Orion EHCI to DT schema
...
The Marvell Orion EHCI binding is just some compatible strings, so add it
to the generic-ehci.yaml schema.
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230110-dt-usb-v3-4-5af0541fcf8c@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:45:07 +01:00
Rob Herring
76ea4926dc
dt-bindings: usb: Convert OMAP OHCI/EHCI bindings to schema
...
The OMAP OHCI and EHCI USB host bindings follow the generic binding, so
add the compatibles and remove the old txt binding docs.
The examples in omap-usb-host.txt don't match actual users, so update
them dropping the fallback compatible.
Signed-off-by: Rob Herring <robh@kernel.org >
Acked-by: Lee Jones <lee@kernel.org >
Link: https://lore.kernel.org/r/20230110-dt-usb-v3-3-5af0541fcf8c@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:45:06 +01:00
Rob Herring
4aa466190a
dt-bindings: usb: Convert multiple "usb-ohci" bindings to DT schema
...
"usb-ohci" is another "generic" OHCI controller compatible string used by
several platforms. Add it to the generic-ohci.yaml schema and remove all
the old binding docs.
Marvell pxa-usb.txt has "usb-ohci" in the example, but actual users don't,
so drop it.
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230110-dt-usb-v3-2-5af0541fcf8c@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:45:06 +01:00
Rob Herring
60c4da9f3c
dt-bindings: usb: Remove obsolete brcm,bcm3384-usb.txt
...
The "brcm,bcm3384-ohci" and "brcm,bcm3384-ehci" compatibles are already
documented in generic-ohci.yaml and generic-ehci.yaml, respectively, so
remove the old txt binding.
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230110-dt-usb-v3-1-5af0541fcf8c@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:45:06 +01:00
Rob Herring
5442e79120
dt-bindings: usb: rockchip,dwc3: Move RK3399 to its own schema
...
The rockchip,dwc3.yaml schema defines a single DWC3 node, but the RK3399
uses the discouraged parent wrapper node and child 'generic' DWC3 node.
The intent was to modify the RK3399 DTs to use a single node, but the DT
changes were rejected for ABI reasons. However, the schema was accepted
as-is.
To fix this, we need to move the RK3399 binding to its own schema file.
The RK3328 and RK3568 bindings are correct and use a single node.
Cc: Johan Jonker <jbx6244@gmail.com >
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230124025936.3256213-2-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:44:22 +01:00
Rob Herring
353a17ec62
dt-bindings: usb: snps,dwc3: Allow power-domains property
...
The Rockchip RK3399 DWC3 node has 'power-domains' property which isn't
allowed by the schema:
usb@fe900000: Unevaluated properties are not allowed ('power-domains' was unexpected)
Allow DWC3 nodes to have a power-domains entry. We could instead move
the power-domains property to the parent wrapper node, but the could be
an ABI break (Linux shouldn't care). Also, we don't want to encourage
the pattern of wrapper nodes just to define resources such as clocks,
resets, power-domains, etc. when not necessary.
Reviewed-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com >
Signed-off-by: Rob Herring <robh@kernel.org >
Link: https://lore.kernel.org/r/20230124025936.3256213-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:44:22 +01:00
Randy Dunlap
e538e3614c
usb: fotg210: fix a Kconfig spelling mistake
...
Correct a spelling mistake (reported by codespell).
Signed-off-by: Randy Dunlap <rdunlap@infradead.org >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230124233511.23616-1-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-25 15:43:24 +01:00
Prashant Malani
9e6f4c8b88
usb: typec: tcpm: Remove altmode active state updates
...
Since the "active" state for partner altmodes is now being taken care of
by the altmode driver itself (specifically, DisplayPort altmode), we
no longer need to do so from the port driver. So remove the calls to
typec_altmode_update_active() from TCPM.
Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Reviewed-by: Benson Leung <bleung@chromium.org >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Signed-off-by: Prashant Malani <pmalani@chromium.org >
Link: https://lore.kernel.org/r/20230120205827.740900-2-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:15:43 +01:00
Prashant Malani
25d6d1bfc2
usb: typec: altmodes/displayport: Update active state
...
Update the altmode "active" state when we receive Acks for Enter and
Exit Mode commands. Having the right state is necessary to change Pin
Assignments using the 'pin_assignment" sysfs file.
Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Reviewed-by: Benson Leung <bleung@chromium.org >
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Reviewed-by: Guenter Roeck <linux@roeck-us.net >
Signed-off-by: Prashant Malani <pmalani@chromium.org >
Link: https://lore.kernel.org/r/20230120205827.740900-1-pmalani@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:15:43 +01:00
Andy Shevchenko
6f7fb48d24
usb: gadget: Move kstrtox() out of lock
...
The kstrtox() calls operate on local (to the function) variables and do
not need to be serialized. We may call them out of the lock.
Reviewed-by: John Keeping <john@metanate.com >
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230120182434.24245-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:15:37 +01:00
Bjorn Andersson
065ded319d
usb: typec: mux: Introduce GPIO-based SBU mux
...
A design found in various Qualcomm-based boards is to use a USB switch,
controlled through a pair of GPIO lines to connect, disconnect and
switch the orientation of the SBU lines in USB Type-C applications.
This introduces a generic driver, which implements the typec_switch and
typec_mux interfaces to perform these operations.
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com >
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230113041115.4189210-2-quic_bjorande@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:15:28 +01:00
Bjorn Andersson
b39483d66a
dt-bindings: usb: Introduce GPIO-based SBU mux
...
Introduce a binding for GPIO-based mux hardware used for connecting,
disconnecting and switching orientation of the SBU lines in USB Type-C
applications.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com >
Link: https://lore.kernel.org/r/20230113041115.4189210-1-quic_bjorande@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:15:28 +01:00
Andy Shevchenko
c05ad0fb63
usb: fotg210: use devm_platform_get_and_ioremap_resource()
...
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230120154437.22025-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:12:58 +01:00
Andy Shevchenko
6df3d3aadb
usb: fotg210: Switch to use dev_err_probe()
...
Switch to use dev_err_probe() to simplify the error paths and
unify message template.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230120154437.22025-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:12:58 +01:00
Andy Shevchenko
6a426eb418
usb: fotg210-udc: remove redundant error logging
...
A call to platform_get_irq() already prints an error on failure within
its own implementation. So printing another error based on its return
value in the caller is redundant and should be removed. The clean up
also makes if condition block braces unnecessary. Remove that as well.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230120154437.22025-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:12:58 +01:00
Andy Shevchenko
7159deb762
usb: fotg210-hcd: Don't shadow error codes in store()
...
kstrtox() along with regmap API can return different error codes based on
circumstances.
Don't shadow them when returning to the caller.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230120154437.22025-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:12:58 +01:00
Andy Shevchenko
861fa1c3fa
usb: fotg210-hcd: use sysfs_emit() to instead of scnprintf()
...
Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230120154437.22025-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:12:58 +01:00
Fabian Vogt
c5d4297f0c
fotg210-udc: Improve device initialization
...
Reset the device explicitly to get into a known state and also set the chip
enable bit. Additionally, mask interrupts which aren't handled.
Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230123073508.2350402-4-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:12:18 +01:00
Fabian Vogt
76d62981b5
fotg210-udc: Introduce and use a fotg210_ack_int function
...
This is in preparation of support for devices where interrupts are acked
differently.
Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230123073508.2350402-3-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:12:18 +01:00
Fabian Vogt
e55f67391f
fotg210-udc: Add missing completion handler
...
This is used when responding to GET_STATUS requests. Without this, it
crashes on completion.
Fixes: b84a8dee23 ("usb: gadget: add Faraday fotg210_udc driver")
Signed-off-by: Fabian Vogt <fabian@ritter-vogt.de >
Signed-off-by: Linus Walleij <linus.walleij@linaro.org >
Link: https://lore.kernel.org/r/20230123073508.2350402-2-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:12:18 +01:00
Alexander Stein
4ba2e7cd98
usb: host: ehci-fsl: Use DRV_NAME
...
"fsl-ehci" is used for both MODULE_ALIAS and driver name. As they have to
match use DRV_NAME in both locations.
Acked-by: Alan Stern <stern@rowland.harvard.edu >
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com >
Link: https://lore.kernel.org/r/20230123100007.1479090-1-alexander.stein@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-24 18:11:49 +01:00