p!ranha?
Server IP : 103.169.32.36  /  Your IP : 216.73.217.13
Web Server : Apache
System : Linux web.dpmptsp 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/source/include/linux/usb/

Upload File :
Curr3nt_D!r [ Writeable ] D0cum3nt_r0Ot [ Writeable ]

 
Command :
Current File : /usr/lib/modules/3.10.0-1160.105.1.el7.x86_64/source/include/linux/usb/msm_hsusb.h
/* linux/include/asm-arm/arch-msm/hsusb.h
 *
 * Copyright (C) 2008 Google, Inc.
 * Author: Brian Swetland <swetland@google.com>
 * Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
 *
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef __ASM_ARCH_MSM_HSUSB_H
#define __ASM_ARCH_MSM_HSUSB_H

#include <linux/types.h>
#include <linux/usb/otg.h>

/**
 * Supported USB modes
 *
 * USB_PERIPHERAL       Only peripheral mode is supported.
 * USB_HOST             Only host mode is supported.
 * USB_OTG              OTG mode is supported.
 *
 */
enum usb_mode_type {
	USB_NONE = 0,
	USB_PERIPHERAL,
	USB_HOST,
	USB_OTG,
};

/**
 * OTG control
 *
 * OTG_NO_CONTROL	Id/VBUS notifications not required. Useful in host
 *                      only configuration.
 * OTG_PHY_CONTROL	Id/VBUS notifications comes form USB PHY.
 * OTG_PMIC_CONTROL	Id/VBUS notifications comes from PMIC hardware.
 * OTG_USER_CONTROL	Id/VBUS notifcations comes from User via sysfs.
 *
 */
enum otg_control_type {
	OTG_NO_CONTROL = 0,
	OTG_PHY_CONTROL,
	OTG_PMIC_CONTROL,
	OTG_USER_CONTROL,
};

/**
 * PHY used in
 *
 * INVALID_PHY			Unsupported PHY
 * CI_45NM_INTEGRATED_PHY	Chipidea 45nm integrated PHY
 * SNPS_28NM_INTEGRATED_PHY	Synopsis 28nm integrated PHY
 *
 */
enum msm_usb_phy_type {
	INVALID_PHY = 0,
	CI_45NM_INTEGRATED_PHY,
	SNPS_28NM_INTEGRATED_PHY,
};

#define IDEV_CHG_MAX	1500
#define IUNIT		100

/**
 * Different states involved in USB charger detection.
 *
 * USB_CHG_STATE_UNDEFINED	USB charger is not connected or detection
 *                              process is not yet started.
 * USB_CHG_STATE_WAIT_FOR_DCD	Waiting for Data pins contact.
 * USB_CHG_STATE_DCD_DONE	Data pin contact is detected.
 * USB_CHG_STATE_PRIMARY_DONE	Primary detection is completed (Detects
 *                              between SDP and DCP/CDP).
 * USB_CHG_STATE_SECONDARY_DONE	Secondary detection is completed (Detects
 *                              between DCP and CDP).
 * USB_CHG_STATE_DETECTED	USB charger type is determined.
 *
 */
enum usb_chg_state {
	USB_CHG_STATE_UNDEFINED = 0,
	USB_CHG_STATE_WAIT_FOR_DCD,
	USB_CHG_STATE_DCD_DONE,
	USB_CHG_STATE_PRIMARY_DONE,
	USB_CHG_STATE_SECONDARY_DONE,
	USB_CHG_STATE_DETECTED,
};

/**
 * USB charger types
 *
 * USB_INVALID_CHARGER	Invalid USB charger.
 * USB_SDP_CHARGER	Standard downstream port. Refers to a downstream port
 *                      on USB2.0 compliant host/hub.
 * USB_DCP_CHARGER	Dedicated charger port (AC charger/ Wall charger).
 * USB_CDP_CHARGER	Charging downstream port. Enumeration can happen and
 *                      IDEV_CHG_MAX can be drawn irrespective of USB state.
 *
 */
enum usb_chg_type {
	USB_INVALID_CHARGER = 0,
	USB_SDP_CHARGER,
	USB_DCP_CHARGER,
	USB_CDP_CHARGER,
};

/**
 * struct msm_otg_platform_data - platform device data
 *              for msm_otg driver.
 * @phy_init_seq: PHY configuration sequence. val, reg pairs
 *              terminated by -1.
 * @vbus_power: VBUS power on/off routine.
 * @power_budget: VBUS power budget in mA (0 will be treated as 500mA).
 * @mode: Supported mode (OTG/peripheral/host).
 * @otg_control: OTG switch controlled by user/Id pin
 * @default_mode: Default operational mode. Applicable only if
 *              OTG switch is controller by user.
 * @pclk_src_name: pclk is derived from ebi1_usb_clk in case of 7x27 and 8k
 *              dfab_usb_hs_clk in case of 8660 and 8960.
 */
