Lines Matching refs:to

39 Each backend should come with separate documentation to describe its specific
49 The bus driver sends an event to the backend using the following function:
54 types described hereafter. 'val' holds an u8 value for the data byte to be
55 read/written and is thus bidirectional. The pointer to val must always be
67 Another I2C master wants to write data to us. This event should be sent once
69 there is nothing to process or return. Wakeup or initialization probably needs
70 to be done, though.
74 'val': backend returns first byte to be sent
77 Another I2C master wants to read data from us. This event should be sent once
86 Another I2C master has sent a byte to us which needs to be set in 'val'. If 'ret'
92 'val': backend returns next byte to be sent
95 The bus driver requests the next byte to be sent to another I2C master in
97 only means that the previous byte is shifted out to the bus! To ensure seamless
101 needs to be sent again on the next I2C_SLAVE_READ_REQUEST, depending a bit on
110 reset its state machine for I2C transfers to be able to receive new requests.
116 If you want to write a software backend:
129 If you want to add slave support to the bus driver:
131 * implement calls to register/unregister the slave and add those to the
132 struct i2c_algorithm. When registering, you probably need to set the i2c
134 should use pm_runtime_forbid() because your device usually needs to be powered
135 on always to be able to detect its slave address. When unregistering, do the
138 * Catch the slave interrupts and send appropriate i2c_slave_events to the backend.
146 It is good behaviour to always ACK the address phase, so the master knows if a
147 device is basically present or if it mysteriously disappeared. Using NACK to
148 state being busy is troublesome. SMBus demands to always ACK the address phase,
151 to NACK them. For those reasons, this API does not support NACK in the address
154 Currently, there is no slave event to report if the master did ACK or NACK a
157 to send STOP after that and we have an event for that. Also, keep in mind not
158 all I2C controllers have the possibility to report that event.
166 this time of writing. Some points to keep in mind when using buffers:
168 * Buffers should be opt-in and slave drivers will always have to support
177 means additional code to handle this exception. Such code tends to be