···4141/* Addresses to scan */4242static const unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };43434444-/* Insmod parameters */4545-I2C_CLIENT_INSMOD_1(gl520sm);4646-4744/* Many GL520 constants specified below4845One of the inputs can be configured as either temp or voltage.4946That's why _TEMP2 and _IN4 access the same register···87908891/* Driver data */8992static const struct i2c_device_id gl520_id[] = {9090- { "gl520sm", gl520sm },9393+ { "gl520sm", 0 },9194 { }9295};9396MODULE_DEVICE_TABLE(i2c, gl520_id);
···32323333/*3434 * This driver handles the LM75 and compatible digital temperature sensors.3535- * Only types which are _not_ listed in I2C_CLIENT_INSMOD_*() need to be3636- * listed here. We start at 9 since I2C_CLIENT_INSMOD_*() currently allow3737- * definition of up to 8 chip types (plus zero).3835 */39364037enum lm75_type { /* keep sorted in alphabetical order */4141- ds1775 = 9,3838+ ds1775,4239 ds75,4343- /* lm75 -- in I2C_CLIENT_INSMOD_1() */4040+ lm75,4441 lm75a,4542 max6625,4643 max6626,···5457/* Addresses scanned */5558static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,5659 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };5757-5858-/* Insmod parameters */5959-I2C_CLIENT_INSMOD_1(lm75);606061616262/* The LM75 registers */
···604604605605/* These are the ones you want to use in your own drivers. Pick the one606606 which matches the number of devices the driver differenciates between. */607607-#define I2C_CLIENT_INSMOD608608-609609-#define I2C_CLIENT_INSMOD_1(chip1) \610610-enum chips { any_chip, chip1 }611611-612607#define I2C_CLIENT_INSMOD_2(chip1, chip2) \613608enum chips { any_chip, chip1, chip2 }614609