struct msm_otg_platform_data {
	int *phy_init_seq;
	void (*vbus_power)(bool on);
	unsigned power_budget;
	enum usb_mode_type mode;
	enum otg_control_type otg_control;
	enum usb_mode_type default_mode;
	enum msm_usb_phy_type phy_type;
	void (*setup_gpio)(enum usb_otg_state state);
	char *pclk_src_name;
};

/**
 * struct msm_otg: OTG driver data. Shared by HCD and DCD.
 * @otg: USB OTG Transceiver structure.
 * @pdata: otg device platform data.
 * @irq: IRQ number assigned for HSUSB controller.
 * @clk: clock struct of usb_hs_clk.
 * @pclk: clock struct of usb_hs_pclk.
 * @pclk_src: pclk source for voting.
 * @phy_reset_clk: clock struct of usb_phy_clk.
 * @core_clk: clock struct of usb_hs_core_clk.
 * @regs: ioremapped register base address.
 * @inputs: OTG state machine inputs(Id, SessValid etc).
 * @sm_work: OTG state machine work.
 * @in_lpm: indicates low power mode (LPM) state.
 * @async_int: Async interrupt arrived.
 * @cur_power: The amount of mA available from downstream port.
 * @chg_work: Charger detection work.
 * @chg_state: The state of charger detection process.
 * @chg_type: The type of charger attached.
 * @dcd_retires: The retry count used to track Data contact
 *               detection process.
 */
struct msm_otg {
	struct usb_phy phy;
	struct msm_otg_platform_data *pdata;
	int irq;
	struct clk *clk;
	struct clk *pclk;
	struct clk *pclk_src;
	struct clk *phy_reset_clk;
	struct clk *core_clk;
	void __iomem *regs;
#define ID		0
#define B_SESS_VLD	1
	unsigned long inputs;
	struct work_struct sm_work;
	atomic_t in_lpm;
	int async_int;
	unsigned cur_power;
	struct delayed_work chg_work;
	enum usb_chg_state chg_state;
	enum usb_chg_type chg_type;
	u8 dcd_retries;
};

