This source file includes following definitions.
- ir38064_probe
1
2
3
4
5
6
7
8
9
10
11
12
13
14 #include <linux/err.h>
15 #include <linux/i2c.h>
16 #include <linux/init.h>
17 #include <linux/kernel.h>
18 #include <linux/module.h>
19 #include "pmbus.h"
20
21 static struct pmbus_driver_info ir38064_info = {
22 .pages = 1,
23 .format[PSC_VOLTAGE_IN] = linear,
24 .format[PSC_VOLTAGE_OUT] = direct,
25 .format[PSC_CURRENT_OUT] = linear,
26 .format[PSC_POWER] = linear,
27 .format[PSC_TEMPERATURE] = linear,
28 .m[PSC_VOLTAGE_OUT] = 256,
29 .b[PSC_VOLTAGE_OUT] = 0,
30 .R[PSC_VOLTAGE_OUT] = 0,
31 .func[0] = PMBUS_HAVE_VIN | PMBUS_HAVE_STATUS_INPUT
32 | PMBUS_HAVE_TEMP | PMBUS_HAVE_STATUS_TEMP
33 | PMBUS_HAVE_VOUT | PMBUS_HAVE_STATUS_VOUT
34 | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT
35 | PMBUS_HAVE_POUT,
36 };
37
38 static int ir38064_probe(struct i2c_client *client,
39 const struct i2c_device_id *id)
40 {
41 return pmbus_do_probe(client, id, &ir38064_info);
42 }
43
44 static const struct i2c_device_id ir38064_id[] = {
45 {"ir38064", 0},
46 {}
47 };
48
49 MODULE_DEVICE_TABLE(i2c, ir38064_id);
50
51
52 static struct i2c_driver ir38064_driver = {
53 .driver = {
54 .name = "ir38064",
55 },
56 .probe = ir38064_probe,
57 .remove = pmbus_do_remove,
58 .id_table = ir38064_id,
59 };
60
61 module_i2c_driver(ir38064_driver);
62
63 MODULE_AUTHOR("Maxim Sloyko <maxims@google.com>");
64 MODULE_DESCRIPTION("PMBus driver for Infineon IR38064");
65 MODULE_LICENSE("GPL");