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
Greg Kroah-Hartman
e3e9fc7fa7
Merge 6.2-rc5 into usb-next
...
We need the USB fixes in here and this resolves merge conflicts as
reported in linux-next in the following files:
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h
drivers/usb/typec/ucsi/ucsi.c
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2023-01-23 15:38:08 +01:00
Linus Torvalds
2241ab53cb
Linux 6.2-rc5
v6.2-rc5
2023-01-21 16:27:01 -08:00
Linus Torvalds
95f184d0e1
Merge tag 'io_uring-6.2-2023-01-21' of git://git.kernel.dk/linux
...
Pull another io_uring fix from Jens Axboe:
"Just a single fix for a regression that happened in this release due
to a poll change. Normally I would've just deferred it to next week,
but since the original fix got picked up by stable, I think it's
better to just send this one off separately.
The issue is around the poll race fix, and how it mistakenly also got
applied to multishot polling. Those don't need the race fix, and we
should not be doing any reissues for that case. Exhaustive test cases
were written and committed to the liburing regression suite for the
reported issue, and additions for similar issues"
* tag 'io_uring-6.2-2023-01-21' of git://git.kernel.dk/linux:
io_uring/poll: don't reissue in case of poll race on multishot request
2023-01-21 16:21:56 -08:00
Linus Torvalds
f671440228
Merge tag 'char-misc-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
...
Pull char/misc driver fixes from Greg KH:
"Here are some small char/misc and other subsystem driver fixes for
6.2-rc5 to resolve a few reported issues. They include:
- long time pending fastrpc fixes (should have gone into 6.1, my
fault)
- mei driver/bus fixes and new device ids
- interconnect driver fixes for reported problems
- vmci bugfix
- w1 driver bugfixes for reported problems
Almost all of these have been in linux-next with no reported problems,
the rest have all passed 0-day bot testing in my tree and on the
mailing lists where they have sat too long due to me taking a long
time to catch up on my pending patch queue"
* tag 'char-misc-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
VMCI: Use threaded irqs instead of tasklets
misc: fastrpc: Pass bitfield into qcom_scm_assign_mem
gsmi: fix null-deref in gsmi_get_variable
misc: fastrpc: Fix use-after-free race condition for maps
misc: fastrpc: Don't remove map on creater_process and device_release
misc: fastrpc: Fix use-after-free and race in fastrpc_map_find
misc: fastrpc: fix error code in fastrpc_req_mmap()
mei: me: add meteor lake point M DID
mei: bus: fix unlink on bus in error path
w1: fix WARNING after calling w1_process()
w1: fix deadloop in __w1_remove_master_device()
comedi: adv_pci1760: Fix PWM instruction handling
interconnect: qcom: rpm: Use _optional func for provider clocks
interconnect: qcom: msm8996: Fix regmap max_register values
interconnect: qcom: msm8996: Provide UFS clocks to A2NoC
dt-bindings: interconnect: Add UFS clocks to MSM8996 A2NoC
2023-01-21 11:20:55 -08:00
Linus Torvalds
c88a311470
Merge tag 'driver-core-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
...
Pull driver core fixes from Greg KH:
"Here are three small driver and kernel core fixes for 6.2-rc5. They
include:
- potential gadget fixup in do_prlimit
- device property refcount leak fix
- test_async_probe bugfix for reported problem"
* tag 'driver-core-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
prlimit: do_prlimit needs to have a speculation check
driver core: Fix test_async_probe_init saves device in wrong array
device property: fix of node refcount leak in fwnode_graph_get_next_endpoint()
2023-01-21 11:17:23 -08:00
Linus Torvalds
bb86d65775
Merge tag 'staging-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
...
Pull staging driver fix from Greg KH:
"Here is a single staging driver fix for 6.2-rc5. It resolves a build
issue reported and Fixed by Arnd in the vc04_services driver. It's
been in linux-next this week with no reported problems"
* tag 'staging-6.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
staging: vchiq_arm: fix enum vchiq_status return types
2023-01-21 11:15:21 -08:00