Home
last modified time | relevance | path

Searched refs:tcpci (Results 1 – 4 of 4) sorted by relevance

/rk3399_rockchip-uboot/drivers/power/power_delivery/
H A Dtcpci.c29 struct tcpci { struct
44 struct tcpci *tcpci; member
48 static inline struct tcpci *tcpc_to_tcpci(struct tcpc_dev *tcpc) in tcpc_to_tcpci()
50 return container_of(tcpc, struct tcpci, tcpc); in tcpc_to_tcpci()
53 static int tcpci_read16(struct tcpci *tcpci, unsigned int reg, u16 *val) in tcpci_read16() argument
58 ret = dm_i2c_read(tcpci->dev, reg, buffer, 2); in tcpci_read16()
70 static int tcpci_block_read(struct tcpci *tcpci, unsigned int reg, in tcpci_block_read() argument
75 ret = dm_i2c_read(tcpci->dev, reg, data, length); in tcpci_block_read()
83 static int tcpci_write16(struct tcpci *tcpci, unsigned int reg, u16 val) in tcpci_write16() argument
90 ret = dm_i2c_write(tcpci->dev, reg, buffer, 2); in tcpci_write16()
[all …]
H A Dtcpci.h133 struct tcpci;
136 int (*init)(struct tcpci *tcpci, struct tcpci_data *data);
137 int (*set_vconn)(struct tcpci *tcpci, struct tcpci_data *data,
139 int (*start_drp_toggling)(struct tcpci *tcpci, struct tcpci_data *data,
143 struct tcpci *tcpci_register_port(struct udevice *dev, struct tcpci_data *data);
144 void tcpci_unregister_port(struct tcpci *tcpci);
145 int tcpci_get_voltage_fun(struct tcpci *tcpci);
146 int tcpci_get_current_fun(struct tcpci *tcpci);
147 int tcpci_get_online_fun(struct tcpci *tcpci);
148 irqreturn_t tcpci_irq(struct tcpci *tcpci);
H A Dtcpci_husb311.c28 struct tcpci *tcpci; member
93 static int husb311_init(struct tcpci *tcpci, struct tcpci_data *tdata) in husb311_init() argument
162 chip->tcpci = tcpci_register_port(chip->udev, &chip->data); in husb311_probe()
163 if (IS_ERR(chip->tcpci)) in husb311_probe()
164 return PTR_ERR(chip->tcpci); in husb311_probe()
180 tcpci_unregister_port(chip->tcpci); in husb311_remove()
189 return tcpci_get_voltage_fun(chip->tcpci); in husb311_get_voltage()
196 return tcpci_get_current_fun(chip->tcpci); in husb311_get_current()
203 return tcpci_get_online_fun(chip->tcpci); in husb311_get_online()
H A DMakefile6 obj-$(CONFIG_TYPEC_TCPCI) += tcpci.o