Lines Matching +full:stop +full:- +full:ack

1 // SPDX-License-Identifier: GPL-2.0+
15 * Please see doc/driver-model/i2c-howto.txt for instructions.
96 /*-----------------------------------------------------------------------
101 #define I2C_ACK 0 /* PD_SDA level to ack a byte */
113 /*-----------------------------------------------------------------------
126 /*-----------------------------------------------------------------------
129 * <stop> at the end of the sequence for belts & suspenders.
155 /*-----------------------------------------------------------------------
156 * START: High -> Low on SDA while SCL is High
172 /*-----------------------------------------------------------------------
173 * STOP: Low -> High on SDA while SCL is High
191 /*-----------------------------------------------------------------------
192 * ack should be I2C_ACK or I2C_NOACK
194 static void send_ack(int ack) in send_ack() argument
201 I2C_SDA(ack); in send_ack()
210 /*-----------------------------------------------------------------------
233 * Look for an <ACK>(negative logic) and return it. in write_byte()
248 return(nack); /* not a nack is an ack */ in write_byte()
251 /*-----------------------------------------------------------------------
252 * if ack == I2C_ACK, ACK the byte so can continue reading, else
255 static uchar read_byte(int ack) in read_byte() argument
276 send_ack(ack); in read_byte()
281 /*-----------------------------------------------------------------------
302 /*-----------------------------------------------------------------------
322 /*-----------------------------------------------------------------------
363 shift = (alen-1) * 8; in soft_i2c_read()
364 while(alen-- > 0) { in soft_i2c_read()
366 PRINTD("i2c_read, address not <ACK>ed\n"); in soft_i2c_read()
369 shift -= 8; in soft_i2c_read()
372 /* Some I2C chips need a stop/start sequence here, in soft_i2c_read()
373 * other chips don't work with a full stop and need in soft_i2c_read()
375 * stop/start sequence. in soft_i2c_read()
387 * of an ACK(len == 0) to terminate the read. in soft_i2c_read()
390 while(len-- > 0) { in soft_i2c_read()
397 /*-----------------------------------------------------------------------
414 shift = (alen-1) * 8; in soft_i2c_write()
415 while(alen-- > 0) { in soft_i2c_write()
417 PRINTD("i2c_write, address not <ACK>ed\n"); in soft_i2c_write()
420 shift -= 8; in soft_i2c_write()
423 while(len-- > 0) { in soft_i2c_write()