21 #include <linux/kernel.h>
22 #include <linux/module.h>
25 #include <linux/i2c.h>
30 #define MAX34440_MFR_VOUT_PEAK 0xd4
31 #define MAX34440_MFR_IOUT_PEAK 0xd5
32 #define MAX34440_MFR_TEMPERATURE_PEAK 0xd6
33 #define MAX34440_MFR_VOUT_MIN 0xd7
35 #define MAX34446_MFR_POUT_PEAK 0xe0
36 #define MAX34446_MFR_POUT_AVG 0xe1
37 #define MAX34446_MFR_IOUT_AVG 0xe2
38 #define MAX34446_MFR_TEMPERATURE_AVG 0xe3
40 #define MAX34440_STATUS_OC_WARN (1 << 0)
41 #define MAX34440_STATUS_OC_FAULT (1 << 1)
42 #define MAX34440_STATUS_OT_FAULT (1 << 5)
43 #define MAX34440_STATUS_OT_WARN (1 << 6)
50 #define to_max34440_data(x) container_of(x, struct max34440_data, info)
163 static int max34440_read_byte_data(
struct i2c_client *client,
int page,
int reg)
241 .read_byte_data = max34440_read_byte_data,
242 .read_word_data = max34440_read_word_data,
243 .write_word_data = max34440_write_word_data,
284 .read_byte_data = max34440_read_byte_data,
285 .read_word_data = max34440_read_word_data,
286 .write_word_data = max34440_write_word_data,
321 .read_byte_data = max34440_read_byte_data,
322 .read_word_data = max34440_read_word_data,
323 .write_word_data = max34440_write_word_data,
327 static int max34440_probe(
struct i2c_client *client,
336 data->
id =
id->driver_data;
337 data->
info = max34440_info[
id->driver_data];
355 .probe = max34440_probe,
357 .id_table = max34440_id,