- 22 7月, 2021 1 次提交
-
-
由 John Keeping 提交于
Add the USB serial device ID for the CEL ZigBee EM3588 radio stick. Signed-off-by: NJohn Keeping <john@metanate.com> Cc: stable@vger.kernel.org Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 20 7月, 2021 1 次提交
-
-
由 Ian Ray 提交于
Fix comments for GE CS1000 CP210x USB ID assignments. Fixes: 42213a01 ("USB: serial: cp210x: add some more GE USB IDs") Signed-off-by: NIan Ray <ian.ray@ge.com> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com> Cc: stable@vger.kernel.org Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 12 7月, 2021 1 次提交
-
-
由 Marco De Marco 提交于
The patch is meant to support LARA-R6 Cat 1 module family. Module USB ID: Vendor ID: 0x05c6 Product ID: 0x90fA Interface layout: If 0: Diagnostic If 1: AT parser If 2: AT parser If 3: QMI wwan (not available in all versions) Signed-off-by: NMarco De Marco <marco.demarco@posteo.net> Link: https://lore.kernel.org/r/49260184.kfMIbaSn9k@mars Cc: stable@vger.kernel.org Signed-off-by: NJohan Hovold <johan@kernel.org>
-
- 30 6月, 2021 1 次提交
-
-
由 Joe Perches 提交于
The __assign_str macro has an unusual ending semicolon but the vast majority of uses of the macro already have semicolon termination. $ git grep -P '\b__assign_str\b' | wc -l 551 $ git grep -P '\b__assign_str\b.*;' | wc -l 480 Add semicolons to the __assign_str() uses without semicolon termination and all the other uses without semicolon termination via additional defines that are equivalent to __assign_str() with the eventual goal of removing the semicolon from the __assign_str() macro definition. Link: https://lore.kernel.org/lkml/1e068d21106bb6db05b735b4916bb420e6c9842a.camel@perches.com/ Link: https://lkml.kernel.org/r/48a056adabd8f70444475352f617914cef504a45.camel@perches.comSigned-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
-
- 24 6月, 2021 4 次提交
-
-
由 Hannu Hartikainen 提交于
The device (32a7:0000 Heimann Sensor GmbH USB appset demo) claims to be a CDC-ACM device in its descriptors but in fact is not. If it is run with echo disabled it returns garbled data, probably due to something that happens in the TTY layer. And when run with echo enabled (the default), it will mess up the calibration data of the sensor the first time any data is sent to the device. In short, I had a bad time after connecting the sensor and trying to get it to work. I hope blacklisting it in the cdc-acm driver will save someone else a bit of trouble. Signed-off-by: NHannu Hartikainen <hannu@hrtk.in> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210622141454.337948-1-hannu@hrtk.inSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunfeng Yun 提交于
This patch is used to relax bandwidth schedule by allowing multiple Start-Split in the same microframe. Reviewed-and-Tested-by: NIkjoon Jang <ikjn@chromium.org> Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1623995165-25759-1-git-send-email-chunfeng.yun@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Colin Ian King 提交于
The continue statement at the end of the while-loop is redundant, remove it. Signed-off-by: NColin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Continue has no effect") Link: https://lore.kernel.org/r/20210621095545.9659-1-colin.king@canonical.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Junlin Yang 提交于
The "rv" is initialized to "-ENOMEM", because "rv" is re-assigned to "-EINVAL", when kmalloc & usb_alloc_urb failed, the return value should return "-ENOMEM" rather than "-EINVAL",so the "rv" assignment is placed in the position where usb_endpoint_is_int_in is false. Acked-by: NOliver Neukum <oneukum@suse.com> Signed-off-by: NJunlin Yang <yangjunlin@yulong.com> Link: https://lore.kernel.org/r/20210621132415.2341-1-angkery@163.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 21 6月, 2021 5 次提交
-
-
由 Colin Ian King 提交于
The continue statement at the end of a for-loop has no effect, remove it. Signed-off-by: NColin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Continue has no effect") Cc: Mathias Nyman <mathias.nyman@intel.com> Link: https://lore.kernel.org/r/20210618090447.99114-1-colin.king@canonical.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Minas Harutyunyan 提交于
Creation EP's debugfs called earlier than debugfs folder for dwc3 device created. As result EP's debugfs are created in '/sys/kernel/debug' instead of '/sys/kernel/debug/usb/dwc3.1.auto'. Moved dwc3_debugfs_init() function call before calling dwc3_core_init_mode() to allow create dwc3 debugfs parent before creating EP's debugfs's. Fixes: 8d396bb0 ("usb: dwc3: debugfs: Add and remove endpoint dirs dynamically") Cc: stable <stable@vger.kernel.org> Reviewed-by: NJack Pham <jackp@codeaurora.org> Signed-off-by: NMinas Harutyunyan <Minas.Harutyunyan@synopsys.com> Link: https://lore.kernel.org/r/01fafb5b2d8335e98e6eadbac61fc796bdf3ec1a.1623948457.git.Minas.Harutyunyan@synopsys.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Yang Yingliang 提交于
Fix to return a negative error code from the error handling case instead of 0. Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210618043835.2641360-1-yangyingliang@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Linyu Yuan 提交于
when receive eem echo command, it will send a response, but queue this response to the usb request which allocate from gadget device endpoint zero, and transmit the request to IN endpoint of eem interface. on dwc3 gadget, it will trigger following warning in function __dwc3_gadget_ep_queue(), if (WARN(req->dep != dep, "request %pK belongs to '%s'\n", &req->request, req->dep->name)) return -EINVAL; fix it by allocating a usb request from IN endpoint of eem interface, and transmit the usb request to same IN endpoint of eem interface. Signed-off-by: NLinyu Yuan <linyyuan@codeaurora.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210616115142.34075-1-linyyuan@codeaurora.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ruslan Bilovol 提交于
Running sparse checker it shows warning message about incorrect endianness used for descriptor initialization: | f_hid.c:91:43: warning: incorrect type in initializer (different base types) | f_hid.c:91:43: expected restricted __le16 [usertype] bcdHID | f_hid.c:91:43: got int Fixing issue with cpu_to_le16() macro, however this is not a real issue as the value is the same both endians. Cc: Fabien Chouteau <fabien.chouteau@barco.com> Cc: Segiy Stetsyuk <serg_stetsuk@ukr.net> Signed-off-by: NRuslan Bilovol <ruslan.bilovol@gmail.com> Link: https://lore.kernel.org/r/20210617162755.29676-1-ruslan.bilovol@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 18 6月, 2021 3 次提交
-
-
由 Peter Zijlstra 提交于
Remove broken task->state references and let wake_up_process() DTRT. The anti-pattern in these patches breaks the ordering of ->state vs COND as described in the comment near set_current_state() and can lead to missed wakeups: (OoO load, observes RUNNING)<-. for (;;) { | t->state = UNINTERRUPTIBLE; | smp_mb(); ,-----> | (observes !COND) | / if (COND) ---------' | COND = 1; break; `- if (t->state != RUNNING) wake_up_process(t); // not done schedule(); // forever waiting } t->state = TASK_RUNNING; Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: NDavidlohr Bueso <dbueso@suse.de> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: NWill Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20210611082838.160855222@infradead.org
-
由 Greg Kroah-Hartman 提交于
This reverts commit b4e32616 as the patch series is causing build issues in linux-next at the moment. Cc: Matthias Kaehlcke <mka@chromium.org> Link: https://lore.kernel.org/r/YMuRcrE8xlWnFSWW@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Greg Kroah-Hartman 提交于
This reverts commit c950686b as the patch series is causing build issues in linux-next at the moment. Cc: Matthias Kaehlcke <mka@chromium.org> Link: https://lore.kernel.org/r/YMuRcrE8xlWnFSWW@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 17 6月, 2021 15 次提交
-
-
when system is doing s4, the process of xhci_resume may be as below: 1、xhci_mem_cleanup 2、xhci_init->xhci_mem_init->xhci_mem_cleanup(when memory is not enough). xhci_mem_cleanup will be executed twice when system is out of memory. xhci->port_caps is freed in xhci_mem_cleanup,but it isn't set to NULL. It will be freed twice when xhci_mem_cleanup is called the second time. We got following bug when system resumes from s4: kernel BUG at mm/slub.c:309! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP CPU: 0 PID: 5929 Tainted: G S W 5.4.96-arm64-desktop #1 pc : __slab_free+0x5c/0x424 lr : kfree+0x30c/0x32c Call trace: __slab_free+0x5c/0x424 kfree+0x30c/0x32c xhci_mem_cleanup+0x394/0x3cc xhci_mem_init+0x9ac/0x1070 xhci_init+0x8c/0x1d0 xhci_resume+0x1cc/0x5fc xhci_plat_resume+0x64/0x70 platform_pm_thaw+0x28/0x60 dpm_run_callback+0x54/0x24c device_resume+0xd0/0x200 async_resume+0x24/0x60 async_run_entry_fn+0x44/0x110 process_one_work+0x1f0/0x490 worker_thread+0x5c/0x450 kthread+0x158/0x160 ret_from_fork+0x10/0x24 Original patch that caused this issue was backported to 4.4 stable, so this should be backported to 4.4 stabe as well. Fixes: cf0ee7c6 ("xhci: Fix memory leak when caching protocol extended capability PSI tables - take 2") Cc: stable@vger.kernel.org # v4.4+ Signed-off-by: NJiantao Zhang <water.zhangjiantao@huawei.com> Signed-off-by: NTao Xue <xuetao09@huawei.com> Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20210617150354.1512157-5-mathias.nyman@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mathias Nyman 提交于
Set the urb->actual_length to bytes successfully copied in case all bytes weren't copied from a temporary buffer to the URB sg list. Also print a debug message Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20210617150354.1512157-4-mathias.nyman@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mathias Nyman 提交于
Save a bit of power by not interrupting so often by default if XHCI_AVOID_BEI quirk is set. In normal cases the xhci driver will only generate an interrupt on the last isochronous TRB of an URB. In a common UVC webcam usecase there are 32 TRBs per URB. if AVOID_BEI flag is set then xhci driver will force an interrupt every 8th isoc TRB to make sure the event ring doesn't get too full. This is however way too frequent in common single webcam use cases, causing 1000 interrupts/sec and thus poor powermanagement performance. Instead start with interrupting every 32 isoc TRB, and halve it in case event ring becomes half-full. Stop halving when reaching a rate of every 8th trb. This is a one way solution. If interrupt rate is increased it will stay high until driver is reloaded. The highest rate is the same as the old default rate. Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20210617150354.1512157-3-mathias.nyman@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mathias Nyman 提交于
We don't want those around confusing people. ERST_NUM_SEGS is used both when allocating event ring segments, and when allocating entries in the event ring segment table (erst). Signed-off-by: NMathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20210617150354.1512157-2-mathias.nyman@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jing Xiangfeng 提交于
typec_register_altmode() misses to call altmode_id_remove() in an error path. Add the missed function call to fix it. Fixes: 8a37d87d ("usb: typec: Bus type for alternate modes") Cc: stable <stable@vger.kernel.org> Acked-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NJing Xiangfeng <jingxiangfeng@huawei.com> Link: https://lore.kernel.org/r/20210617073226.47599-1-jingxiangfeng@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kyle Tso 提交于
If the voltage is being decreased in power negotiation, the Source will set the power supply to operate at the new voltage level before sending PS_RDY. Relax the threshold before sending Request Message so that it will not race with Source which begins to adjust the voltage right after it sends Accept Message (PPS) or tSrcTransition (25~35ms) after it sends Accept Message (non-PPS). The real threshold will be set after Sink receives PS_RDY Message. Fixes: f321a02c ("usb: typec: tcpm: Implement enabling Auto Discharge disconnect support") Cc: stable <stable@vger.kernel.org> Cc: Badhri Jagan Sridharan <badhri@google.com> Reviewed-by: NBadhri Jagan Sridharan <badhri@google.com> Acked-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NKyle Tso <kyletso@google.com> Link: https://lore.kernel.org/r/20210616090102.1897674-1-kyletso@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Kyle Tso 提交于
In PR_SWAP_SNK_SRC_SOURCE_ON state, Vsafe0v is expected as well so do nothing here to avoid state machine going into SNK_UNATTACHED. Fixes: 28b43d3d ("usb: typec: tcpm: Introduce vsafe0v for vbus") Cc: stable <stable@vger.kernel.org> Reviewed-by: NBadhri Jagan Sridharan <badhri@google.com> Reviewed-by: NGuenter Roeck <linux@roeck-us.net> Acked-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NKyle Tso <kyletso@google.com> Link: https://lore.kernel.org/r/20210615173206.1646477-1-kyletso@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Badhri Jagan Sridharan 提交于
"Table 4-3 VBUS Sink Characteristics" of "Type-C Cable and Connector Specification" defines the disconnect voltage thresholds of various configurations. This change fixes the disconnect threshold voltage calculation based on vSinkPD_min and vSinkDisconnectPD as defined by the table. Fixes: e1a97bf8 ("usb: typec: tcpci: Implement Auto discharge disconnect callbacks") Cc: stable <stable@vger.kernel.org> Acked-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NBadhri Jagan Sridharan <badhri@google.com> Link: https://lore.kernel.org/r/20210615174323.1160132-1-badhri@google.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andrew Lunn 提交于
The Cypress CY7C65632 appears to have an issue with auto suspend and detecting devices, not too dissimilar to the SMSC 5534B hub. It is easiest to reproduce by connecting multiple mass storage devices to the hub at the same time. On a Lenovo Yoga, around 1 in 3 attempts result in the devices not being detected. It is however possible to make them appear using lsusb -v. Disabling autosuspend for this hub resolves the issue. Fixes: 1208f9e1 ("USB: hub: Fix the broken detection of USB3 device in SMSC hub") Cc: stable@vger.kernel.org Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20210614155524.2228800-1-andrew@lunn.chSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Colin Ian King 提交于
The continue statement at the end of a for-loop has no effect, remove it. Signed-off-by: NColin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Continue has no effect") Link: https://lore.kernel.org/r/20210617112638.9072-1-colin.king@canonical.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Colin Ian King 提交于
There are continue statements at the end of loops that have no effect and are redundant. Remove them. Signed-off-by: NColin Ian King <colin.king@canonical.com> Addresses-Coverity: ("Continue has no effect") Link: https://lore.kernel.org/r/20210617123826.13764-1-colin.king@canonical.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Yang Yingliang 提交于
Use devm_platform_get_and_ioremap_resource() to simplify code. Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210616044519.2183826-3-yangyingliang@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Yang Yingliang 提交于
This node pointer is returned by of_parse_phandle() with refcount incremented in this function. of_node_put() on it before exitting this function. Fixes: 971ee247 ("usb: xhci: tegra: Enable ELPG for runtime/system PM") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210616044519.2183826-2-yangyingliang@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Yang Yingliang 提交于
Goto put_padctl to put refcount of device on error in tegra_xusb_probe() Fixes: 971ee247 ("usb: xhci: tegra: Enable ELPG for runtime/system PM") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210616044519.2183826-1-yangyingliang@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Moritz Fischer 提交于
The ROM load sometimes seems to return an unknown status (RENESAS_ROM_STATUS_NO_RESULT) instead of success / fail. If the ROM load indeed failed this leads to failures when trying to communicate with the controller later on. Attempt to load firmware using RAM load in those cases. Fixes: 2478be82 ("usb: renesas-xhci: Add ROM loader for uPD720201") Cc: stable@vger.kernel.org Cc: Mathias Nyman <mathias.nyman@intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Vinod Koul <vkoul@kernel.org> Tested-by: NVinod Koul <vkoul@kernel.org> Reviewed-by: NVinod Koul <vkoul@kernel.org> Signed-off-by: NMoritz Fischer <mdf@kernel.org> Link: https://lore.kernel.org/r/20210615153758.253572-1-mdf@kernel.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 16 6月, 2021 2 次提交
-
-
由 Pho Tran 提交于
Similar to some other CP210x device types, CP2108 has a number of GPIO pins that can be exposed through gpiolib. CP2108 has four serial interfaces but only one set of GPIO pins, which is modelled as a single gpio chip and registered as a child of the first interface. CP2108 has 16 GPIOs so the width of the state variables needs to be extended to 16 bits and this is also reflected in the control requests. Like CP2104, CP2108 have GPIO pins with configurable alternate functions and pins unavailable for GPIO use are determined and reported to gpiolib at probe. Signed-off-by: NPho Tran <pho.tran@silabs.com> Co-developed-by: NTung Pham <tung.pham@silabs.com> Signed-off-by: NTung Pham <tung.pham@silabs.com> [ johan: rewrite gpio get() and set(); misc cleanups; amend commit message ] Link: https://lore.kernel.org/r/20210610132844.25495-1-johan@kernel.orgSigned-off-by: NJohan Hovold <johan@kernel.org>
-
由 Breno Lima 提交于
i.MX8MM cannot detect certain CDP USB HUBs. usbmisc_imx.c driver is not following CDP timing requirements defined by USB BC 1.2 specification and section 3.2.4 Detection Timing CDP. During Primary Detection the i.MX device should turn on VDP_SRC and IDM_SINK for a minimum of 40ms (TVDPSRC_ON). After a time of TVDPSRC_ON, the i.MX is allowed to check the status of the D- line. Current implementation is waiting between 1ms and 2ms, and certain BC 1.2 complaint USB HUBs cannot be detected. Increase delay to 40ms allowing enough time for primary detection. During secondary detection the i.MX is required to disable VDP_SRC and IDM_SNK, and enable VDM_SRC and IDP_SINK for at least 40ms (TVDMSRC_ON). Current implementation is not disabling VDP_SRC and IDM_SNK, introduce disable sequence in imx7d_charger_secondary_detection() function. VDM_SRC and IDP_SINK should be enabled for at least 40ms (TVDMSRC_ON). Increase delay allowing enough time for detection. Cc: <stable@vger.kernel.org> Fixes: 746f316b ("usb: chipidea: introduce imx7d USB charger detection") Signed-off-by: NBreno Lima <breno.lima@nxp.com> Signed-off-by: NJun Li <jun.li@nxp.com> Link: https://lore.kernel.org/r/20210614175013.495808-1-breno.lima@nxp.comSigned-off-by: NPeter Chen <peter.chen@kernel.org>
-
- 15 6月, 2021 7 次提交
-
-
由 Matthias Kaehlcke 提交于
Call onboard_hub_create/destroy_pdevs() from _probe()/_remove() to create/destroy platform devices for onboard USB hubs that may be connected to the root hub of the controller. These functions are a NOP unless CONFIG_USB_ONBOARD_HUB=y/m. Also add a field to struct xhci_hcd to keep track of the onboard hub platform devices that are owned by the xHCI. Signed-off-by: NMatthias Kaehlcke <mka@chromium.org> Link: https://lore.kernel.org/r/20210609150159.v12.4.I7a3a7d9d2126c34079b1cab87aa0b2ec3030f9b7@changeidSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Matthias Kaehlcke 提交于
The main issue this driver addresses is that a USB hub needs to be powered before it can be discovered. For discrete onboard hubs (an example for such a hub is the Realtek RTS5411) this is often solved by supplying the hub with an 'always-on' regulator, which is kind of a hack. Some onboard hubs may require further initialization steps, like changing the state of a GPIO or enabling a clock, which requires even more hacks. This driver creates a platform device representing the hub which performs the necessary initialization. Currently it only supports switching on a single regulator, support for multiple regulators or other actions can be added as needed. Different initialization sequences can be supported based on the compatible string. Besides performing the initialization the driver can be configured to power the hub off during system suspend. This can help to extend battery life on battery powered devices which have no requirements to keep the hub powered during suspend. The driver can also be configured to leave the hub powered when a wakeup capable USB device is connected when suspending, and power it off otherwise. Technically the driver consists of two drivers, the platform driver described above and a very thin USB driver that subclasses the generic driver. The purpose of this driver is to provide the platform driver with the USB devices corresponding to the hub(s) (a hub controller may provide multiple 'logical' hubs, e.g. one to support USB 2.0 and another for USB 3.x). Note: the current series only supports hubs connected directly to a root hub (through xhci-plat), support for other configurations could be added if needed. Co-developed-by: NRavi Chandra Sadineni <ravisadineni@chromium.org> Acked-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NRavi Chandra Sadineni <ravisadineni@chromium.org> Signed-off-by: NMatthias Kaehlcke <mka@chromium.org> Link: https://lore.kernel.org/r/20210609150159.v12.2.I7c9a1f1d6ced41dd8310e8a03da666a32364e790@changeidSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunfeng Yun 提交于
Use clock bulk helpers to get/enable/disable clocks, meanwhile make sys_ck optional, then will be easier to handle clocks. Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1623139069-8173-24-git-send-email-chunfeng.yun@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunfeng Yun 提交于
Use common helper ssusb_set_mode() to do role switch instead of manual switch helper; Remove unnecessary local variable when get role status Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1623139069-8173-14-git-send-email-chunfeng.yun@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunfeng Yun 提交于
Force IDDIG status for all three ways of dual role switch, this is needed when use Type-C to switch mode. Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1623139069-8173-13-git-send-email-chunfeng.yun@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunfeng Yun 提交于
Add a helper to get pointer of ssusb_mtk struct from the pointer of otg_switch_mtk struct. Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1623139069-8173-12-git-send-email-chunfeng.yun@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunfeng Yun 提交于
This is a preparation patch to plan to use the same work to handle role switch for all three supported ways. Signed-off-by: NChunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1623139069-8173-11-git-send-email-chunfeng.yun@mediatek.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-