Age | Commit message (Collapse) | Author | Files | Lines |
|
Rationale:
Reduces attack surface on kernel devs opening the links for MITM
as HTTPS traffic is much harder to manipulate.
Deterministic algorithm:
For each file:
If not .svg:
For each line:
If doesn't contain `\bxmlns\b`:
For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
If both the HTTP and HTTPS versions
return 200 OK and serve the same content:
Replace HTTP with HTTPS.
Signed-off-by: Alexander A. Klimov <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Demote drd.c's file header to a standard comment block.
Fixes the following W=1 build warnings:
drivers/usb/dwc3/drd.c:20: warning: Function parameter or member 'dwc' not described in 'dwc3_otg_disable_events'
drivers/usb/dwc3/drd.c:20: warning: Function parameter or member 'disable_mask' not described in 'dwc3_otg_disable_events'
Cc: Felipe Balbi <[email protected]>
Cc: Roger Quadros <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix the following coccicheck warning:
drivers/usb/dwc3/drd.c:85:3-24: WARNING: Assignment of 0/1 to bool
variable
drivers/usb/dwc3/drd.c:59:2-23: WARNING: Assignment of 0/1 to bool
variable
Signed-off-by: Jason Yan <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
If the driver is configured to use DRD role-switch, it's not OTG. There
won't be OTG irq to free. Check for dwc->otg_irq before freeing it.
Signed-off-by: Thinh Nguyen <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
After merging the usb-gadget tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
drivers/usb/dwc3/drd.c: In function 'dwc3_setup_role_switch':
drivers/usb/dwc3/drd.c:551:23: error: assignment to 'usb_role_switch_set_t' {aka 'int (*)(struct usb_role_switch *, enum usb_role)'} from incompatible pointer type 'int (*)(struct device *, enum usb_role)' [-Werror=incompatible-pointer-types]
551 | dwc3_role_switch.set = dwc3_usb_role_switch_set;
| ^
drivers/usb/dwc3/drd.c:552:23: error: assignment to 'usb_role_switch_get_t' {aka 'enum usb_role (*)(struct usb_role_switch *)'} from incompatible pointer type 'enum usb_role (*)(struct device *)' [-Werror=incompatible-pointer-types]
552 | dwc3_role_switch.get = dwc3_usb_role_switch_get;
| ^
Caused by commit
8a0a13799744 ("usb: dwc3: Registering a role switch in the DRD code.")
interacting with commit
bce3052f0c16 ("usb: roles: Provide the switch drivers handle to the switch in the API")
from the usb tree.
Signed-off-by: Stephen Rothwell <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Support the new role-switch-default-mode binding for configuring
the default role the controller assumes as when the usb role is
USB_ROLE_NONE
This patch was split out from a larger patch originally by
Yu Chen <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Mark Rutland <[email protected]>
CC: ShuFan Lee <[email protected]>
Cc: Heikki Krogerus <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Chunfeng Yun <[email protected]>
Cc: Yu Chen <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Jun Li <[email protected]>
Cc: Valentin Schneider <[email protected]>
Cc: Guillaume Gardet <[email protected]>
Cc: Bryan O'Donoghue <[email protected]>
Cc: Jack Pham <[email protected]>
Cc: [email protected]
Cc: [email protected]
Tested-by: Bryan O'Donoghue <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
The Type-C drivers use USB role switch API to inform the
system about the negotiated data role, so registering a role
switch in the DRD code in order to support platforms with
USB Type-C connectors.
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Mark Rutland <[email protected]>
CC: ShuFan Lee <[email protected]>
Cc: Heikki Krogerus <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Chunfeng Yun <[email protected]>
Cc: Yu Chen <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Jun Li <[email protected]>
Cc: Valentin Schneider <[email protected]>
Cc: Guillaume Gardet <[email protected]>
Cc: Jack Pham <[email protected]>
Cc: Bryan O'Donoghue <[email protected]>
Cc: [email protected]
Cc: [email protected]
Suggested-by: Heikki Krogerus <[email protected]>
Tested-by: Bryan O'Donoghue <[email protected]>
Signed-off-by: Yu Chen <[email protected]>
Signed-off-by: John Stultz <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Since commit 7723f4c5ecdb ("driver core: platform: Add an error message to
platform_get_irq*()"), platform_get_irq() will call dev_err() itself on
failure, so there is no need for the driver to also do this.
Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The dwc3 code to get the "peripheral" / "host" / "otg" IRQ first tries
platform_get_irq_byname() and then falls back to the IRQ at index 0 if
the platform_get_irq_byname().
In this case we do not want platform_get_irq_byname() to print an error
on failure, so switch to platform_get_irq_byname_optional() instead which
does not print an error.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205037
Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
In case the "linux,extcon-name" property is defined but device itself
is not ready, defer the probe.
Signed-off-by: Andy Shevchenko <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Allow extcon device, found by name, to provide DR status for USB.
This is needed, for example, in case of Intel Merrifield platform,
where the Intel Basin Cove PMIC provides an extcon device to communicate
the detected role.
Note, that the "linux,extcon-name" property name is only for kernel
internal use by X86/ACPI platform code and as such is not documented
in the device tree bindings.
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Switch to device property for 'extcon' handling.
No functional change intended.
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Fix sparse warning
Fixes: 5f0b74e54890 ("USB: dwc3: get extcon device by OF graph bindings")
Reviewed-by: Andrzej Hajda <[email protected]>
Signed-off-by: kbuild test robot <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
extcon device is used to detect host/device connection. Since extcon
OF property is deprecated, alternative method should be added.
This method uses OF graph bindings to locate extcon.
Signed-off-by: Andrzej Hajda <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
This is useful on platforms (e.g. TI AM437x) that don't
have ID available on a GPIO but do have the OTG block.
We can obtain the ID state via the OTG block and use it
for dual-role switching.
Signed-off-by: Roger Quadros <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|
|
Now that the SPDX tag is in all USB files, that identifies the license
in a specific and legally-defined manner. So the extra GPL text wording
can be removed as it is no longer needed at all.
This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.
No copyright headers or other non-license-description text was removed.
Cc: Kukjin Kim <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Patrice Chotard <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.
Update the drivers/usb/ and include/linux/usb* files with the correct
SPDX license identifier based on the license text in the file itself.
The SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.
This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.
Cc: Thomas Gleixner <[email protected]>
Cc: Kate Stewart <[email protected]>
Cc: Philippe Ombredanne <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Acked-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
If dr_mode is "otg" then support dual role mode of operation.
Currently this mode is only supported when an extcon handle is
present in the dwc3 device tree node. This is needed to
get the ID status events of the port.
We're using a workqueue to manage the dual-role state transitions
as the extcon notifier (dwc3_drd_notifier) is called in an atomic
context by extcon_sync() and this doesn't go well with
usb_del_gadget_udc() causing a lockdep and softirq warning.
Signed-off-by: Roger Quadros <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
|