diff options
author | AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> | 2022-02-14 12:19:05 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-17 16:12:04 +0100 |
commit | 5f508d79449fe2347556fcc963a258cf547f381f (patch) | |
tree | 3fa04442cdd912a5b9bfd8fbe6f56d6463e9d18f /drivers/usb/host/xhci-mtk.h | |
parent | usb: host: ehci-platform: Update brcm, xgs-iproc-ehci workaround (diff) | |
download | linux-5f508d79449fe2347556fcc963a258cf547f381f.tar.xz linux-5f508d79449fe2347556fcc963a258cf547f381f.zip |
usb: host: xhci-mtk: Simplify supplies handling with regulator_bulk
Remove the custom functions xhci_mtk_ldos_{enable,disable}() by
switching to using regulator_bulk to perform the very same thing,
as the regulators are always either both enabled or both disabled.
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220214111905.77903-1-angelogioacchino.delregno@collabora.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/usb/host/xhci-mtk.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h index 4b1ea89f959a..ffd4b493b4ba 100644 --- a/drivers/usb/host/xhci-mtk.h +++ b/drivers/usb/host/xhci-mtk.h @@ -11,10 +11,12 @@ #include <linux/clk.h> #include <linux/hashtable.h> +#include <linux/regulator/consumer.h> #include "xhci.h" #define BULK_CLKS_NUM 5 +#define BULK_VREGS_NUM 2 /* support at most 64 ep, use 32 size hash table */ #define SCH_EP_HASH_BITS 5 @@ -150,9 +152,8 @@ struct xhci_hcd_mtk { int num_u3_ports; int u2p_dis_msk; int u3p_dis_msk; - struct regulator *vusb33; - struct regulator *vbus; struct clk_bulk_data clks[BULK_CLKS_NUM]; + struct regulator_bulk_data supplies[BULK_VREGS_NUM]; unsigned int has_ippc:1; unsigned int lpm_support:1; unsigned int u2_lpm_disable:1; |