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.
125 * MAX6657, MAX6658, NCT1008, NCT7718 and W83L771 have address 0x4c.
127 * have address 0x4d.
128 * MAX6647 has address 0x4e.
129 * MAX6659 can have address 0x4c, 0x4d or 0x4e.
130 * MAX6654, MAX6680, and MAX6681 can have address 0x18, 0x19, 0x1a, 0x29,
131 * 0x2a, 0x2b, 0x4c, 0x4d or 0x4e.
132 * NCT7716 can have address 0x48 or 0x49.
133 * NCT7717 has address 0x48.
134 * SA56004 can have address 0x48 through 0x4F.
138 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x48, 0x49, 0x4a, 0x4b, 0x4c,
139 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
151 #define LM90_REG_MAN_ID 0xFE
152 #define LM90_REG_CHIP_ID 0xFF
153 #define LM90_REG_CONFIG1 0x03
154 #define LM90_REG_CONFIG2 0xBF
155 #define LM90_REG_CONVRATE 0x04
156 #define LM90_REG_STATUS 0x02
157 #define LM90_REG_LOCAL_TEMP 0x00
158 #define LM90_REG_LOCAL_HIGH 0x05
159 #define LM90_REG_LOCAL_LOW 0x06
160 #define LM90_REG_LOCAL_CRIT 0x20
161 #define LM90_REG_REMOTE_TEMPH 0x01
162 #define LM90_REG_REMOTE_TEMPL 0x10
163 #define LM90_REG_REMOTE_OFFSH 0x11
164 #define LM90_REG_REMOTE_OFFSL 0x12
165 #define LM90_REG_REMOTE_HIGHH 0x07
166 #define LM90_REG_REMOTE_HIGHL 0x13
167 #define LM90_REG_REMOTE_LOWH 0x08
168 #define LM90_REG_REMOTE_LOWL 0x14
169 #define LM90_REG_REMOTE_CRIT 0x19
170 #define LM90_REG_TCRIT_HYST 0x21
174 #define MAX6657_REG_LOCAL_TEMPL 0x11
175 #define MAX6696_REG_STATUS2 0x12
176 #define MAX6659_REG_REMOTE_EMERG 0x16
177 #define MAX6659_REG_LOCAL_EMERG 0x17
181 #define SA56004_REG_LOCAL_TEMPL 0x22
186 #define TMP451_REG_LOCAL_TEMPL 0x15
187 #define TMP451_REG_CONALERT 0x22
189 #define TMP461_REG_CHEN 0x16
190 #define TMP461_REG_DFC 0x24
193 #define ADT7481_REG_STATUS2 0x23
194 #define ADT7481_REG_CONFIG2 0x24
196 #define ADT7481_REG_MAN_ID 0x3e
197 #define ADT7481_REG_CHIP_ID 0x3d
200 #define NCT7716_REG_CHIP_ID 0xFD
203 #define LM90_HAVE_EXTENDED_TEMP BIT(0) /* extended temperature support */
224 #define LM90_STATUS_LTHRM BIT(0) /* local THERM limit tripped */
448 .alert_alarms = 0x7c,
458 .alert_alarms = 0x7c,
472 .alert_alarms = 0x7c,
482 .alert_alarms = 0x7c,
492 .alert_alarms = 0x1c7c,
502 .alert_alarms = 0x7c,
514 .alert_alarms = 0x7b,
516 .faultqueue_mask = BIT(0),
524 .alert_alarms = 0x7b,
526 .faultqueue_mask = BIT(0),
532 .alert_alarms = 0x78,
539 .alert_alarms = 0x50,
549 .alert_alarms = 0x7c,
557 .alert_alarms = 0x7c,
564 .alert_alarms = 0x7c,
572 .alert_alarms = 0x7c,
580 .alert_alarms = 0x7c,
594 .alert_alarms = 0x7c,
602 .alert_alarms = 0x1c7c,
615 .alert_alarms = 0x7c,
623 .alert_alarms = 0x7c,
629 .alert_alarms = 0x40,
635 .alert_alarms = 0x40,
643 .alert_alarms = 0x7c,
650 .alert_alarms = 0x7c,
658 .alert_alarms = 0x7c,
670 .alert_alarms = 0x7b,
673 .faultqueue_mask = BIT(0),
681 .alert_alarms = 0x7c,
691 .alert_alarms = 0x7c,
702 LOCAL_LOW = 0,
812 * The write address for registers 0x03 .. 0x08 is the read address plus 6.
842 if (ret < 0 || !regl) in lm90_write16()
844 return lm90_write_reg(client, regl, val & 0xff); in lm90_write16()
853 if (oldh < 0) in lm90_read16()
860 if (l < 0) in lm90_read16()
880 if (newh < 0) in lm90_read16()
884 if (l < 0) in lm90_read16()
900 return 0; in lm90_update_confreg()
906 * than channel 0 is selected. Also, calling code must make sure to re-select
907 * external channel 0 before releasing the lock. This is necessary because
913 u8 config = data->config & ~0x08; in lm90_select_remote_channel()
916 config |= 0x08; in lm90_select_remote_channel()
928 err = lm90_update_confreg(data, config | 0x40); in lm90_write_convrate()
929 if (err < 0) in lm90_write_convrate()
957 for (i = 0, update_interval = LM90_MAX_CONVRATE_MS << 6; in lm90_set_convrate()
977 static const u8 values[4] = {0, 2, 6, 0x0e}; in lm90_set_faultqueue()
979 data->conalert = (data->conalert & 0xf1) | values[val - 1]; in lm90_set_faultqueue()
995 if (val < 0) in lm90_update_limits()
1000 if (val < 0) in lm90_update_limits()
1005 if (val < 0) in lm90_update_limits()
1011 if (val < 0) in lm90_update_limits()
1017 (data->flags & LM90_HAVE_REM_LIMIT_EXT) ? LM90_REG_REMOTE_LOWL : 0, in lm90_update_limits()
1019 if (val < 0) in lm90_update_limits()
1024 (data->flags & LM90_HAVE_REM_LIMIT_EXT) ? LM90_REG_REMOTE_HIGHL : 0, in lm90_update_limits()
1026 if (val < 0) in lm90_update_limits()
1033 if (val < 0) in lm90_update_limits()
1040 if (val < 0) in lm90_update_limits()
1045 if (val < 0) in lm90_update_limits()
1052 if (val < 0) in lm90_update_limits()
1056 if (val < 0) in lm90_update_limits()
1062 if (val < 0) in lm90_update_limits()
1068 if (val < 0) in lm90_update_limits()
1073 if (val < 0) in lm90_update_limits()
1080 if (val < 0) in lm90_update_limits()
1088 return 0; in lm90_update_limits()
1106 st = new_alarms & 0xff; in lm90_report_alarms()
1123 st |= cleared_alarms & 0xff; in lm90_report_alarms()
1127 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_min_alarm, 0); in lm90_report_alarms()
1134 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_max_alarm, 0); in lm90_report_alarms()
1141 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_crit_alarm, 0); in lm90_report_alarms()
1148 hwmon_notify_event(hwmon_dev, hwmon_temp, hwmon_temp_emergency_alarm, 0); in lm90_report_alarms()
1169 if (val < 0) in lm90_update_alarms_locked()
1175 if (val < 0) in lm90_update_alarms_locked()
1192 check_enable = (client->irq || !(data->config_orig & 0x80)) && in lm90_update_alarms_locked()
1193 (data->config & 0x80); in lm90_update_alarms_locked()
1206 lm90_update_confreg(data, data->config & ~0x80); in lm90_update_alarms_locked()
1222 return 0; in lm90_update_alarms_locked()
1242 if (!(data->config & 0x80)) in lm90_alert_work()
1257 if (val < 0) in lm90_update_device()
1269 if (val < 0) in lm90_update_device()
1274 if (val < 0) in lm90_update_device()
1280 if (val < 0) in lm90_update_device()
1285 if (val < 0) in lm90_update_device()
1291 if (val < 0) in lm90_update_device()
1296 if (val < 0) { in lm90_update_device()
1306 if (val < 0) in lm90_update_device()
1313 return 0; in lm90_update_device()
1348 val = regval - 0x4000; in lm90_temp_from_reg()
1372 1000 - DIV_ROUND_CLOSEST(1000, BIT(resolution - 8)) : 0; in lm90_temp_to_reg()
1378 val = clamp_val(val, 0, 255000 + fraction); in lm90_temp_to_reg()
1380 val = clamp_val(val, 0, 127000 + fraction); in lm90_temp_to_reg()
1406 u8 regl = 0; in lm90_set_temp()
1446 int temp = lm90_get_temp(data, LOCAL_CRIT, 0); in lm90_set_temphyst()
1450 data->temp_hyst = clamp_val(DIV_ROUND_CLOSEST(temp - val, 1000), 0, 31); in lm90_set_temphyst()
1459 return lm90_temp_from_reg(0, data->temp[index], res); in lm90_get_temp_offset()
1466 val = lm90_temp_to_reg(0, val, lm90_temp_get_resolution(data, index)); in lm90_set_temp_offset()
1482 return 0; in lm90_set_temp_offset()
1511 static const u16 lm90_crit_alarm_bits[MAX_CHANNELS] = { BIT(0), BIT(1), BIT(9) };
1512 static const u16 lm90_crit_alarm_bits_swapped[MAX_CHANNELS] = { BIT(1), BIT(0), BIT(9) };
1514 static const u16 lm90_fault_bits[MAX_CHANNELS] = { BIT(0), BIT(2), BIT(10) };
1585 return 0; in lm90_temp_read()
1652 if (channel == 0) in lm90_temp_is_visible()
1656 return 0; in lm90_temp_is_visible()
1683 switch (data->conalert & 0x0e) { in lm90_chip_read()
1684 case 0x0: in lm90_chip_read()
1688 case 0x2: in lm90_chip_read()
1691 case 0x6: in lm90_chip_read()
1694 case 0xe: in lm90_chip_read()
1704 return 0; in lm90_chip_read()
1722 clamp_val(val, 0, 100000)); in lm90_chip_write()
1746 return 0; in lm90_chip_is_visible()
1770 return 0; in lm90_read_string()
1795 return 0; in lm90_is_visible()
1808 u8 ff = 0xff; in lm90_detect_lm84()
1811 if (status < 0 || (status & 0xab)) in lm90_detect_lm84()
1819 for (i = 0; i < ARRAY_SIZE(regs); i++) { in lm90_detect_lm84()
1825 if (reg1 < 0) in lm90_detect_lm84()
1836 * If all registers always returned 0 or 0xff, all bets are off, in lm90_detect_lm84()
1839 return nonzero && ff != 0xff ? "lm84" : NULL; in lm90_detect_lm84()
1847 if (status < 0 || (status & 0x03)) in lm90_detect_max1617()
1850 if (config1 & 0x3f) in lm90_detect_max1617()
1854 * Fail if unsupported registers return anything but 0xff. in lm90_detect_max1617()
1857 * and should also return 0xff. in lm90_detect_max1617()
1859 if (i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_TEMPL) != 0xff || in lm90_detect_max1617()
1860 i2c_smbus_read_byte_data(client, MAX6657_REG_LOCAL_TEMPL) != 0xff || in lm90_detect_max1617()
1861 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_LOWL) != 0xff || in lm90_detect_max1617()
1862 i2c_smbus_read_byte(client) != 0xff) in lm90_detect_max1617()
1871 if (llo < 0 || rlo < 0) in lm90_detect_max1617()
1887 if ((s8)lhi < 0 || (s8)rhi < 0) in lm90_detect_max1617()
1896 * Word read operations return 0xff in second byte in lm90_detect_max1617()
1899 0xffff) in lm90_detect_max1617()
1902 (config1 | 0xff00)) in lm90_detect_max1617()
1905 (lhi | 0xff00)) in lm90_detect_max1617()
1919 if (config2 < 0) in lm90_detect_national()
1922 if ((config1 & 0x2a) || (config2 & 0xf8) || convrate > 0x09) in lm90_detect_national()
1925 if (address != 0x4c && address != 0x4d) in lm90_detect_national()
1928 switch (chip_id & 0xf0) { in lm90_detect_national()
1929 case 0x10: /* LM86 */ in lm90_detect_national()
1930 if (address == 0x4c) in lm90_detect_national()
1933 case 0x20: /* LM90 */ in lm90_detect_national()
1934 if (address == 0x4c) in lm90_detect_national()
1937 case 0x30: /* LM89/LM99 */ in lm90_detect_national()
1954 case 0xca: /* NCT218 */ in lm90_detect_on()
1955 if ((address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_on()
1956 convrate <= 0x0a) in lm90_detect_on()
1975 if (status < 0 || config2 < 0 || man_id2 < 0 || chip_id2 < 0) in lm90_detect_analog()
1980 * register values are listed. Registers 0x3d .. 0x3e are undocumented in lm90_detect_analog()
1982 * Register 0xff is undocumented for some of the chips. Register 0x3f in lm90_detect_analog()
1985 * The code below checks values for registers 0x3d, 0x3e, and 0xff, in lm90_detect_analog()
1986 * but not for register 0x3f. in lm90_detect_analog()
2015 case 0x00 ... 0x03: /* ADM1021 */ in lm90_detect_analog()
2016 case 0x05 ... 0x0f: in lm90_detect_analog()
2017 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
2018 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2021 case 0x04: /* ADT7421 (undocumented) */ in lm90_detect_analog()
2022 if (man_id2 == 0x41 && chip_id2 == 0x21 && in lm90_detect_analog()
2023 (address == 0x4c || address == 0x4d) && in lm90_detect_analog()
2024 (config1 & 0x0b) == 0x08 && convrate <= 0x0a) in lm90_detect_analog()
2027 case 0x30 ... 0x38: /* ADM1021A, ADM1023 */ in lm90_detect_analog()
2028 case 0x3a ... 0x3e: in lm90_detect_analog()
2032 * found to have a Chip ID of 0x3c. in lm90_detect_analog()
2034 * (0x12 .. 0x14), but a chip labeled ADM1021A does support it. in lm90_detect_analog()
2036 * register (0x11) was added to revision F of the ADM1021A in lm90_detect_analog()
2042 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
2043 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2046 case 0x39: /* ADM1020 (undocumented) */ in lm90_detect_analog()
2047 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2048 (address == 0x4c || address == 0x4d || address == 0x4e) && in lm90_detect_analog()
2049 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2052 case 0x3f: /* NCT210 */ in lm90_detect_analog()
2053 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
2054 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2057 case 0x40 ... 0x4f: /* ADM1032 */ in lm90_detect_analog()
2058 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2059 (address == 0x4c || address == 0x4d) && !(config1 & 0x3f) && in lm90_detect_analog()
2060 convrate <= 0x0a) in lm90_detect_analog()
2063 case 0x51: /* ADT7461 */ in lm90_detect_analog()
2064 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2065 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2066 convrate <= 0x0a) in lm90_detect_analog()
2069 case 0x54: /* NCT1008 */ in lm90_detect_analog()
2070 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2071 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2072 convrate <= 0x0a) in lm90_detect_analog()
2075 case 0x55: /* NCT72 */ in lm90_detect_analog()
2076 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2077 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2078 convrate <= 0x0a) in lm90_detect_analog()
2081 case 0x57: /* ADT7461A, NCT1008 (datasheet rev. 3) */ in lm90_detect_analog()
2082 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2083 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2084 convrate <= 0x0a) in lm90_detect_analog()
2087 case 0x5a: /* NCT214 */ in lm90_detect_analog()
2088 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2089 common_address && !(config1 & 0x1b) && convrate <= 0x0a) in lm90_detect_analog()
2092 case 0x62: /* ADT7481, undocumented */ in lm90_detect_analog()
2093 if (man_id2 == 0x41 && chip_id2 == 0x81 && in lm90_detect_analog()
2094 (address == 0x4b || address == 0x4c) && !(config1 & 0x10) && in lm90_detect_analog()
2095 !(config2 & 0x7f) && (convrate & 0x0f) <= 0x0b) { in lm90_detect_analog()
2099 case 0x65: /* ADT7482, datasheet */ in lm90_detect_analog()
2100 case 0x75: /* ADT7482, real chip */ in lm90_detect_analog()
2101 if (man_id2 == 0x41 && chip_id2 == 0x82 && in lm90_detect_analog()
2102 address == 0x4c && !(config1 & 0x10) && !(config2 & 0x7f) && in lm90_detect_analog()
2103 convrate <= 0x0a) in lm90_detect_analog()
2106 case 0x94: /* ADT7483 */ in lm90_detect_analog()
2107 if (man_id2 == 0x41 && chip_id2 == 0x83 && in lm90_detect_analog()
2109 ((address >= 0x18 && address <= 0x1a) || in lm90_detect_analog()
2110 (address >= 0x29 && address <= 0x2b) || in lm90_detect_analog()
2111 (address >= 0x4c && address <= 0x4e)) && in lm90_detect_analog()
2112 !(config1 & 0x10) && !(config2 & 0x7f) && convrate <= 0x0a) in lm90_detect_analog()
2130 case 0x01: in lm90_detect_maxim()
2148 if (emerg < 0 || man_id < 0 || emerg2 < 0 || status2 < 0) in lm90_detect_maxim()
2153 * register, reading it returns 0x01. Bit 4 of the config1 in lm90_detect_maxim()
2154 * register is unused and should return zero when read. Bit 0 of in lm90_detect_maxim()
2162 if (!(config1 & 0x10) && !(status2 & 0x01) && emerg == emerg2 && in lm90_detect_maxim()
2163 convrate <= 0x07) in lm90_detect_maxim()
2170 * address 0x12 (LM90_REG_REMOTE_OFFSL) exists for this chip and in lm90_detect_maxim()
2174 else if (!(config1 & 0x03) && convrate <= 0x07 && in lm90_detect_maxim()
2179 * address 0x10 or higher) except for manufacturer and in lm90_detect_maxim()
2182 * of 0x01. in lm90_detect_maxim()
2185 * 0x4d and device ID 0x01. It is unknown if other variants of in lm90_detect_maxim()
2189 else if (!(config1 & 0x03f) && convrate <= 0x07 && in lm90_detect_maxim()
2190 emerg == 0x01 && emerg2 == 0x01 && status2 == 0x01) in lm90_detect_maxim()
2193 case 0x08: in lm90_detect_maxim()
2199 if (common_address && !(config1 & 0x07) && convrate <= 0x07) in lm90_detect_maxim()
2202 case 0x09: in lm90_detect_maxim()
2209 * MAX6690 datasheet lists a chip ID of 0x08, and a chip labeled in lm90_detect_maxim()
2210 * MAX6654 was observed to have a chip ID of 0x09. in lm90_detect_maxim()
2212 if (common_address && !(config1 & 0x07) && convrate <= 0x07) in lm90_detect_maxim()
2215 case 0x4d: in lm90_detect_maxim()
2220 * register, or 0x4d. in lm90_detect_maxim()
2232 * address is 0x4c. in lm90_detect_maxim()
2234 if (address >= 0x48 && address <= 0x4f && config1 == convrate && in lm90_detect_maxim()
2235 !(config1 & 0x0f)) { in lm90_detect_maxim()
2245 if (i2c_smbus_read_byte_data(client, LM90_REG_MAN_ID) != 0x4d) in lm90_detect_maxim()
2249 if (i2c_smbus_read_byte_data(client, LM90_REG_CONVRATE) != 0x4d || in lm90_detect_maxim()
2250 i2c_smbus_read_byte_data(client, LM90_REG_LOCAL_LOW) != 0x4d || in lm90_detect_maxim()
2251 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_LOWH) != 0x4d) in lm90_detect_maxim()
2256 if (regval < 0 || (regval & 0x2b)) in lm90_detect_maxim()
2266 } else if ((address == 0x4c || address == 0x4d || address == 0x4e) && in lm90_detect_maxim()
2267 (config1 & 0x1f) == 0x0d && convrate <= 0x09) { in lm90_detect_maxim()
2268 if (address == 0x4c) in lm90_detect_maxim()
2274 case 0x59: in lm90_detect_maxim()
2279 * The I2C address of MAX6648/6692 is fixed at 0x4c. in lm90_detect_maxim()
2280 * MAX6646 is at address 0x4d, MAX6647 is at address 0x4e, in lm90_detect_maxim()
2281 * and MAX6649 is at address 0x4c. A slight difference between in lm90_detect_maxim()
2289 if (!(config1 & 0x3f) && convrate <= 0x07) { in lm90_detect_maxim()
2293 case 0x4c: in lm90_detect_maxim()
2296 * value of 0xff if DXP is open or shorted. in lm90_detect_maxim()
2297 * MAX6648 reports 0x80 in that case. in lm90_detect_maxim()
2301 if (temp == 0x80) in lm90_detect_maxim()
2306 case 0x4d: in lm90_detect_maxim()
2309 case 0x4e: in lm90_detect_maxim()
2331 if (config2 < 0) in lm90_detect_nuvoton()
2334 if (address == 0x4c && !(config1 & 0x2a) && !(config2 & 0xf8)) { in lm90_detect_nuvoton()
2335 if (chip_id == 0x01 && convrate <= 0x09) { in lm90_detect_nuvoton()
2338 } else if ((chip_id & 0xfe) == 0x10 && convrate <= 0x08) { in lm90_detect_nuvoton()
2354 if (chip_id2 < 0 || config2 < 0) in lm90_detect_nuvoton_50()
2357 if (chip_id2 != 0x50 || convrate > 0x08) in lm90_detect_nuvoton_50()
2361 case 0x90: in lm90_detect_nuvoton_50()
2362 if (address == 0x48 && !(config1 & 0x3e) && !(config2 & 0xfe)) in lm90_detect_nuvoton_50()
2365 case 0x91: in lm90_detect_nuvoton_50()
2366 if ((address == 0x48 || address == 0x49) && !(config1 & 0x3e) && in lm90_detect_nuvoton_50()
2367 !(config2 & 0xfe)) in lm90_detect_nuvoton_50()
2369 else if (address == 0x4c && !(config1 & 0x38) && !(config2 & 0xf8)) in lm90_detect_nuvoton_50()
2386 case 0x00: in lm90_detect_nxp()
2388 if (config2 < 0) in lm90_detect_nxp()
2390 if (address >= 0x48 && address <= 0x4f && in lm90_detect_nxp()
2391 !(config1 & 0x2a) && !(config2 & 0xfe) && convrate <= 0x09) in lm90_detect_nxp()
2394 case 0x80: in lm90_detect_nxp()
2395 if (common_address && !(config1 & 0x3f) && convrate <= 0x07) in lm90_detect_nxp()
2411 * 0x4c and have a chip ID of 0x01. G781-1 is supposed to be at I2C in lm90_detect_gmt()
2412 * address 0x4d and have a chip ID of 0x03. However, when support in lm90_detect_gmt()
2413 * for G781 was added, chips at 0x4c and 0x4d were found to have a in lm90_detect_gmt()
2414 * chip ID of 0x01. A G781-1 at I2C address 0x4d was now found with in lm90_detect_gmt()
2415 * chip ID 0x03. in lm90_detect_gmt()
2416 * To avoid detection failures, accept chip ID 0x01 and 0x03 at both in lm90_detect_gmt()
2418 * G784 reports manufacturer ID 0x47 and chip ID 0x01. A public in lm90_detect_gmt()
2422 * ID 0x47 and chip ID 0x01 even though that chip does not officially in lm90_detect_gmt()
2428 if ((chip_id == 0x01 || chip_id == 0x03) && in lm90_detect_gmt()
2429 (address == 0x4c || address == 0x4d) && in lm90_detect_gmt()
2430 !(config1 & 0x3f) && convrate <= 0x08) { in lm90_detect_gmt()
2434 if (reg < 0 || reg & 0x1f) in lm90_detect_gmt()
2437 if (reg < 0 || reg & 0xf1) in lm90_detect_gmt()
2449 if (common_address && chip_id == 0x00 && !(config1 & 0x3f) && !(convrate & 0xf8)) { in lm90_detect_ti49()
2450 /* THMC10: Unsupported registers return 0xff */ in lm90_detect_ti49()
2451 if (i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_TEMPL) == 0xff && in lm90_detect_ti49()
2452 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_CRIT) == 0xff) in lm90_detect_ti49()
2464 if (chip_id == 0x00 && !(config1 & 0x1b) && convrate <= 0x09) { in lm90_detect_ti()
2474 if (!(local_ext & 0x0f) && (conalert & 0xf1) == 0x01 && in lm90_detect_ti()
2475 (chen & 0xfc) == 0x00 && (dfc & 0xfc) == 0x00) { in lm90_detect_ti()
2476 if (address == 0x4c && !(chen & 0x03)) in lm90_detect_ti()
2478 else if (address >= 0x48 && address <= 0x4f) in lm90_detect_ti()
2486 /* Return 0 if detection is successful, -ENODEV otherwise */
2494 (address >= 0x18 && address <= 0x1a) || in lm90_detect()
2495 (address >= 0x29 && address <= 0x2b) || in lm90_detect()
2496 (address >= 0x4c && address <= 0x4e); in lm90_detect()
2512 if (man_id < 0 || chip_id < 0 || config1 < 0 || convrate < 0 || lhigh < 0) in lm90_detect()
2528 if (convrate < 0 || man_id < 0 || chip_id < 0) in lm90_detect()
2535 if (common_address && !convrate && !(config1 & 0x7f)) in lm90_detect()
2538 case 0x01: /* National Semiconductor */ in lm90_detect()
2541 case 0x1a: /* ON */ in lm90_detect()
2544 case 0x23: /* Genesys Logic */ in lm90_detect()
2545 if (common_address && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect()
2548 case 0x41: /* Analog Devices */ in lm90_detect()
2552 case 0x47: /* GMT */ in lm90_detect()
2555 case 0x49: /* TI */ in lm90_detect()
2558 case 0x4d: /* Maxim Integrated */ in lm90_detect()
2562 case 0x50: in lm90_detect()
2565 case 0x54: /* ON MC1066, Microchip TC1068, TCM1617 (originally TelCom) */ in lm90_detect()
2566 if (common_address && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect()
2569 case 0x55: /* TI */ in lm90_detect()
2572 case 0x5c: /* Winbond/Nuvoton */ in lm90_detect()
2575 case 0xa1: /* NXP Semiconductor/Philips */ in lm90_detect()
2578 case 0xff: /* MAX1617, G767, NE1617 */ in lm90_detect()
2579 if (common_address && chip_id == 0xff && convrate < 8) in lm90_detect()
2588 "Unsupported chip at 0x%02x (man_id=0x%02X, chip_id=0x%02X)\n", in lm90_detect()
2595 return 0; in lm90_detect()
2619 if (convrate < 0) in lm90_init_client()
2631 if (config < 0) in lm90_init_client()
2639 config |= 0x04; in lm90_init_client()
2640 if (!(config & 0x04)) in lm90_init_client()
2645 * Put MAX6680/MAX8881 into extended resolution (bit 0x10, in lm90_init_client()
2646 * 0.125 degree resolution) and range (0x08, extend range in lm90_init_client()
2652 config |= 0x18; in lm90_init_client()
2655 * Put MAX6654 into extended range (0x20, extend minimum range from in lm90_init_client()
2656 * 0 degrees to -64 degrees). Note that extended resolution is not in lm90_init_client()
2661 config |= 0x20; in lm90_init_client()
2664 * Select external channel 0 for devices with three sensors in lm90_init_client()
2667 config &= ~0x08; in lm90_init_client()
2674 config &= ~0x80; in lm90_init_client()
2676 config &= 0xBF; /* run */ in lm90_init_client()
2688 if (ret < 0) in lm90_is_tripped()
2735 if (id == 0) { in lm90_probe_channel_from_dt()
2748 return 0; in lm90_probe_channel_from_dt()
2767 return 0; in lm90_parse_dt_channel_info()
2824 data->info[0] = &data->chip_info; in lm90_probe()
2829 data->chip_config[0] = HWMON_C_REGISTER_TZ; in lm90_probe()
2831 data->chip_config[0] |= HWMON_C_ALARMS; in lm90_probe()
2833 data->chip_config[0] |= HWMON_C_UPDATE_INTERVAL; in lm90_probe()
2835 data->chip_config[0] |= HWMON_C_TEMP_SAMPLES; in lm90_probe()
2837 data->chip_config[0] |= HWMON_C_PEC; in lm90_probe()
2844 data->channel_config[0] = HWMON_T_INPUT | HWMON_T_MAX | in lm90_probe()
2850 data->channel_config[0] |= HWMON_T_MIN | HWMON_T_MIN_ALARM; in lm90_probe()
2855 data->channel_config[0] |= HWMON_T_CRIT | HWMON_T_CRIT_ALARM | HWMON_T_CRIT_HYST; in lm90_probe()
2863 data->channel_config[0] |= HWMON_T_EMERGENCY | in lm90_probe()
2870 data->channel_config[0] |= HWMON_T_EMERGENCY_ALARM; in lm90_probe()
2909 if (err < 0) { in lm90_probe()
2927 if (err < 0) { in lm90_probe()
2933 return 0; in lm90_probe()
2952 if (!(data->config & 0x80)) { in lm90_alert()
2954 lm90_update_confreg(data, data->config | 0x80); in lm90_alert()
2972 return 0; in lm90_suspend()
2983 return 0; in lm90_resume()