Lines Matching +full:0 +full:x4c
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.
121 * MAX6657, MAX6658, NCT1008 and W83L771 have address 0x4c.
123 * have address 0x4d.
124 * MAX6647 has address 0x4e.
125 * MAX6659 can have address 0x4c, 0x4d or 0x4e.
126 * MAX6654, MAX6680, and MAX6681 can have address 0x18, 0x19, 0x1a, 0x29,
127 * 0x2a, 0x2b, 0x4c, 0x4d or 0x4e.
128 * SA56004 can have address 0x48 through 0x4F.
132 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x48, 0x49, 0x4a, 0x4b, 0x4c,
133 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
145 #define LM90_REG_MAN_ID 0xFE
146 #define LM90_REG_CHIP_ID 0xFF
147 #define LM90_REG_CONFIG1 0x03
148 #define LM90_REG_CONFIG2 0xBF
149 #define LM90_REG_CONVRATE 0x04
150 #define LM90_REG_STATUS 0x02
151 #define LM90_REG_LOCAL_TEMP 0x00
152 #define LM90_REG_LOCAL_HIGH 0x05
153 #define LM90_REG_LOCAL_LOW 0x06
154 #define LM90_REG_LOCAL_CRIT 0x20
155 #define LM90_REG_REMOTE_TEMPH 0x01
156 #define LM90_REG_REMOTE_TEMPL 0x10
157 #define LM90_REG_REMOTE_OFFSH 0x11
158 #define LM90_REG_REMOTE_OFFSL 0x12
159 #define LM90_REG_REMOTE_HIGHH 0x07
160 #define LM90_REG_REMOTE_HIGHL 0x13
161 #define LM90_REG_REMOTE_LOWH 0x08
162 #define LM90_REG_REMOTE_LOWL 0x14
163 #define LM90_REG_REMOTE_CRIT 0x19
164 #define LM90_REG_TCRIT_HYST 0x21
168 #define MAX6657_REG_LOCAL_TEMPL 0x11
169 #define MAX6696_REG_STATUS2 0x12
170 #define MAX6659_REG_REMOTE_EMERG 0x16
171 #define MAX6659_REG_LOCAL_EMERG 0x17
175 #define SA56004_REG_LOCAL_TEMPL 0x22
180 #define TMP451_REG_LOCAL_TEMPL 0x15
181 #define TMP451_REG_CONALERT 0x22
183 #define TMP461_REG_CHEN 0x16
184 #define TMP461_REG_DFC 0x24
187 #define ADT7481_REG_STATUS2 0x23
188 #define ADT7481_REG_CONFIG2 0x24
190 #define ADT7481_REG_MAN_ID 0x3e
191 #define ADT7481_REG_CHIP_ID 0x3d
194 #define LM90_HAVE_EXTENDED_TEMP BIT(0) /* extended temperature support */
215 #define LM90_STATUS_LTHRM BIT(0) /* local THERM limit tripped */
424 .alert_alarms = 0x7c,
434 .alert_alarms = 0x7c,
448 .alert_alarms = 0x7c,
458 .alert_alarms = 0x7c,
468 .alert_alarms = 0x1c7c,
478 .alert_alarms = 0x7c,
490 .alert_alarms = 0x7b,
492 .faultqueue_mask = BIT(0),
500 .alert_alarms = 0x7b,
502 .faultqueue_mask = BIT(0),
508 .alert_alarms = 0x78,
515 .alert_alarms = 0x50,
525 .alert_alarms = 0x7c,
533 .alert_alarms = 0x7c,
540 .alert_alarms = 0x7c,
548 .alert_alarms = 0x7c,
556 .alert_alarms = 0x7c,
570 .alert_alarms = 0x7c,
578 .alert_alarms = 0x1c7c,
591 .alert_alarms = 0x7c,
599 .alert_alarms = 0x7c,
606 .alert_alarms = 0x7c,
614 .alert_alarms = 0x7c,
626 .alert_alarms = 0x7b,
629 .faultqueue_mask = BIT(0),
637 .alert_alarms = 0x7c,
647 .alert_alarms = 0x7c,
658 LOCAL_LOW = 0,
768 * The write address for registers 0x03 .. 0x08 is the read address plus 6.
798 if (ret < 0 || !regl) in lm90_write16()
800 return lm90_write_reg(client, regl, val & 0xff); in lm90_write16()
809 if (oldh < 0) in lm90_read16()
816 if (l < 0) in lm90_read16()
836 if (newh < 0) in lm90_read16()
840 if (l < 0) in lm90_read16()
856 return 0; in lm90_update_confreg()
862 * than channel 0 is selected. Also, calling code must make sure to re-select
863 * external channel 0 before releasing the lock. This is necessary because
869 u8 config = data->config & ~0x08; in lm90_select_remote_channel()
872 config |= 0x08; in lm90_select_remote_channel()
884 err = lm90_update_confreg(data, config | 0x40); in lm90_write_convrate()
885 if (err < 0) in lm90_write_convrate()
913 for (i = 0, update_interval = LM90_MAX_CONVRATE_MS << 6; in lm90_set_convrate()
933 static const u8 values[4] = {0, 2, 6, 0x0e}; in lm90_set_faultqueue()
935 data->conalert = (data->conalert & 0xf1) | values[val - 1]; in lm90_set_faultqueue()
951 if (val < 0) in lm90_update_limits()
956 if (val < 0) in lm90_update_limits()
961 if (val < 0) in lm90_update_limits()
967 if (val < 0) in lm90_update_limits()
973 (data->flags & LM90_HAVE_REM_LIMIT_EXT) ? LM90_REG_REMOTE_LOWL : 0, in lm90_update_limits()
975 if (val < 0) in lm90_update_limits()
980 (data->flags & LM90_HAVE_REM_LIMIT_EXT) ? LM90_REG_REMOTE_HIGHL : 0, in lm90_update_limits()
982 if (val < 0) in lm90_update_limits()
989 if (val < 0) in lm90_update_limits()
996 if (val < 0) in lm90_update_limits()
1001 if (val < 0) in lm90_update_limits()
1008 if (val < 0) in lm90_update_limits()
1012 if (val < 0) in lm90_update_limits()
1018 if (val < 0) in lm90_update_limits()
1024 if (val < 0) in lm90_update_limits()
1029 if (val < 0) in lm90_update_limits()
1036 if (val < 0) in lm90_update_limits()
1044 return 0; in lm90_update_limits()
1062 st = new_alarms & 0xff; in lm90_report_alarms()
1079 st |= cleared_alarms & 0xff; in lm90_report_alarms()
1083 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_min_alarm, 0); in lm90_report_alarms()
1090 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_max_alarm, 0); in lm90_report_alarms()
1097 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_crit_alarm, 0); in lm90_report_alarms()
1104 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_emergency_alarm, 0); in lm90_report_alarms()
1125 if (val < 0) in lm90_update_alarms_locked()
1131 if (val < 0) in lm90_update_alarms_locked()
1148 check_enable = (client->irq || !(data->config_orig & 0x80)) && in lm90_update_alarms_locked()
1149 (data->config & 0x80); in lm90_update_alarms_locked()
1162 lm90_update_confreg(data, data->config & ~0x80); in lm90_update_alarms_locked()
1178 return 0; in lm90_update_alarms_locked()
1198 if (!(data->config & 0x80)) in lm90_alert_work()
1213 if (val < 0) in lm90_update_device()
1225 if (val < 0) in lm90_update_device()
1230 if (val < 0) in lm90_update_device()
1236 if (val < 0) in lm90_update_device()
1241 if (val < 0) in lm90_update_device()
1247 if (val < 0) in lm90_update_device()
1252 if (val < 0) { in lm90_update_device()
1262 if (val < 0) in lm90_update_device()
1269 return 0; in lm90_update_device()
1289 if (err < 0) in pec_store()
1293 case 0: in pec_store()
1340 val = regval - 0x4000; in lm90_temp_from_reg()
1364 1000 - DIV_ROUND_CLOSEST(1000, BIT(resolution - 8)) : 0; in lm90_temp_to_reg()
1370 val = clamp_val(val, 0, 255000 + fraction); in lm90_temp_to_reg()
1372 val = clamp_val(val, 0, 127000 + fraction); in lm90_temp_to_reg()
1398 u8 regl = 0; in lm90_set_temp()
1438 int temp = lm90_get_temp(data, LOCAL_CRIT, 0); in lm90_set_temphyst()
1442 data->temp_hyst = clamp_val(DIV_ROUND_CLOSEST(temp - val, 1000), 0, 31); in lm90_set_temphyst()
1451 return lm90_temp_from_reg(0, data->temp[index], res); in lm90_get_temp_offset()
1458 val = lm90_temp_to_reg(0, val, lm90_temp_get_resolution(data, index)); in lm90_set_temp_offset()
1474 return 0; in lm90_set_temp_offset()
1503 static const u16 lm90_crit_alarm_bits[MAX_CHANNELS] = { BIT(0), BIT(1), BIT(9) };
1504 static const u16 lm90_crit_alarm_bits_swapped[MAX_CHANNELS] = { BIT(1), BIT(0), BIT(9) };
1506 static const u16 lm90_fault_bits[MAX_CHANNELS] = { BIT(0), BIT(2), BIT(10) };
1577 return 0; in lm90_temp_read()
1644 if (channel == 0) in lm90_temp_is_visible()
1648 return 0; in lm90_temp_is_visible()
1675 switch (data->conalert & 0x0e) { in lm90_chip_read()
1676 case 0x0: in lm90_chip_read()
1680 case 0x2: in lm90_chip_read()
1683 case 0x6: in lm90_chip_read()
1686 case 0xe: in lm90_chip_read()
1696 return 0; in lm90_chip_read()
1714 clamp_val(val, 0, 100000)); in lm90_chip_write()
1738 return 0; in lm90_chip_is_visible()
1762 return 0; in lm90_read_string()
1787 return 0; in lm90_is_visible()
1800 u8 ff = 0xff; in lm90_detect_lm84()
1803 if (status < 0 || (status & 0xab)) in lm90_detect_lm84()
1811 for (i = 0; i < ARRAY_SIZE(regs); i++) { in lm90_detect_lm84()
1817 if (reg1 < 0) in lm90_detect_lm84()
1828 * If all registers always returned 0 or 0xff, all bets are off, in lm90_detect_lm84()
1831 return nonzero && ff != 0xff ? "lm84" : NULL; in lm90_detect_lm84()
1839 if (status < 0 || (status & 0x03)) in lm90_detect_max1617()
1842 if (config1 & 0x3f) in lm90_detect_max1617()
1846 * Fail if unsupported registers return anything but 0xff. in lm90_detect_max1617()
1849 * and should also return 0xff. in lm90_detect_max1617()
1851 if (i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_TEMPL) != 0xff || in lm90_detect_max1617()
1852 i2c_smbus_read_byte_data(client, MAX6657_REG_LOCAL_TEMPL) != 0xff || in lm90_detect_max1617()
1853 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_LOWL) != 0xff || in lm90_detect_max1617()
1854 i2c_smbus_read_byte(client) != 0xff) in lm90_detect_max1617()
1863 if (llo < 0 || rlo < 0) in lm90_detect_max1617()
1879 if ((s8)lhi < 0 || (s8)rhi < 0) in lm90_detect_max1617()
1888 * Word read operations return 0xff in second byte in lm90_detect_max1617()
1891 0xffff) in lm90_detect_max1617()
1894 (config1 | 0xff00)) in lm90_detect_max1617()
1897 (lhi | 0xff00)) in lm90_detect_max1617()
1911 if (config2 < 0) in lm90_detect_national()
1914 if ((config1 & 0x2a) || (config2 & 0xf8) || convrate > 0x09) in lm90_detect_national()
1917 if (address != 0x4c && address != 0x4d) in lm90_detect_national()
1920 switch (chip_id & 0xf0) { in lm90_detect_national()
1921 case 0x10: /* LM86 */ in lm90_detect_national()
1922 if (address == 0x4c) in lm90_detect_national()
1925 case 0x20: /* LM90 */ in lm90_detect_national()
1926 if (address == 0x4c) in lm90_detect_national()
1929 case 0x30: /* LM89/LM99 */ in lm90_detect_national()
1946 case 0xca: /* NCT218 */ in lm90_detect_on()
1947 if ((address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_on()
1948 convrate <= 0x0a) in lm90_detect_on()
1967 if (status < 0 || config2 < 0 || man_id2 < 0 || chip_id2 < 0) in lm90_detect_analog()
1972 * register values are listed. Registers 0x3d .. 0x3e are undocumented in lm90_detect_analog()
1974 * Register 0xff is undocumented for some of the chips. Register 0x3f in lm90_detect_analog()
1977 * The code below checks values for registers 0x3d, 0x3e, and 0xff, in lm90_detect_analog()
1978 * but not for register 0x3f. in lm90_detect_analog()
2007 case 0x00 ... 0x03: /* ADM1021 */ in lm90_detect_analog()
2008 case 0x05 ... 0x0f: in lm90_detect_analog()
2009 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
2010 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2013 case 0x04: /* ADT7421 (undocumented) */ in lm90_detect_analog()
2014 if (man_id2 == 0x41 && chip_id2 == 0x21 && in lm90_detect_analog()
2015 (address == 0x4c || address == 0x4d) && in lm90_detect_analog()
2016 (config1 & 0x0b) == 0x08 && convrate <= 0x0a) in lm90_detect_analog()
2019 case 0x30 ... 0x38: /* ADM1021A, ADM1023 */ in lm90_detect_analog()
2020 case 0x3a ... 0x3e: in lm90_detect_analog()
2024 * found to have a Chip ID of 0x3c. in lm90_detect_analog()
2026 * (0x12 .. 0x14), but a chip labeled ADM1021A does support it. in lm90_detect_analog()
2028 * register (0x11) was added to revision F of the ADM1021A in lm90_detect_analog()
2034 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
2035 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2038 case 0x39: /* ADM1020 (undocumented) */ in lm90_detect_analog()
2039 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2040 (address == 0x4c || address == 0x4d || address == 0x4e) && in lm90_detect_analog()
2041 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2044 case 0x3f: /* NCT210 */ in lm90_detect_analog()
2045 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
2046 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2049 case 0x40 ... 0x4f: /* ADM1032 */ in lm90_detect_analog()
2050 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2051 (address == 0x4c || address == 0x4d) && !(config1 & 0x3f) && in lm90_detect_analog()
2052 convrate <= 0x0a) in lm90_detect_analog()
2055 case 0x51: /* ADT7461 */ in lm90_detect_analog()
2056 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2057 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2058 convrate <= 0x0a) in lm90_detect_analog()
2061 case 0x54: /* NCT1008 */ in lm90_detect_analog()
2062 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2063 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2064 convrate <= 0x0a) in lm90_detect_analog()
2067 case 0x55: /* NCT72 */ in lm90_detect_analog()
2068 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2069 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2070 convrate <= 0x0a) in lm90_detect_analog()
2073 case 0x57: /* ADT7461A, NCT1008 (datasheet rev. 3) */ in lm90_detect_analog()
2074 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2075 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2076 convrate <= 0x0a) in lm90_detect_analog()
2079 case 0x5a: /* NCT214 */ in lm90_detect_analog()
2080 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2081 common_address && !(config1 & 0x1b) && convrate <= 0x0a) in lm90_detect_analog()
2084 case 0x62: /* ADT7481, undocumented */ in lm90_detect_analog()
2085 if (man_id2 == 0x41 && chip_id2 == 0x81 && in lm90_detect_analog()
2086 (address == 0x4b || address == 0x4c) && !(config1 & 0x10) && in lm90_detect_analog()
2087 !(config2 & 0x7f) && (convrate & 0x0f) <= 0x0b) { in lm90_detect_analog()
2091 case 0x65: /* ADT7482, datasheet */ in lm90_detect_analog()
2092 case 0x75: /* ADT7482, real chip */ in lm90_detect_analog()
2093 if (man_id2 == 0x41 && chip_id2 == 0x82 && in lm90_detect_analog()
2094 address == 0x4c && !(config1 & 0x10) && !(config2 & 0x7f) && in lm90_detect_analog()
2095 convrate <= 0x0a) in lm90_detect_analog()
2098 case 0x94: /* ADT7483 */ in lm90_detect_analog()
2099 if (man_id2 == 0x41 && chip_id2 == 0x83 && in lm90_detect_analog()
2101 ((address >= 0x18 && address <= 0x1a) || in lm90_detect_analog()
2102 (address >= 0x29 && address <= 0x2b) || in lm90_detect_analog()
2103 (address >= 0x4c && address <= 0x4e)) && in lm90_detect_analog()
2104 !(config1 & 0x10) && !(config2 & 0x7f) && convrate <= 0x0a) in lm90_detect_analog()
2122 case 0x01: in lm90_detect_maxim()
2140 if (emerg < 0 || man_id < 0 || emerg2 < 0 || status2 < 0) in lm90_detect_maxim()
2145 * register, reading it returns 0x01. Bit 4 of the config1 in lm90_detect_maxim()
2146 * register is unused and should return zero when read. Bit 0 of in lm90_detect_maxim()
2154 if (!(config1 & 0x10) && !(status2 & 0x01) && emerg == emerg2 && in lm90_detect_maxim()
2155 convrate <= 0x07) in lm90_detect_maxim()
2162 * address 0x12 (LM90_REG_REMOTE_OFFSL) exists for this chip and in lm90_detect_maxim()
2166 else if (!(config1 & 0x03) && convrate <= 0x07 && in lm90_detect_maxim()
2171 * address 0x10 or higher) except for manufacturer and in lm90_detect_maxim()
2174 * of 0x01. in lm90_detect_maxim()
2177 * 0x4d and device ID 0x01. It is unknown if other variants of in lm90_detect_maxim()
2181 else if (!(config1 & 0x03f) && convrate <= 0x07 && in lm90_detect_maxim()
2182 emerg == 0x01 && emerg2 == 0x01 && status2 == 0x01) in lm90_detect_maxim()
2185 case 0x08: in lm90_detect_maxim()
2191 if (common_address && !(config1 & 0x07) && convrate <= 0x07) in lm90_detect_maxim()
2194 case 0x09: in lm90_detect_maxim()
2201 * MAX6690 datasheet lists a chip ID of 0x08, and a chip labeled in lm90_detect_maxim()
2202 * MAX6654 was observed to have a chip ID of 0x09. in lm90_detect_maxim()
2204 if (common_address && !(config1 & 0x07) && convrate <= 0x07) in lm90_detect_maxim()
2207 case 0x4d: in lm90_detect_maxim()
2212 * register, or 0x4d. in lm90_detect_maxim()
2224 * address is 0x4c. in lm90_detect_maxim()
2226 if (address >= 0x48 && address <= 0x4f && config1 == convrate && in lm90_detect_maxim()
2227 !(config1 & 0x0f)) { in lm90_detect_maxim()
2237 if (i2c_smbus_read_byte_data(client, LM90_REG_MAN_ID) != 0x4d) in lm90_detect_maxim()
2241 if (i2c_smbus_read_byte_data(client, LM90_REG_CONVRATE) != 0x4d || in lm90_detect_maxim()
2242 i2c_smbus_read_byte_data(client, LM90_REG_LOCAL_LOW) != 0x4d || in lm90_detect_maxim()
2243 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_LOWH) != 0x4d) in lm90_detect_maxim()
2248 if (regval < 0 || (regval & 0x2b)) in lm90_detect_maxim()
2258 } else if ((address == 0x4c || address == 0x4d || address == 0x4e) && in lm90_detect_maxim()
2259 (config1 & 0x1f) == 0x0d && convrate <= 0x09) { in lm90_detect_maxim()
2260 if (address == 0x4c) in lm90_detect_maxim()
2266 case 0x59: in lm90_detect_maxim()
2271 * The I2C address of MAX6648/6692 is fixed at 0x4c. in lm90_detect_maxim()
2272 * MAX6646 is at address 0x4d, MAX6647 is at address 0x4e, in lm90_detect_maxim()
2273 * and MAX6649 is at address 0x4c. A slight difference between in lm90_detect_maxim()
2281 if (!(config1 & 0x3f) && convrate <= 0x07) { in lm90_detect_maxim()
2285 case 0x4c: in lm90_detect_maxim()
2288 * value of 0xff if DXP is open or shorted. in lm90_detect_maxim()
2289 * MAX6648 reports 0x80 in that case. in lm90_detect_maxim()
2293 if (temp == 0x80) in lm90_detect_maxim()
2298 case 0x4d: in lm90_detect_maxim()
2301 case 0x4e: in lm90_detect_maxim()
2323 if (config2 < 0) in lm90_detect_nuvoton()
2326 if (address == 0x4c && !(config1 & 0x2a) && !(config2 & 0xf8)) { in lm90_detect_nuvoton()
2327 if (chip_id == 0x01 && convrate <= 0x09) { in lm90_detect_nuvoton()
2330 } else if ((chip_id & 0xfe) == 0x10 && convrate <= 0x08) { in lm90_detect_nuvoton()
2346 case 0x00: in lm90_detect_nxp()
2348 if (config2 < 0) in lm90_detect_nxp()
2350 if (address >= 0x48 && address <= 0x4f && in lm90_detect_nxp()
2351 !(config1 & 0x2a) && !(config2 & 0xfe) && convrate <= 0x09) in lm90_detect_nxp()
2354 case 0x80: in lm90_detect_nxp()
2355 if (common_address && !(config1 & 0x3f) && convrate <= 0x07) in lm90_detect_nxp()
2371 * 0x4c and have a chip ID of 0x01. G781-1 is supposed to be at I2C in lm90_detect_gmt()
2372 * address 0x4d and have a chip ID of 0x03. However, when support in lm90_detect_gmt()
2373 * for G781 was added, chips at 0x4c and 0x4d were found to have a in lm90_detect_gmt()
2374 * chip ID of 0x01. A G781-1 at I2C address 0x4d was now found with in lm90_detect_gmt()
2375 * chip ID 0x03. in lm90_detect_gmt()
2376 * To avoid detection failures, accept chip ID 0x01 and 0x03 at both in lm90_detect_gmt()
2378 * G784 reports manufacturer ID 0x47 and chip ID 0x01. A public in lm90_detect_gmt()
2382 * ID 0x47 and chip ID 0x01 even though that chip does not officially in lm90_detect_gmt()
2388 if ((chip_id == 0x01 || chip_id == 0x03) && in lm90_detect_gmt()
2389 (address == 0x4c || address == 0x4d) && in lm90_detect_gmt()
2390 !(config1 & 0x3f) && convrate <= 0x08) { in lm90_detect_gmt()
2394 if (reg < 0 || reg & 0x1f) in lm90_detect_gmt()
2397 if (reg < 0 || reg & 0xf1) in lm90_detect_gmt()
2409 if (common_address && chip_id == 0x00 && !(config1 & 0x3f) && !(convrate & 0xf8)) { in lm90_detect_ti49()
2410 /* THMC10: Unsupported registers return 0xff */ in lm90_detect_ti49()
2411 if (i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_TEMPL) == 0xff && in lm90_detect_ti49()
2412 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_CRIT) == 0xff) in lm90_detect_ti49()
2424 if (chip_id == 0x00 && !(config1 & 0x1b) && convrate <= 0x09) { in lm90_detect_ti()
2434 if (!(local_ext & 0x0f) && (conalert & 0xf1) == 0x01 && in lm90_detect_ti()
2435 (chen & 0xfc) == 0x00 && (dfc & 0xfc) == 0x00) { in lm90_detect_ti()
2436 if (address == 0x4c && !(chen & 0x03)) in lm90_detect_ti()
2438 else if (address >= 0x48 && address <= 0x4f) in lm90_detect_ti()
2446 /* Return 0 if detection is successful, -ENODEV otherwise */
2454 (address >= 0x18 && address <= 0x1a) || in lm90_detect()
2455 (address >= 0x29 && address <= 0x2b) || in lm90_detect()
2456 (address >= 0x4c && address <= 0x4e); in lm90_detect()
2472 if (man_id < 0 || chip_id < 0 || config1 < 0 || convrate < 0 || lhigh < 0) in lm90_detect()
2488 if (convrate < 0 || man_id < 0 || chip_id < 0) in lm90_detect()
2495 if (common_address && !convrate && !(config1 & 0x7f)) in lm90_detect()
2498 case 0x01: /* National Semiconductor */ in lm90_detect()
2501 case 0x1a: /* ON */ in lm90_detect()
2504 case 0x23: /* Genesys Logic */ in lm90_detect()
2505 if (common_address && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect()
2508 case 0x41: /* Analog Devices */ in lm90_detect()
2512 case 0x47: /* GMT */ in lm90_detect()
2515 case 0x49: /* TI */ in lm90_detect()
2518 case 0x4d: /* Maxim Integrated */ in lm90_detect()
2522 case 0x54: /* ON MC1066, Microchip TC1068, TCM1617 (originally TelCom) */ in lm90_detect()
2523 if (common_address && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect()
2526 case 0x55: /* TI */ in lm90_detect()
2529 case 0x5c: /* Winbond/Nuvoton */ in lm90_detect()
2532 case 0xa1: /* NXP Semiconductor/Philips */ in lm90_detect()
2535 case 0xff: /* MAX1617, G767, NE1617 */ in lm90_detect()
2536 if (common_address && chip_id == 0xff && convrate < 8) in lm90_detect()
2545 "Unsupported chip at 0x%02x (man_id=0x%02X, chip_id=0x%02X)\n", in lm90_detect()
2552 return 0; in lm90_detect()
2576 if (convrate < 0) in lm90_init_client()
2588 if (config < 0) in lm90_init_client()
2596 config |= 0x04; in lm90_init_client()
2597 if (!(config & 0x04)) in lm90_init_client()
2602 * Put MAX6680/MAX8881 into extended resolution (bit 0x10, in lm90_init_client()
2603 * 0.125 degree resolution) and range (0x08, extend range in lm90_init_client()
2609 config |= 0x18; in lm90_init_client()
2612 * Put MAX6654 into extended range (0x20, extend minimum range from in lm90_init_client()
2613 * 0 degrees to -64 degrees). Note that extended resolution is not in lm90_init_client()
2618 config |= 0x20; in lm90_init_client()
2621 * Select external channel 0 for devices with three sensors in lm90_init_client()
2624 config &= ~0x08; in lm90_init_client()
2631 config &= ~0x80; in lm90_init_client()
2633 config &= 0xBF; /* run */ in lm90_init_client()
2645 if (ret < 0) in lm90_is_tripped()
2702 if (id == 0) { in lm90_probe_channel_from_dt()
2715 return 0; in lm90_probe_channel_from_dt()
2737 return 0; in lm90_parse_dt_channel_info()
2762 if (err < 0) { in lm90_probe()
2808 data->info[0] = &data->chip_info; in lm90_probe()
2813 data->chip_config[0] = HWMON_C_REGISTER_TZ; in lm90_probe()
2815 data->chip_config[0] |= HWMON_C_ALARMS; in lm90_probe()
2817 data->chip_config[0] |= HWMON_C_UPDATE_INTERVAL; in lm90_probe()
2819 data->chip_config[0] |= HWMON_C_TEMP_SAMPLES; in lm90_probe()
2826 data->channel_config[0] = HWMON_T_INPUT | HWMON_T_MAX | in lm90_probe()
2832 data->channel_config[0] |= HWMON_T_MIN | HWMON_T_MIN_ALARM; in lm90_probe()
2837 data->channel_config[0] |= HWMON_T_CRIT | HWMON_T_CRIT_ALARM | HWMON_T_CRIT_HYST; in lm90_probe()
2845 data->channel_config[0] |= HWMON_T_EMERGENCY | in lm90_probe()
2852 data->channel_config[0] |= HWMON_T_EMERGENCY_ALARM; in lm90_probe()
2891 if (err < 0) { in lm90_probe()
2922 if (err < 0) { in lm90_probe()
2928 return 0; in lm90_probe()
2947 if (!(data->config & 0x80)) { in lm90_alert()
2949 lm90_update_confreg(data, data->config | 0x80); in lm90_alert()
2967 return 0; in lm90_suspend()
2978 return 0; in lm90_resume()