1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * lm75.c - Part of lm_sensors, Linux kernel modules for hardware
5 * Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
8 #include <linux/module.h>
9 #include <linux/init.h>
10 #include <linux/slab.h>
11 #include <linux/jiffies.h>
12 #include <linux/i2c.h>
13 #include <linux/hwmon.h>
14 #include <linux/hwmon-sysfs.h>
15 #include <linux/err.h>
17 #include <linux/regmap.h>
18 #include <linux/util_macros.h>
19 #include <linux/regulator/consumer.h>
23 * This driver handles the LM75 and compatible digital temperature sensors.
26 enum lm75_type { /* keep sorted in alphabetical order */
57 * struct lm75_params - lm75 configuration parameters.
58 * @set_mask: Bits to set in configuration register when configuring
60 * @clr_mask: Bits to clear in configuration register when configuring
62 * @default_resolution: Default number of bits to represent the temperature
64 * @resolution_limits: Limit register resolution. Optional. Should be set if
65 * the resolution of limit registers does not match the
66 * resolution of the temperature register.
67 * @resolutions: List of resolutions associated with sample times.
68 * Optional. Should be set if num_sample_times is larger
69 * than 1, and if the resolution changes with sample times.
70 * If set, number of entries must match num_sample_times.
71 * @default_sample_time:Sample time to be set by default.
72 * @num_sample_times: Number of possible sample times to be set. Optional.
73 * Should be set if the number of sample times is larger
75 * @sample_times: All the possible sample times to be set. Mandatory if
76 * num_sample_times is larger than 1. If set, number of
77 * entries must match num_sample_times.
83 u8 default_resolution;
85 const u8 *resolutions;
86 unsigned int default_sample_time;
88 const unsigned int *sample_times;
91 /* Addresses scanned */
92 static const unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
93 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
95 /* The LM75 registers */
96 #define LM75_REG_TEMP 0x00
97 #define LM75_REG_CONF 0x01
98 #define LM75_REG_HYST 0x02
99 #define LM75_REG_MAX 0x03
100 #define PCT2075_REG_IDLE 0x04
102 /* Each client has this additional data */
104 struct i2c_client *client;
105 struct regmap *regmap;
106 struct regulator *vs;
109 u8 resolution; /* In bits, 9 to 16 */
110 unsigned int sample_time; /* In ms */
112 const struct lm75_params *params;
115 /*-----------------------------------------------------------------------*/
117 static const u8 lm75_sample_set_masks[] = { 0 << 5, 1 << 5, 2 << 5, 3 << 5 };
119 #define LM75_SAMPLE_CLEAR_MASK (3 << 5)
121 /* The structure below stores the configuration values of the supported devices.
122 * In case of being supported multiple configurations, the default one must
123 * always be the first element of the array
125 static const struct lm75_params device_params[] = {
127 .clr_mask = 1 << 5, /* not one-shot mode */
128 .default_resolution = 12,
129 .default_sample_time = MSEC_PER_SEC / 10,
132 .set_mask = 3 << 5, /* 12-bit mode*/
133 .default_resolution = 12,
134 .default_sample_time = 200,
135 .num_sample_times = 4,
136 .sample_times = (unsigned int []){ 25, 50, 100, 200 },
137 .resolutions = (u8 []) {9, 10, 11, 12 },
141 .set_mask = 2 << 5, /* 11-bit mode */
142 .default_resolution = 11,
143 .default_sample_time = 500,
144 .num_sample_times = 4,
145 .sample_times = (unsigned int []){ 125, 250, 500, 1000 },
146 .resolutions = (u8 []) {9, 10, 11, 12 },
150 .set_mask = 2 << 5, /* 11-bit mode */
151 .default_resolution = 11,
152 .default_sample_time = 600,
153 .num_sample_times = 4,
154 .sample_times = (unsigned int []){ 150, 300, 600, 1200 },
155 .resolutions = (u8 []) {9, 10, 11, 12 },
159 .set_mask = 2 << 5, /* 11-bit mode */
160 .default_resolution = 11,
161 .default_sample_time = 600,
162 .num_sample_times = 4,
163 .sample_times = (unsigned int []){ 150, 300, 600, 1200 },
164 .resolutions = (u8 []) {9, 10, 11, 12 },
167 .default_resolution = 9,
168 .default_sample_time = MSEC_PER_SEC / 6,
171 .set_mask = 3 << 5, /* 12-bit mode*/
172 .default_resolution = 12,
173 .default_sample_time = 200,
174 .num_sample_times = 4,
175 .sample_times = (unsigned int []){ 25, 50, 100, 200 },
176 .resolutions = (u8 []) {9, 10, 11, 12 },
179 .default_resolution = 9,
180 .default_sample_time = MSEC_PER_SEC / 10,
183 .default_resolution = 9,
184 .default_sample_time = MSEC_PER_SEC / 10,
187 .default_resolution = 9,
188 .default_sample_time = MSEC_PER_SEC / 10,
191 .default_resolution = 11,
192 .default_sample_time = MSEC_PER_SEC / 10,
195 .default_resolution = 9,
196 .default_sample_time = MSEC_PER_SEC / 7,
199 .default_resolution = 12,
200 .default_sample_time = MSEC_PER_SEC / 7,
201 .resolution_limits = 9,
204 .default_resolution = 16,
205 .default_sample_time = MSEC_PER_SEC / 20,
208 .default_resolution = 9,
209 .default_sample_time = MSEC_PER_SEC / 18,
212 .default_resolution = 11,
213 .default_sample_time = MSEC_PER_SEC / 10,
214 .num_sample_times = 31,
215 .sample_times = (unsigned int []){ 100, 200, 300, 400, 500, 600,
216 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700,
217 1800, 1900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700,
218 2800, 2900, 3000, 3100 },
221 .set_mask = 3 << 5, /* 12-bit mode */
222 .clr_mask = 1 << 7, /* not one-shot mode */
223 .default_resolution = 12,
224 .resolution_limits = 9,
225 .default_sample_time = 240,
226 .num_sample_times = 4,
227 .sample_times = (unsigned int []){ 30, 60, 120, 240 },
228 .resolutions = (u8 []) {9, 10, 11, 12 },
231 .set_mask = 3 << 5, /* 12-bit mode */
232 .clr_mask = 1 << 7, /* not one-shot mode */
233 .default_resolution = 12,
234 .default_sample_time = 320,
235 .num_sample_times = 4,
236 .sample_times = (unsigned int []){ 40, 80, 160, 320 },
237 .resolutions = (u8 []) {9, 10, 11, 12 },
240 .set_mask = 3 << 5, /* 12-bit mode */
241 .clr_mask = 1 << 7, /* not one-shot mode */
242 .default_resolution = 12,
243 .default_sample_time = 320,
244 .num_sample_times = 4,
245 .sample_times = (unsigned int []){ 40, 80, 160, 320 },
246 .resolutions = (u8 []) {9, 10, 11, 12 },
249 .set_mask = 3 << 5, /* 12-bit mode */
250 .clr_mask = 1 << 7, /* not one-shot mode*/
251 .default_resolution = 12,
252 .default_sample_time = 220,
253 .num_sample_times = 4,
254 .sample_times = (unsigned int []){ 28, 55, 110, 220 },
255 .resolutions = (u8 []) {9, 10, 11, 12 },
258 .set_mask = 3 << 5, /* 8 samples / second */
259 .clr_mask = 1 << 7, /* no one-shot mode*/
260 .default_resolution = 12,
261 .default_sample_time = 125,
262 .num_sample_times = 4,
263 .sample_times = (unsigned int []){ 125, 250, 1000, 4000 },
266 .set_mask = 3 << 5, /* 12-bit mode */
267 .clr_mask = 1 << 7, /* not one-shot mode*/
268 .default_resolution = 12,
269 .default_sample_time = 220,
270 .num_sample_times = 4,
271 .sample_times = (unsigned int []){ 28, 55, 110, 220 },
272 .resolutions = (u8 []) {9, 10, 11, 12 },
275 .set_mask = 3 << 5, /* 12-bit mode */
276 .clr_mask = 1 << 7, /* not one-shot mode*/
277 .default_resolution = 12,
278 .default_sample_time = 220,
279 .num_sample_times = 4,
280 .sample_times = (unsigned int []){ 28, 55, 110, 220 },
281 .resolutions = (u8 []) {9, 10, 11, 12 },
284 .set_mask = 3 << 5, /* 12-bit mode */
285 .clr_mask = 1 << 7, /* not one-shot mode*/
286 .default_resolution = 12,
287 .default_sample_time = 220,
288 .num_sample_times = 4,
289 .sample_times = (unsigned int []){ 28, 55, 110, 220 },
290 .resolutions = (u8 []) {9, 10, 11, 12 },
292 [tmp75b] = { /* not one-shot mode, Conversion rate 37Hz */
293 .clr_mask = 1 << 7 | 3 << 5,
294 .default_resolution = 12,
295 .default_sample_time = MSEC_PER_SEC / 37,
296 .sample_times = (unsigned int []){ MSEC_PER_SEC / 37,
298 MSEC_PER_SEC / 9, MSEC_PER_SEC / 4 },
299 .num_sample_times = 4,
302 .clr_mask = 1 << 5, /*not one-shot mode*/
303 .default_resolution = 12,
304 .default_sample_time = MSEC_PER_SEC / 12,
306 [tmp1075] = { /* not one-shot mode, 27.5 ms sample rate */
307 .clr_mask = 1 << 5 | 1 << 6 | 1 << 7,
308 .default_resolution = 12,
309 .default_sample_time = 28,
310 .num_sample_times = 4,
311 .sample_times = (unsigned int []){ 28, 55, 110, 220 },
315 static inline long lm75_reg_to_mc(s16 temp, u8 resolution)
317 return ((temp >> (16 - resolution)) * 1000) >> (resolution - 8);
320 static int lm75_write_config(struct lm75_data *data, u8 set_mask,
325 clr_mask |= LM75_SHUTDOWN;
326 value = data->current_conf & ~clr_mask;
329 if (data->current_conf != value) {
332 err = i2c_smbus_write_byte_data(data->client, LM75_REG_CONF,
336 data->current_conf = value;
341 static int lm75_read(struct device *dev, enum hwmon_sensor_types type,
342 u32 attr, int channel, long *val)
344 struct lm75_data *data = dev_get_drvdata(dev);
351 case hwmon_chip_update_interval:
352 *val = data->sample_time;
360 case hwmon_temp_input:
366 case hwmon_temp_max_hyst:
372 err = regmap_read(data->regmap, reg, ®val);
376 *val = lm75_reg_to_mc(regval, data->resolution);
384 static int lm75_write_temp(struct device *dev, u32 attr, long temp)
386 struct lm75_data *data = dev_get_drvdata(dev);
394 case hwmon_temp_max_hyst:
402 * Resolution of limit registers is assumed to be the same as the
403 * temperature input register resolution unless given explicitly.
405 if (data->params->resolution_limits)
406 resolution = data->params->resolution_limits;
408 resolution = data->resolution;
410 temp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
411 temp = DIV_ROUND_CLOSEST(temp << (resolution - 8),
412 1000) << (16 - resolution);
414 return regmap_write(data->regmap, reg, (u16)temp);
417 static int lm75_update_interval(struct device *dev, long val)
419 struct lm75_data *data = dev_get_drvdata(dev);
424 index = find_closest(val, data->params->sample_times,
425 (int)data->params->num_sample_times);
427 switch (data->kind) {
429 err = lm75_write_config(data, lm75_sample_set_masks[index],
430 LM75_SAMPLE_CLEAR_MASK);
434 data->sample_time = data->params->sample_times[index];
435 if (data->params->resolutions)
436 data->resolution = data->params->resolutions[index];
439 err = regmap_read(data->regmap, LM75_REG_CONF, ®);
443 reg |= (3 - index) << 6;
444 err = regmap_write(data->regmap, LM75_REG_CONF, reg);
447 data->sample_time = data->params->sample_times[index];
450 err = i2c_smbus_write_byte_data(data->client, PCT2075_REG_IDLE,
454 data->sample_time = data->params->sample_times[index];
460 static int lm75_write_chip(struct device *dev, u32 attr, long val)
463 case hwmon_chip_update_interval:
464 return lm75_update_interval(dev, val);
471 static int lm75_write(struct device *dev, enum hwmon_sensor_types type,
472 u32 attr, int channel, long val)
476 return lm75_write_chip(dev, attr, val);
478 return lm75_write_temp(dev, attr, val);
485 static umode_t lm75_is_visible(const void *data, enum hwmon_sensor_types type,
486 u32 attr, int channel)
488 const struct lm75_data *config_data = data;
493 case hwmon_chip_update_interval:
494 if (config_data->params->num_sample_times > 1)
501 case hwmon_temp_input:
504 case hwmon_temp_max_hyst:
514 static const struct hwmon_channel_info * const lm75_info[] = {
515 HWMON_CHANNEL_INFO(chip,
516 HWMON_C_REGISTER_TZ | HWMON_C_UPDATE_INTERVAL),
517 HWMON_CHANNEL_INFO(temp,
518 HWMON_T_INPUT | HWMON_T_MAX | HWMON_T_MAX_HYST),
522 static const struct hwmon_ops lm75_hwmon_ops = {
523 .is_visible = lm75_is_visible,
528 static const struct hwmon_chip_info lm75_chip_info = {
529 .ops = &lm75_hwmon_ops,
533 static bool lm75_is_writeable_reg(struct device *dev, unsigned int reg)
535 return reg != LM75_REG_TEMP;
538 static bool lm75_is_volatile_reg(struct device *dev, unsigned int reg)
540 return reg == LM75_REG_TEMP || reg == LM75_REG_CONF;
543 static const struct regmap_config lm75_regmap_config = {
546 .max_register = PCT2075_REG_IDLE,
547 .writeable_reg = lm75_is_writeable_reg,
548 .volatile_reg = lm75_is_volatile_reg,
549 .val_format_endian = REGMAP_ENDIAN_BIG,
550 .cache_type = REGCACHE_MAPLE,
551 .use_single_read = true,
552 .use_single_write = true,
555 static void lm75_disable_regulator(void *data)
557 struct lm75_data *lm75 = data;
559 regulator_disable(lm75->vs);
562 static void lm75_remove(void *data)
564 struct lm75_data *lm75 = data;
565 struct i2c_client *client = lm75->client;
567 i2c_smbus_write_byte_data(client, LM75_REG_CONF, lm75->orig_conf);
570 static const struct i2c_device_id lm75_ids[];
572 static int lm75_probe(struct i2c_client *client)
574 struct device *dev = &client->dev;
575 struct device *hwmon_dev;
576 struct lm75_data *data;
580 if (client->dev.of_node)
581 kind = (uintptr_t)of_device_get_match_data(&client->dev);
583 kind = i2c_match_id(lm75_ids, client)->driver_data;
585 if (!i2c_check_functionality(client->adapter,
586 I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA))
589 data = devm_kzalloc(dev, sizeof(struct lm75_data), GFP_KERNEL);
593 data->client = client;
596 data->vs = devm_regulator_get(dev, "vs");
597 if (IS_ERR(data->vs))
598 return PTR_ERR(data->vs);
600 data->regmap = devm_regmap_init_i2c(client, &lm75_regmap_config);
601 if (IS_ERR(data->regmap))
602 return PTR_ERR(data->regmap);
604 /* Set to LM75 resolution (9 bits, 1/2 degree C) and range.
605 * Then tweak to be more precise when appropriate.
608 data->params = &device_params[data->kind];
610 /* Save default sample time and resolution*/
611 data->sample_time = data->params->default_sample_time;
612 data->resolution = data->params->default_resolution;
614 /* Enable the power */
615 err = regulator_enable(data->vs);
617 dev_err(dev, "failed to enable regulator: %d\n", err);
621 err = devm_add_action_or_reset(dev, lm75_disable_regulator, data);
625 /* Cache original configuration */
626 status = i2c_smbus_read_byte_data(client, LM75_REG_CONF);
628 dev_dbg(dev, "Can't read config? %d\n", status);
631 data->orig_conf = status;
632 data->current_conf = status;
634 err = lm75_write_config(data, data->params->set_mask,
635 data->params->clr_mask);
639 err = devm_add_action_or_reset(dev, lm75_remove, data);
643 hwmon_dev = devm_hwmon_device_register_with_info(dev, client->name,
644 data, &lm75_chip_info,
646 if (IS_ERR(hwmon_dev))
647 return PTR_ERR(hwmon_dev);
649 dev_info(dev, "%s: sensor '%s'\n", dev_name(hwmon_dev), client->name);
654 static const struct i2c_device_id lm75_ids[] = {
656 { "at30ts74", at30ts74, },
657 { "ds1775", ds1775, },
659 { "ds7505", ds7505, },
664 { "max6625", max6625, },
665 { "max6626", max6626, },
666 { "max31725", max31725, },
667 { "max31726", max31725, },
668 { "mcp980x", mcp980x, },
669 { "pct2075", pct2075, },
670 { "stds75", stds75, },
671 { "stlm75", stlm75, },
673 { "tmp100", tmp100, },
674 { "tmp101", tmp101, },
675 { "tmp105", tmp105, },
676 { "tmp112", tmp112, },
677 { "tmp175", tmp175, },
678 { "tmp275", tmp275, },
680 { "tmp75b", tmp75b, },
681 { "tmp75c", tmp75c, },
682 { "tmp1075", tmp1075, },
685 MODULE_DEVICE_TABLE(i2c, lm75_ids);
687 static const struct of_device_id __maybe_unused lm75_of_match[] = {
689 .compatible = "adi,adt75",
690 .data = (void *)adt75
693 .compatible = "atmel,at30ts74",
694 .data = (void *)at30ts74
697 .compatible = "dallas,ds1775",
698 .data = (void *)ds1775
701 .compatible = "dallas,ds75",
705 .compatible = "dallas,ds7505",
706 .data = (void *)ds7505
709 .compatible = "gmt,g751",
713 .compatible = "national,lm75",
717 .compatible = "national,lm75a",
718 .data = (void *)lm75a
721 .compatible = "national,lm75b",
722 .data = (void *)lm75b
725 .compatible = "maxim,max6625",
726 .data = (void *)max6625
729 .compatible = "maxim,max6626",
730 .data = (void *)max6626
733 .compatible = "maxim,max31725",
734 .data = (void *)max31725
737 .compatible = "maxim,max31726",
738 .data = (void *)max31725
741 .compatible = "maxim,mcp980x",
742 .data = (void *)mcp980x
745 .compatible = "nxp,pct2075",
746 .data = (void *)pct2075
749 .compatible = "st,stds75",
750 .data = (void *)stds75
753 .compatible = "st,stlm75",
754 .data = (void *)stlm75
757 .compatible = "microchip,tcn75",
758 .data = (void *)tcn75
761 .compatible = "ti,tmp100",
762 .data = (void *)tmp100
765 .compatible = "ti,tmp101",
766 .data = (void *)tmp101
769 .compatible = "ti,tmp105",
770 .data = (void *)tmp105
773 .compatible = "ti,tmp112",
774 .data = (void *)tmp112
777 .compatible = "ti,tmp175",
778 .data = (void *)tmp175
781 .compatible = "ti,tmp275",
782 .data = (void *)tmp275
785 .compatible = "ti,tmp75",
786 .data = (void *)tmp75
789 .compatible = "ti,tmp75b",
790 .data = (void *)tmp75b
793 .compatible = "ti,tmp75c",
794 .data = (void *)tmp75c
797 .compatible = "ti,tmp1075",
798 .data = (void *)tmp1075
802 MODULE_DEVICE_TABLE(of, lm75_of_match);
804 #define LM75A_ID 0xA1
806 /* Return 0 if detection is successful, -ENODEV otherwise */
807 static int lm75_detect(struct i2c_client *new_client,
808 struct i2c_board_info *info)
810 struct i2c_adapter *adapter = new_client->adapter;
815 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA |
816 I2C_FUNC_SMBUS_WORD_DATA))
820 * Now, we do the remaining detection. There is no identification-
821 * dedicated register so we have to rely on several tricks:
822 * unused bits, registers cycling over 8-address boundaries,
823 * addresses 0x04-0x07 returning the last read value.
824 * The cycling+unused addresses combination is not tested,
825 * since it would significantly slow the detection down and would
826 * hardly add any value.
828 * The National Semiconductor LM75A is different than earlier
829 * LM75s. It has an ID byte of 0xaX (where X is the chip
830 * revision, with 1 being the only revision in existence) in
831 * register 7, and unused registers return 0xff rather than the
834 * Note that this function only detects the original National
835 * Semiconductor LM75 and the LM75A. Clones from other vendors
836 * aren't detected, on purpose, because they are typically never
837 * found on PC hardware. They are found on embedded designs where
838 * they can be instantiated explicitly so detection is not needed.
839 * The absence of identification registers on all these clones
840 * would make their exhaustive detection very difficult and weak,
841 * and odds are that the driver would bind to unsupported devices.
845 conf = i2c_smbus_read_byte_data(new_client, 1);
849 /* First check for LM75A */
850 if (i2c_smbus_read_byte_data(new_client, 7) == LM75A_ID) {
852 * LM75A returns 0xff on unused registers so
853 * just to be sure we check for that too.
855 if (i2c_smbus_read_byte_data(new_client, 4) != 0xff
856 || i2c_smbus_read_byte_data(new_client, 5) != 0xff
857 || i2c_smbus_read_byte_data(new_client, 6) != 0xff)
860 hyst = i2c_smbus_read_byte_data(new_client, 2);
861 os = i2c_smbus_read_byte_data(new_client, 3);
862 } else { /* Traditional style LM75 detection */
863 /* Unused addresses */
864 hyst = i2c_smbus_read_byte_data(new_client, 2);
865 if (i2c_smbus_read_byte_data(new_client, 4) != hyst
866 || i2c_smbus_read_byte_data(new_client, 5) != hyst
867 || i2c_smbus_read_byte_data(new_client, 6) != hyst
868 || i2c_smbus_read_byte_data(new_client, 7) != hyst)
870 os = i2c_smbus_read_byte_data(new_client, 3);
871 if (i2c_smbus_read_byte_data(new_client, 4) != os
872 || i2c_smbus_read_byte_data(new_client, 5) != os
873 || i2c_smbus_read_byte_data(new_client, 6) != os
874 || i2c_smbus_read_byte_data(new_client, 7) != os)
878 * It is very unlikely that this is a LM75 if both
879 * hysteresis and temperature limit registers are 0.
881 if (hyst == 0 && os == 0)
884 /* Addresses cycling */
885 for (i = 8; i <= 248; i += 40) {
886 if (i2c_smbus_read_byte_data(new_client, i + 1) != conf
887 || i2c_smbus_read_byte_data(new_client, i + 2) != hyst
888 || i2c_smbus_read_byte_data(new_client, i + 3) != os)
890 if (is_lm75a && i2c_smbus_read_byte_data(new_client, i + 7)
895 strscpy(info->type, is_lm75a ? "lm75a" : "lm75", I2C_NAME_SIZE);
901 static int lm75_suspend(struct device *dev)
904 struct i2c_client *client = to_i2c_client(dev);
906 status = i2c_smbus_read_byte_data(client, LM75_REG_CONF);
908 dev_dbg(&client->dev, "Can't read config? %d\n", status);
911 status = status | LM75_SHUTDOWN;
912 i2c_smbus_write_byte_data(client, LM75_REG_CONF, status);
916 static int lm75_resume(struct device *dev)
919 struct i2c_client *client = to_i2c_client(dev);
921 status = i2c_smbus_read_byte_data(client, LM75_REG_CONF);
923 dev_dbg(&client->dev, "Can't read config? %d\n", status);
926 status = status & ~LM75_SHUTDOWN;
927 i2c_smbus_write_byte_data(client, LM75_REG_CONF, status);
931 static const struct dev_pm_ops lm75_dev_pm_ops = {
932 .suspend = lm75_suspend,
933 .resume = lm75_resume,
935 #define LM75_DEV_PM_OPS (&lm75_dev_pm_ops)
937 #define LM75_DEV_PM_OPS NULL
938 #endif /* CONFIG_PM */
940 static struct i2c_driver lm75_driver = {
941 .class = I2C_CLASS_HWMON,
944 .of_match_table = of_match_ptr(lm75_of_match),
945 .pm = LM75_DEV_PM_OPS,
948 .id_table = lm75_ids,
949 .detect = lm75_detect,
950 .address_list = normal_i2c,
953 module_i2c_driver(lm75_driver);
955 MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
956 MODULE_DESCRIPTION("LM75 driver");
957 MODULE_LICENSE("GPL");