#endif
N4m3
5!z3
L45t M0d!f!3d
0wn3r / Gr0up
P3Rm!55!0n5
0pt!0n5
..
--
January 19 2024 08:12:51
0 / 0
0755
association.h
4.587 KB
November 06 2023 09:15:52
0 / 0
0644
atmel_usba_udc.h
0.411 KB
November 06 2023 09:15:52
0 / 0
0644
audio-v2.h
13.344 KB
November 06 2023 09:15:52
0 / 0
0644
audio-v3.h
13.937 KB
November 06 2023 09:15:52
0 / 0
0644
audio.h
1.231 KB
November 06 2023 09:15:52
0 / 0
0644
c67x00.h
1.823 KB
November 06 2023 09:15:52
0 / 0
0644
cdc-wdm.h
0.636 KB
November 06 2023 09:15:52
0 / 0
0644
cdc.h
1.481 KB
November 06 2023 09:15:52
0 / 0
0644
cdc_ncm.h
5.556 KB
November 06 2023 09:15:52
0 / 0
0644
ch9.h
2.125 KB
November 06 2023 09:15:52
0 / 0
0644
chipidea.h
0.98 KB
November 06 2023 09:15:52
0 / 0
0644
composite.h
20.717 KB
November 06 2023 09:15:52
0 / 0
0644
dwc3-omap.h
0.723 KB
November 06 2023 09:15:52
0 / 0
0644
ehci-dbgp.h
2.05 KB
November 06 2023 09:15:52
0 / 0
0644
ehci_def.h
7.897 KB
November 06 2023 09:15:52
0 / 0
0644
ehci_pdriver.h
2.314 KB
November 06 2023 09:15:52
0 / 0
0644
ezusb.h
0.279 KB
November 06 2023 09:15:52
0 / 0
0644
functionfs.h
1.063 KB
November 06 2023 09:15:52
0 / 0
0644
g_hid.h
1.131 KB
November 06 2023 09:15:52
0 / 0
0644
gadget.h
37.091 KB
November 06 2023 09:15:52
0 / 0
0644
gadget_configfs.h
2.943 KB
November 06 2023 09:15:52
0 / 0
0644
gpio_vbus.h
1.126 KB
November 06 2023 09:15:52
0 / 0
0644
hcd.h
26.007 KB
November 06 2023 09:15:52
0 / 0
0644
input.h
0.699 KB
November 06 2023 09:15:52
0 / 0
0644
iowarrior.h
1.342 KB
November 06 2023 09:15:52
0 / 0
0644
irda.h
3.471 KB
November 06 2023 09:15:52
0 / 0
0644
isp116x.h
1.133 KB
November 06 2023 09:15:52
0 / 0
0644
isp1301.h
2.376 KB
November 06 2023 09:15:52
0 / 0
0644
isp1362.h
1.59 KB
November 06 2023 09:15:52
0 / 0
0644
isp1760.h
0.618 KB
November 06 2023 09:15:52
0 / 0
0644
m66592.h
1.41 KB
November 06 2023 09:15:52
0 / 0
0644
msm_hsusb.h
5.409 KB
November 06 2023 09:15:52
0 / 0
0644
msm_hsusb_hw.h
2.08 KB
November 06 2023 09:15:52
0 / 0
0644
musb-ux500.h
0.878 KB
November 06 2023 09:15:52
0 / 0
0644
musb.h
4.143 KB
November 06 2023 09:15:52
0 / 0
0644
net2280.h
23.555 KB
November 06 2023 09:15:52
0 / 0
0644
of.h
1.967 KB
November 06 2023 09:15:52
0 / 0
0644
ohci_pdriver.h
1.707 KB
November 06 2023 09:15:52
0 / 0
0644
omap_control_usb.h
2.439 KB
November 06 2023 09:15:52
0 / 0
0644
omap_usb.h
1.665 KB
November 06 2023 09:15:52
0 / 0
0644
otg-fsm.h
8.591 KB
November 06 2023 09:15:52
0 / 0
0644
otg.h
2.73 KB
November 06 2023 09:15:52
0 / 0
0644
pd.h
13.699 KB
November 06 2023 09:15:52
0 / 0
0644
pd_ado.h
1.163 KB
November 06 2023 09:15:52
0 / 0
0644
pd_bdo.h
0.987 KB
November 06 2023 09:15:52
0 / 0
0644
pd_ext_sdb.h
0.811 KB
November 06 2023 09:15:52
0 / 0
0644
pd_vdo.h
7.579 KB
November 06 2023 09:15:52
0 / 0
0644
phy.h
9.077 KB
November 06 2023 09:15:52
0 / 0
0644
phy_companion.h
1.168 KB
November 06 2023 09:15:52
0 / 0
0644
quirks.h
2.159 KB
November 06 2023 09:15:52
0 / 0
0644
r8a66597.h
17.646 KB
November 06 2023 09:15:52
0 / 0
0644
renesas_usbhs.h
4.134 KB
November 06 2023 09:15:52
0 / 0
0644
rndis_host.h
5.938 KB
November 06 2023 09:15:52
0 / 0
0644
role.h
1.802 KB
November 06 2023 09:15:52
0 / 0
0644
samsung_usb_phy.h
0.518 KB
November 06 2023 09:15:52
0 / 0
0644
serial.h
17.122 KB
November 06 2023 09:15:52
0 / 0
0644
sl811.h
0.818 KB
November 06 2023 09:15:52
0 / 0
0644
storage.h
2.583 KB
November 06 2023 09:15:52
0 / 0
0644
tcpm.h
5.679 KB
November 06 2023 09:15:52
0 / 0
0644
tegra_usb_phy.h
2.017 KB
November 06 2023 09:15:52
0 / 0
0644
tilegx.h
0.96 KB
November 06 2023 09:15:52
0 / 0
0644
typec.h
6.788 KB
November 06 2023 09:15:52
0 / 0
0644
typec_altmode.h
5.281 KB
November 06 2023 09:15:52
0 / 0
0644
typec_dp.h
3.132 KB
November 06 2023 09:15:52
0 / 0
0644
typec_mux.h
1.538 KB
November 06 2023 09:15:52
0 / 0
0644
uas.h
2.071 KB
November 06 2023 09:15:52
0 / 0
0644
ulpi.h
1.99 KB
November 06 2023 09:15:52
0 / 0
0644
usb338x.h
7.634 KB
November 06 2023 09:15:52
0 / 0
0644
usb_phy_generic.h
0.871 KB
November 06 2023 09:15:52
0 / 0
0644
usbnet.h
9.927 KB
November 06 2023 09:15:52
0 / 0
0644
wusb-wa.h
7.499 KB
November 06 2023 09:15:52
0 / 0
0644
wusb.h
9.92 KB
November 06 2023 09:15:52
0 / 0
0644
xhci-dbgp.h
0.806 KB
November 06 2023 09:15:52
0 / 0
0644