Lines Matching +full:0 +full:x4d

33  * in a detection as max6657 if it is on address 0x4c. The extra address
35 * explicitly as max6659, or if its address is not 0x4c.
51 * from 0 to 145 degrees.
122 * MAX6657, MAX6658, NCT1008 and W83L771 have address 0x4c.
124 * have address 0x4d.
125 * MAX6647 has address 0x4e.
126 * MAX6659 can have address 0x4c, 0x4d or 0x4e.
127 * MAX6654, MAX6680, and MAX6681 can have address 0x18, 0x19, 0x1a, 0x29,
128 * 0x2a, 0x2b, 0x4c, 0x4d or 0x4e.
129 * SA56004 can have address 0x48 through 0x4F.
133 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x48, 0x49, 0x4a, 0x4b, 0x4c,
134 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
146 #define LM90_REG_MAN_ID 0xFE
147 #define LM90_REG_CHIP_ID 0xFF
148 #define LM90_REG_CONFIG1 0x03
149 #define LM90_REG_CONFIG2 0xBF
150 #define LM90_REG_CONVRATE 0x04
151 #define LM90_REG_STATUS 0x02
152 #define LM90_REG_LOCAL_TEMP 0x00
153 #define LM90_REG_LOCAL_HIGH 0x05
154 #define LM90_REG_LOCAL_LOW 0x06
155 #define LM90_REG_LOCAL_CRIT 0x20
156 #define LM90_REG_REMOTE_TEMPH 0x01
157 #define LM90_REG_REMOTE_TEMPL 0x10
158 #define LM90_REG_REMOTE_OFFSH 0x11
159 #define LM90_REG_REMOTE_OFFSL 0x12
160 #define LM90_REG_REMOTE_HIGHH 0x07
161 #define LM90_REG_REMOTE_HIGHL 0x13
162 #define LM90_REG_REMOTE_LOWH 0x08
163 #define LM90_REG_REMOTE_LOWL 0x14
164 #define LM90_REG_REMOTE_CRIT 0x19
165 #define LM90_REG_TCRIT_HYST 0x21
169 #define MAX6657_REG_LOCAL_TEMPL 0x11
170 #define MAX6696_REG_STATUS2 0x12
171 #define MAX6659_REG_REMOTE_EMERG 0x16
172 #define MAX6659_REG_LOCAL_EMERG 0x17
176 #define SA56004_REG_LOCAL_TEMPL 0x22
181 #define TMP451_REG_LOCAL_TEMPL 0x15
182 #define TMP451_REG_CONALERT 0x22
184 #define TMP461_REG_CHEN 0x16
185 #define TMP461_REG_DFC 0x24
188 #define ADT7481_REG_STATUS2 0x23
189 #define ADT7481_REG_CONFIG2 0x24
191 #define ADT7481_REG_MAN_ID 0x3e
192 #define ADT7481_REG_CHIP_ID 0x3d
195 #define LM90_HAVE_EXTENDED_TEMP BIT(0) /* extended temperature support */
216 #define LM90_STATUS_LTHRM BIT(0) /* local THERM limit tripped */
425 .alert_alarms = 0x7c,
435 .alert_alarms = 0x7c,
449 .alert_alarms = 0x7c,
459 .alert_alarms = 0x7c,
469 .alert_alarms = 0x1c7c,
479 .alert_alarms = 0x7c,
491 .alert_alarms = 0x7b,
493 .faultqueue_mask = BIT(0),
501 .alert_alarms = 0x7b,
503 .faultqueue_mask = BIT(0),
509 .alert_alarms = 0x78,
516 .alert_alarms = 0x50,
526 .alert_alarms = 0x7c,
534 .alert_alarms = 0x7c,
541 .alert_alarms = 0x7c,
549 .alert_alarms = 0x7c,
557 .alert_alarms = 0x7c,
571 .alert_alarms = 0x7c,
579 .alert_alarms = 0x1c7c,
592 .alert_alarms = 0x7c,
600 .alert_alarms = 0x7c,
607 .alert_alarms = 0x7c,
615 .alert_alarms = 0x7c,
627 .alert_alarms = 0x7b,
630 .faultqueue_mask = BIT(0),
638 .alert_alarms = 0x7c,
648 .alert_alarms = 0x7c,
659 LOCAL_LOW = 0,
769 * The write address for registers 0x03 .. 0x08 is the read address plus 6.
799 if (ret < 0 || !regl) in lm90_write16()
801 return lm90_write_reg(client, regl, val & 0xff); in lm90_write16()
810 if (oldh < 0) in lm90_read16()
817 if (l < 0) in lm90_read16()
837 if (newh < 0) in lm90_read16()
841 if (l < 0) in lm90_read16()
857 return 0; in lm90_update_confreg()
863 * than channel 0 is selected. Also, calling code must make sure to re-select
864 * external channel 0 before releasing the lock. This is necessary because
870 u8 config = data->config & ~0x08; in lm90_select_remote_channel()
873 config |= 0x08; in lm90_select_remote_channel()
885 err = lm90_update_confreg(data, config | 0x40); in lm90_write_convrate()
886 if (err < 0) in lm90_write_convrate()
914 for (i = 0, update_interval = LM90_MAX_CONVRATE_MS << 6; in lm90_set_convrate()
934 static const u8 values[4] = {0, 2, 6, 0x0e}; in lm90_set_faultqueue()
936 data->conalert = (data->conalert & 0xf1) | values[val - 1]; in lm90_set_faultqueue()
952 if (val < 0) in lm90_update_limits()
957 if (val < 0) in lm90_update_limits()
962 if (val < 0) in lm90_update_limits()
968 if (val < 0) in lm90_update_limits()
974 (data->flags & LM90_HAVE_REM_LIMIT_EXT) ? LM90_REG_REMOTE_LOWL : 0, in lm90_update_limits()
976 if (val < 0) in lm90_update_limits()
981 (data->flags & LM90_HAVE_REM_LIMIT_EXT) ? LM90_REG_REMOTE_HIGHL : 0, in lm90_update_limits()
983 if (val < 0) in lm90_update_limits()
990 if (val < 0) in lm90_update_limits()
997 if (val < 0) in lm90_update_limits()
1002 if (val < 0) in lm90_update_limits()
1009 if (val < 0) in lm90_update_limits()
1013 if (val < 0) in lm90_update_limits()
1019 if (val < 0) in lm90_update_limits()
1025 if (val < 0) in lm90_update_limits()
1030 if (val < 0) in lm90_update_limits()
1037 if (val < 0) in lm90_update_limits()
1045 return 0; in lm90_update_limits()
1063 st = new_alarms & 0xff; in lm90_report_alarms()
1080 st |= cleared_alarms & 0xff; in lm90_report_alarms()
1084 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_min_alarm, 0); in lm90_report_alarms()
1091 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_max_alarm, 0); in lm90_report_alarms()
1098 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_crit_alarm, 0); in lm90_report_alarms()
1105 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_emergency_alarm, 0); in lm90_report_alarms()
1126 if (val < 0) in lm90_update_alarms_locked()
1132 if (val < 0) in lm90_update_alarms_locked()
1149 check_enable = (client->irq || !(data->config_orig & 0x80)) && in lm90_update_alarms_locked()
1150 (data->config & 0x80); in lm90_update_alarms_locked()
1163 lm90_update_confreg(data, data->config & ~0x80); in lm90_update_alarms_locked()
1179 return 0; in lm90_update_alarms_locked()
1199 if (!(data->config & 0x80)) in lm90_alert_work()
1214 if (val < 0) in lm90_update_device()
1226 if (val < 0) in lm90_update_device()
1231 if (val < 0) in lm90_update_device()
1237 if (val < 0) in lm90_update_device()
1242 if (val < 0) in lm90_update_device()
1248 if (val < 0) in lm90_update_device()
1253 if (val < 0) { in lm90_update_device()
1263 if (val < 0) in lm90_update_device()
1270 return 0; in lm90_update_device()
1305 val = regval - 0x4000; in lm90_temp_from_reg()
1329 1000 - DIV_ROUND_CLOSEST(1000, BIT(resolution - 8)) : 0; in lm90_temp_to_reg()
1335 val = clamp_val(val, 0, 255000 + fraction); in lm90_temp_to_reg()
1337 val = clamp_val(val, 0, 127000 + fraction); in lm90_temp_to_reg()
1363 u8 regl = 0; in lm90_set_temp()
1403 int temp = lm90_get_temp(data, LOCAL_CRIT, 0); in lm90_set_temphyst()
1407 data->temp_hyst = clamp_val(DIV_ROUND_CLOSEST(temp - val, 1000), 0, 31); in lm90_set_temphyst()
1416 return lm90_temp_from_reg(0, data->temp[index], res); in lm90_get_temp_offset()
1423 val = lm90_temp_to_reg(0, val, lm90_temp_get_resolution(data, index)); in lm90_set_temp_offset()
1439 return 0; in lm90_set_temp_offset()
1468 static const u16 lm90_crit_alarm_bits[MAX_CHANNELS] = { BIT(0), BIT(1), BIT(9) };
1469 static const u16 lm90_crit_alarm_bits_swapped[MAX_CHANNELS] = { BIT(1), BIT(0), BIT(9) };
1471 static const u16 lm90_fault_bits[MAX_CHANNELS] = { BIT(0), BIT(2), BIT(10) };
1542 return 0; in lm90_temp_read()
1609 if (channel == 0) in lm90_temp_is_visible()
1613 return 0; in lm90_temp_is_visible()
1640 switch (data->conalert & 0x0e) { in lm90_chip_read()
1641 case 0x0: in lm90_chip_read()
1645 case 0x2: in lm90_chip_read()
1648 case 0x6: in lm90_chip_read()
1651 case 0xe: in lm90_chip_read()
1661 return 0; in lm90_chip_read()
1679 clamp_val(val, 0, 100000)); in lm90_chip_write()
1703 return 0; in lm90_chip_is_visible()
1727 return 0; in lm90_read_string()
1752 return 0; in lm90_is_visible()
1765 u8 ff = 0xff; in lm90_detect_lm84()
1768 if (status < 0 || (status & 0xab)) in lm90_detect_lm84()
1776 for (i = 0; i < ARRAY_SIZE(regs); i++) { in lm90_detect_lm84()
1782 if (reg1 < 0) in lm90_detect_lm84()
1793 * If all registers always returned 0 or 0xff, all bets are off, in lm90_detect_lm84()
1796 return nonzero && ff != 0xff ? "lm84" : NULL; in lm90_detect_lm84()
1804 if (status < 0 || (status & 0x03)) in lm90_detect_max1617()
1807 if (config1 & 0x3f) in lm90_detect_max1617()
1811 * Fail if unsupported registers return anything but 0xff. in lm90_detect_max1617()
1814 * and should also return 0xff. in lm90_detect_max1617()
1816 if (i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_TEMPL) != 0xff || in lm90_detect_max1617()
1817 i2c_smbus_read_byte_data(client, MAX6657_REG_LOCAL_TEMPL) != 0xff || in lm90_detect_max1617()
1818 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_LOWL) != 0xff || in lm90_detect_max1617()
1819 i2c_smbus_read_byte(client) != 0xff) in lm90_detect_max1617()
1828 if (llo < 0 || rlo < 0) in lm90_detect_max1617()
1844 if ((s8)lhi < 0 || (s8)rhi < 0) in lm90_detect_max1617()
1853 * Word read operations return 0xff in second byte in lm90_detect_max1617()
1856 0xffff) in lm90_detect_max1617()
1859 (config1 | 0xff00)) in lm90_detect_max1617()
1862 (lhi | 0xff00)) in lm90_detect_max1617()
1876 if (config2 < 0) in lm90_detect_national()
1879 if ((config1 & 0x2a) || (config2 & 0xf8) || convrate > 0x09) in lm90_detect_national()
1882 if (address != 0x4c && address != 0x4d) in lm90_detect_national()
1885 switch (chip_id & 0xf0) { in lm90_detect_national()
1886 case 0x10: /* LM86 */ in lm90_detect_national()
1887 if (address == 0x4c) in lm90_detect_national()
1890 case 0x20: /* LM90 */ in lm90_detect_national()
1891 if (address == 0x4c) in lm90_detect_national()
1894 case 0x30: /* LM89/LM99 */ in lm90_detect_national()
1911 case 0xca: /* NCT218 */ in lm90_detect_on()
1912 if ((address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_on()
1913 convrate <= 0x0a) in lm90_detect_on()
1932 if (status < 0 || config2 < 0 || man_id2 < 0 || chip_id2 < 0) in lm90_detect_analog()
1937 * register values are listed. Registers 0x3d .. 0x3e are undocumented in lm90_detect_analog()
1939 * Register 0xff is undocumented for some of the chips. Register 0x3f in lm90_detect_analog()
1942 * The code below checks values for registers 0x3d, 0x3e, and 0xff, in lm90_detect_analog()
1943 * but not for register 0x3f. in lm90_detect_analog()
1972 case 0x00 ... 0x03: /* ADM1021 */ in lm90_detect_analog()
1973 case 0x05 ... 0x0f: in lm90_detect_analog()
1974 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
1975 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
1978 case 0x04: /* ADT7421 (undocumented) */ in lm90_detect_analog()
1979 if (man_id2 == 0x41 && chip_id2 == 0x21 && in lm90_detect_analog()
1980 (address == 0x4c || address == 0x4d) && in lm90_detect_analog()
1981 (config1 & 0x0b) == 0x08 && convrate <= 0x0a) in lm90_detect_analog()
1984 case 0x30 ... 0x38: /* ADM1021A, ADM1023 */ in lm90_detect_analog()
1985 case 0x3a ... 0x3e: in lm90_detect_analog()
1989 * found to have a Chip ID of 0x3c. in lm90_detect_analog()
1991 * (0x12 .. 0x14), but a chip labeled ADM1021A does support it. in lm90_detect_analog()
1993 * register (0x11) was added to revision F of the ADM1021A in lm90_detect_analog()
1999 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
2000 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2003 case 0x39: /* ADM1020 (undocumented) */ in lm90_detect_analog()
2004 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2005 (address == 0x4c || address == 0x4d || address == 0x4e) && in lm90_detect_analog()
2006 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2009 case 0x3f: /* NCT210 */ in lm90_detect_analog()
2010 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
2011 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2014 case 0x40 ... 0x4f: /* ADM1032 */ in lm90_detect_analog()
2015 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2016 (address == 0x4c || address == 0x4d) && !(config1 & 0x3f) && in lm90_detect_analog()
2017 convrate <= 0x0a) in lm90_detect_analog()
2020 case 0x51: /* ADT7461 */ in lm90_detect_analog()
2021 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2022 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2023 convrate <= 0x0a) in lm90_detect_analog()
2026 case 0x54: /* NCT1008 */ in lm90_detect_analog()
2027 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2028 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2029 convrate <= 0x0a) in lm90_detect_analog()
2032 case 0x55: /* NCT72 */ in lm90_detect_analog()
2033 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2034 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2035 convrate <= 0x0a) in lm90_detect_analog()
2038 case 0x57: /* ADT7461A, NCT1008 (datasheet rev. 3) */ in lm90_detect_analog()
2039 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2040 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2041 convrate <= 0x0a) in lm90_detect_analog()
2044 case 0x5a: /* NCT214 */ in lm90_detect_analog()
2045 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2046 common_address && !(config1 & 0x1b) && convrate <= 0x0a) in lm90_detect_analog()
2049 case 0x62: /* ADT7481, undocumented */ in lm90_detect_analog()
2050 if (man_id2 == 0x41 && chip_id2 == 0x81 && in lm90_detect_analog()
2051 (address == 0x4b || address == 0x4c) && !(config1 & 0x10) && in lm90_detect_analog()
2052 !(config2 & 0x7f) && (convrate & 0x0f) <= 0x0b) { in lm90_detect_analog()
2056 case 0x65: /* ADT7482, datasheet */ in lm90_detect_analog()
2057 case 0x75: /* ADT7482, real chip */ in lm90_detect_analog()
2058 if (man_id2 == 0x41 && chip_id2 == 0x82 && in lm90_detect_analog()
2059 address == 0x4c && !(config1 & 0x10) && !(config2 & 0x7f) && in lm90_detect_analog()
2060 convrate <= 0x0a) in lm90_detect_analog()
2063 case 0x94: /* ADT7483 */ in lm90_detect_analog()
2064 if (man_id2 == 0x41 && chip_id2 == 0x83 && in lm90_detect_analog()
2066 ((address >= 0x18 && address <= 0x1a) || in lm90_detect_analog()
2067 (address >= 0x29 && address <= 0x2b) || in lm90_detect_analog()
2068 (address >= 0x4c && address <= 0x4e)) && in lm90_detect_analog()
2069 !(config1 & 0x10) && !(config2 & 0x7f) && convrate <= 0x0a) in lm90_detect_analog()
2087 case 0x01: in lm90_detect_maxim()
2105 if (emerg < 0 || man_id < 0 || emerg2 < 0 || status2 < 0) in lm90_detect_maxim()
2110 * register, reading it returns 0x01. Bit 4 of the config1 in lm90_detect_maxim()
2111 * register is unused and should return zero when read. Bit 0 of in lm90_detect_maxim()
2119 if (!(config1 & 0x10) && !(status2 & 0x01) && emerg == emerg2 && in lm90_detect_maxim()
2120 convrate <= 0x07) in lm90_detect_maxim()
2127 * address 0x12 (LM90_REG_REMOTE_OFFSL) exists for this chip and in lm90_detect_maxim()
2131 else if (!(config1 & 0x03) && convrate <= 0x07 && in lm90_detect_maxim()
2136 * address 0x10 or higher) except for manufacturer and in lm90_detect_maxim()
2139 * of 0x01. in lm90_detect_maxim()
2142 * 0x4d and device ID 0x01. It is unknown if other variants of in lm90_detect_maxim()
2146 else if (!(config1 & 0x03f) && convrate <= 0x07 && in lm90_detect_maxim()
2147 emerg == 0x01 && emerg2 == 0x01 && status2 == 0x01) in lm90_detect_maxim()
2150 case 0x08: in lm90_detect_maxim()
2156 if (common_address && !(config1 & 0x07) && convrate <= 0x07) in lm90_detect_maxim()
2159 case 0x09: in lm90_detect_maxim()
2166 * MAX6690 datasheet lists a chip ID of 0x08, and a chip labeled in lm90_detect_maxim()
2167 * MAX6654 was observed to have a chip ID of 0x09. in lm90_detect_maxim()
2169 if (common_address && !(config1 & 0x07) && convrate <= 0x07) in lm90_detect_maxim()
2172 case 0x4d: in lm90_detect_maxim()
2177 * register, or 0x4d. in lm90_detect_maxim()
2189 * address is 0x4c. in lm90_detect_maxim()
2191 if (address >= 0x48 && address <= 0x4f && config1 == convrate && in lm90_detect_maxim()
2192 !(config1 & 0x0f)) { in lm90_detect_maxim()
2202 if (i2c_smbus_read_byte_data(client, LM90_REG_MAN_ID) != 0x4d) in lm90_detect_maxim()
2206 if (i2c_smbus_read_byte_data(client, LM90_REG_CONVRATE) != 0x4d || in lm90_detect_maxim()
2207 i2c_smbus_read_byte_data(client, LM90_REG_LOCAL_LOW) != 0x4d || in lm90_detect_maxim()
2208 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_LOWH) != 0x4d) in lm90_detect_maxim()
2213 if (regval < 0 || (regval & 0x2b)) in lm90_detect_maxim()
2223 } else if ((address == 0x4c || address == 0x4d || address == 0x4e) && in lm90_detect_maxim()
2224 (config1 & 0x1f) == 0x0d && convrate <= 0x09) { in lm90_detect_maxim()
2225 if (address == 0x4c) in lm90_detect_maxim()
2231 case 0x59: in lm90_detect_maxim()
2236 * The I2C address of MAX6648/6692 is fixed at 0x4c. in lm90_detect_maxim()
2237 * MAX6646 is at address 0x4d, MAX6647 is at address 0x4e, in lm90_detect_maxim()
2238 * and MAX6649 is at address 0x4c. A slight difference between in lm90_detect_maxim()
2246 if (!(config1 & 0x3f) && convrate <= 0x07) { in lm90_detect_maxim()
2250 case 0x4c: in lm90_detect_maxim()
2253 * value of 0xff if DXP is open or shorted. in lm90_detect_maxim()
2254 * MAX6648 reports 0x80 in that case. in lm90_detect_maxim()
2258 if (temp == 0x80) in lm90_detect_maxim()
2263 case 0x4d: in lm90_detect_maxim()
2266 case 0x4e: in lm90_detect_maxim()
2288 if (config2 < 0) in lm90_detect_nuvoton()
2291 if (address == 0x4c && !(config1 & 0x2a) && !(config2 & 0xf8)) { in lm90_detect_nuvoton()
2292 if (chip_id == 0x01 && convrate <= 0x09) { in lm90_detect_nuvoton()
2295 } else if ((chip_id & 0xfe) == 0x10 && convrate <= 0x08) { in lm90_detect_nuvoton()
2311 case 0x00: in lm90_detect_nxp()
2313 if (config2 < 0) in lm90_detect_nxp()
2315 if (address >= 0x48 && address <= 0x4f && in lm90_detect_nxp()
2316 !(config1 & 0x2a) && !(config2 & 0xfe) && convrate <= 0x09) in lm90_detect_nxp()
2319 case 0x80: in lm90_detect_nxp()
2320 if (common_address && !(config1 & 0x3f) && convrate <= 0x07) in lm90_detect_nxp()
2336 * 0x4c and have a chip ID of 0x01. G781-1 is supposed to be at I2C in lm90_detect_gmt()
2337 * address 0x4d and have a chip ID of 0x03. However, when support in lm90_detect_gmt()
2338 * for G781 was added, chips at 0x4c and 0x4d were found to have a in lm90_detect_gmt()
2339 * chip ID of 0x01. A G781-1 at I2C address 0x4d was now found with in lm90_detect_gmt()
2340 * chip ID 0x03. in lm90_detect_gmt()
2341 * To avoid detection failures, accept chip ID 0x01 and 0x03 at both in lm90_detect_gmt()
2343 * G784 reports manufacturer ID 0x47 and chip ID 0x01. A public in lm90_detect_gmt()
2347 * ID 0x47 and chip ID 0x01 even though that chip does not officially in lm90_detect_gmt()
2353 if ((chip_id == 0x01 || chip_id == 0x03) && in lm90_detect_gmt()
2354 (address == 0x4c || address == 0x4d) && in lm90_detect_gmt()
2355 !(config1 & 0x3f) && convrate <= 0x08) { in lm90_detect_gmt()
2359 if (reg < 0 || reg & 0x1f) in lm90_detect_gmt()
2362 if (reg < 0 || reg & 0xf1) in lm90_detect_gmt()
2374 if (common_address && chip_id == 0x00 && !(config1 & 0x3f) && !(convrate & 0xf8)) { in lm90_detect_ti49()
2375 /* THMC10: Unsupported registers return 0xff */ in lm90_detect_ti49()
2376 if (i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_TEMPL) == 0xff && in lm90_detect_ti49()
2377 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_CRIT) == 0xff) in lm90_detect_ti49()
2389 if (chip_id == 0x00 && !(config1 & 0x1b) && convrate <= 0x09) { in lm90_detect_ti()
2399 if (!(local_ext & 0x0f) && (conalert & 0xf1) == 0x01 && in lm90_detect_ti()
2400 (chen & 0xfc) == 0x00 && (dfc & 0xfc) == 0x00) { in lm90_detect_ti()
2401 if (address == 0x4c && !(chen & 0x03)) in lm90_detect_ti()
2403 else if (address >= 0x48 && address <= 0x4f) in lm90_detect_ti()
2411 /* Return 0 if detection is successful, -ENODEV otherwise */
2419 (address >= 0x18 && address <= 0x1a) || in lm90_detect()
2420 (address >= 0x29 && address <= 0x2b) || in lm90_detect()
2421 (address >= 0x4c && address <= 0x4e); in lm90_detect()
2437 if (man_id < 0 || chip_id < 0 || config1 < 0 || convrate < 0 || lhigh < 0) in lm90_detect()
2453 if (convrate < 0 || man_id < 0 || chip_id < 0) in lm90_detect()
2460 if (common_address && !convrate && !(config1 & 0x7f)) in lm90_detect()
2463 case 0x01: /* National Semiconductor */ in lm90_detect()
2466 case 0x1a: /* ON */ in lm90_detect()
2469 case 0x23: /* Genesys Logic */ in lm90_detect()
2470 if (common_address && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect()
2473 case 0x41: /* Analog Devices */ in lm90_detect()
2477 case 0x47: /* GMT */ in lm90_detect()
2480 case 0x49: /* TI */ in lm90_detect()
2483 case 0x4d: /* Maxim Integrated */ in lm90_detect()
2487 case 0x54: /* ON MC1066, Microchip TC1068, TCM1617 (originally TelCom) */ in lm90_detect()
2488 if (common_address && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect()
2491 case 0x55: /* TI */ in lm90_detect()
2494 case 0x5c: /* Winbond/Nuvoton */ in lm90_detect()
2497 case 0xa1: /* NXP Semiconductor/Philips */ in lm90_detect()
2500 case 0xff: /* MAX1617, G767, NE1617 */ in lm90_detect()
2501 if (common_address && chip_id == 0xff && convrate < 8) in lm90_detect()
2510 "Unsupported chip at 0x%02x (man_id=0x%02X, chip_id=0x%02X)\n", in lm90_detect()
2517 return 0; in lm90_detect()
2541 if (convrate < 0) in lm90_init_client()
2553 if (config < 0) in lm90_init_client()
2561 config |= 0x04; in lm90_init_client()
2562 if (!(config & 0x04)) in lm90_init_client()
2567 * Put MAX6680/MAX8881 into extended resolution (bit 0x10, in lm90_init_client()
2568 * 0.125 degree resolution) and range (0x08, extend range in lm90_init_client()
2574 config |= 0x18; in lm90_init_client()
2577 * Put MAX6654 into extended range (0x20, extend minimum range from in lm90_init_client()
2578 * 0 degrees to -64 degrees). Note that extended resolution is not in lm90_init_client()
2583 config |= 0x20; in lm90_init_client()
2586 * Select external channel 0 for devices with three sensors in lm90_init_client()
2589 config &= ~0x08; in lm90_init_client()
2596 config &= ~0x80; in lm90_init_client()
2598 config &= 0xBF; /* run */ in lm90_init_client()
2610 if (ret < 0) in lm90_is_tripped()
2657 if (id == 0) { in lm90_probe_channel_from_dt()
2670 return 0; in lm90_probe_channel_from_dt()
2689 return 0; in lm90_parse_dt_channel_info()
2746 data->info[0] = &data->chip_info; in lm90_probe()
2751 data->chip_config[0] = HWMON_C_REGISTER_TZ; in lm90_probe()
2753 data->chip_config[0] |= HWMON_C_ALARMS; in lm90_probe()
2755 data->chip_config[0] |= HWMON_C_UPDATE_INTERVAL; in lm90_probe()
2757 data->chip_config[0] |= HWMON_C_TEMP_SAMPLES; in lm90_probe()
2759 data->chip_config[0] |= HWMON_C_PEC; in lm90_probe()
2766 data->channel_config[0] = HWMON_T_INPUT | HWMON_T_MAX | in lm90_probe()
2772 data->channel_config[0] |= HWMON_T_MIN | HWMON_T_MIN_ALARM; in lm90_probe()
2777 data->channel_config[0] |= HWMON_T_CRIT | HWMON_T_CRIT_ALARM | HWMON_T_CRIT_HYST; in lm90_probe()
2785 data->channel_config[0] |= HWMON_T_EMERGENCY | in lm90_probe()
2792 data->channel_config[0] |= HWMON_T_EMERGENCY_ALARM; in lm90_probe()
2831 if (err < 0) { in lm90_probe()
2849 if (err < 0) { in lm90_probe()
2855 return 0; in lm90_probe()
2874 if (!(data->config & 0x80)) { in lm90_alert()
2876 lm90_update_confreg(data, data->config | 0x80); in lm90_alert()
2894 return 0; in lm90_suspend()
2905 return 0; in lm90_resume()