Lines Matching full:foo*
19 it for non-exported symbols too. We will use the prefix ``foo_`` in this
34 static struct i2c_device_id foo_idtable[] = {
35 { "foo", my_id_for_foo },
40 MODULE_DEVICE_TABLE(i2c, foo_idtable);
42 static struct i2c_driver foo_driver = {
44 .name = "foo",
45 .pm = &foo_pm_ops, /* optional */
48 .id_table = foo_idtable,
49 .probe = foo_probe,
50 .remove = foo_remove,
53 .detect = foo_detect,
56 .shutdown = foo_shutdown, /* optional */
57 .command = foo_command, /* optional, deprecated */
62 although you can use MODULE_ALIAS (passing "foo" in this example) to add
97 I have found it useful to define foo_read and foo_write functions for this.
105 int foo_read_value(struct i2c_client *client, u8 reg)
113 int foo_write_value(struct i2c_client *client, u8 reg, u16 value)
158 static int foo_probe(struct i2c_client *client);
159 static void foo_remove(struct i2c_client *client);
162 handle may be used during foo_probe(). If foo_probe() reports success
164 foo_remove() returns. That binding model is used by most Linux drivers.
172 const struct i2c_device_id *id = i2c_match_id(foo_idtable, client);
252 When the kernel is booted, or when your foo driver module is inserted,
258 static int __init foo_init(void)
260 return i2c_add_driver(&foo_driver);
262 module_init(foo_init);
264 static void __exit foo_cleanup(void)
266 i2c_del_driver(&foo_driver);
268 module_exit(foo_cleanup);
272 module_i2c_driver(foo_driver);
287 MODULE_DESCRIPTION("Driver for Barf Inc. Foo I2C devices");