29 #include <linux/kernel.h>
31 #include <linux/module.h>
32 #include <linux/slab.h>
33 #include <linux/i2c.h>
41 #define USER_EEPROM_BASE 0x8100
42 #define USER_EEPROM_SIZE 0x0200
43 #define USER_EEPROM_SLICES 32
46 #define MAX6875_CMD_BLK_READ 0x84
71 if (!(data->
valid & (1 << slice)) ||
74 dev_dbg(&client->
dev,
"Starting update of slice %u\n", slice);
76 data->
valid &= ~(1 << slice);
86 if (i2c_check_functionality(client->
adapter,
104 data->
valid |= (1 << slice);
112 char *
buf, loff_t off,
size_t count)
116 int slice, max_slice;
126 for (slice = (off >>
SLICE_BITS); slice <= max_slice; slice++)
127 max6875_update_slice(client, slice);
140 .read = max6875_read,
143 static int max6875_probe(
struct i2c_client *client,
155 if (client->
addr & 1)
169 i2c_set_clientdata(client, data);
174 goto exit_remove_fake;
185 static int max6875_remove(
struct i2c_client *client)
206 .probe = max6875_probe,
207 .remove = max6875_remove,
208 .id_table = max6875_id,