Lines Matching refs:and
4 To set up a driver, you need to do several things. Some are optional, and
22 Usually, you will implement a single driver structure, and instantiate
24 routines, and should be zero-initialized except for fields with data you
26 driver model device node, and its I2C address.
54 The name field is the driver name, and must not contain spaces. It
89 I have found it useful to define foo_read and foo_write functions for this.
94 The below functions are simple examples, and should not be copied
116 Probing and attaching
120 monitoring chips on PC motherboards, and thus used to embed some assumptions
121 that were more appropriate to SMBus (and PCs) than to I2C. One of these
122 assumptions was that most adapters and devices drivers support the SMBUS_QUICK
123 protocol to probe device presence. Another was that devices and their drivers
126 As Linux and its I2C stack became more widely used in embedded systems
127 and complex components such as DVB adapters, those assumptions became more
128 problematic. Drivers for I2C devices that issue interrupts need more (and
140 and linking them to board-specific configuration information about IRQs
141 and other wiring artifacts, chip type, and so on. That could be used to
146 those devices, and a remove() method to unbind.
154 (zero not a negative status code) it may save the handle and use it until
167 structure with the device address and driver name, and calling
169 take care of finding the right driver and will call its probe() method.
171 want using the type field. You can also specify an IRQ and platform data
177 models, and I2C device addresses change from one model to the next. In
197 was working, and is now available as an extension to the standard
201 identify supported devices (returning 0 for supported ones and -ENODEV
202 for unsupported ones), a list of addresses to probe, and a device type
204 connected (and not otherwise enumerated) will be probed. For example,
206 needed would set its class to I2C_CLASS_HWMON, and only I2C adapters
212 Note that this mechanism is purely optional and not suitable for all
215 otherwise misdetections are likely to occur and things can get wrong
220 transfer can be seen as a read operation by a chip and as a write
268 /* Substitute your own name and email address */
283 and resume).
285 These are standard driver model calls, and they work just like they
286 would for any other driver stack. The calls can sleep, and can use
288 parent I2C adapter is active when these calls are issued, and IRQs
300 would for any other driver stack: the calls can sleep, and can use
308 need this, and its use is deprecated anyway, so newer design should not
312 Sending and receiving
318 If you can choose between plain I2C communication and SMBus level
330 These routines read and write some bytes from/to a client. The client
341 and they can be mixed in any way. The transactions are combined: no
344 and the message data itself.