Lines Matching refs:pi
43 static int on26_read_regr(struct pi_adapter *pi, int cont, int regr) in on26_read_regr() argument
49 switch (pi->mode) { in on26_read_regr()
72 static void on26_write_regr(struct pi_adapter *pi, int cont, int regr, int val) in on26_write_regr() argument
76 switch (pi->mode) { in on26_write_regr()
100 static void on26_connect(struct pi_adapter *pi) in on26_connect() argument
104 pi->saved_r0 = r0(); in on26_connect()
105 pi->saved_r2 = r2(); in on26_connect()
108 if (pi->mode) in on26_connect()
117 static void on26_disconnect(struct pi_adapter *pi) in on26_disconnect() argument
119 if (pi->mode >= 2) { in on26_disconnect()
125 w0(pi->saved_r0); in on26_disconnect()
126 w2(pi->saved_r2); in on26_disconnect()
132 static int on26_test_port(struct pi_adapter *pi) in on26_test_port() argument
136 pi->saved_r0 = r0(); in on26_test_port()
137 pi->saved_r2 = r2(); in on26_test_port()
139 d = pi->delay; in on26_test_port()
140 m = pi->mode; in on26_test_port()
141 pi->delay = 5; in on26_test_port()
142 pi->mode = 0; in on26_test_port()
162 on26_write_regr(pi, 0, 6, 0xa0); in on26_test_port()
165 on26_write_regr(pi, 0, 6, 0xa0); in on26_test_port()
166 x = on26_read_regr(pi, 0, 7); in on26_test_port()
167 on26_write_regr(pi, 0, 6, 0xb0); in on26_test_port()
168 y = on26_read_regr(pi, 0, 7); in on26_test_port()
175 dev_err(&pi->dev, in on26_test_port()
183 pi->delay = d; in on26_test_port()
184 pi->mode = m; in on26_test_port()
185 w0(pi->saved_r0); in on26_test_port()
186 w2(pi->saved_r2); in on26_test_port()
191 static void on26_read_block(struct pi_adapter *pi, char *buf, int count) in on26_read_block() argument
195 switch (pi->mode) { in on26_read_block()
242 static void on26_write_block(struct pi_adapter *pi, char *buf, int count) in on26_write_block() argument
246 switch (pi->mode) { in on26_write_block()
250 w0(2); P1; w0(0x18 + pi->mode); P2; w0(0); P1; in on26_write_block()
257 w0(2); P1; w0(8 + pi->mode); P2; in on26_write_block()
286 static void on26_log_adapter(struct pi_adapter *pi) in on26_log_adapter() argument
290 dev_info(&pi->dev, in on26_log_adapter()
292 pi->port, pi->mode, mode_string[pi->mode], pi->delay); in on26_log_adapter()