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.
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()
1290 if (err < 0) in pec_store()
1294 case 0: in pec_store()
1341 val = regval - 0x4000; in lm90_temp_from_reg()
1365 1000 - DIV_ROUND_CLOSEST(1000, BIT(resolution - 8)) : 0; in lm90_temp_to_reg()
1371 val = clamp_val(val, 0, 255000 + fraction); in lm90_temp_to_reg()
1373 val = clamp_val(val, 0, 127000 + fraction); in lm90_temp_to_reg()
1399 u8 regl = 0; in lm90_set_temp()
1439 int temp = lm90_get_temp(data, LOCAL_CRIT, 0); in lm90_set_temphyst()
1443 data->temp_hyst = clamp_val(DIV_ROUND_CLOSEST(temp - val, 1000), 0, 31); in lm90_set_temphyst()
1452 return lm90_temp_from_reg(0, data->temp[index], res); in lm90_get_temp_offset()
1459 val = lm90_temp_to_reg(0, val, lm90_temp_get_resolution(data, index)); in lm90_set_temp_offset()
1475 return 0; in lm90_set_temp_offset()
1504 static const u16 lm90_crit_alarm_bits[MAX_CHANNELS] = { BIT(0), BIT(1), BIT(9) };
1505 static const u16 lm90_crit_alarm_bits_swapped[MAX_CHANNELS] = { BIT(1), BIT(0), BIT(9) };
1507 static const u16 lm90_fault_bits[MAX_CHANNELS] = { BIT(0), BIT(2), BIT(10) };
1578 return 0; in lm90_temp_read()
1645 if (channel == 0) in lm90_temp_is_visible()
1649 return 0; in lm90_temp_is_visible()
1676 switch (data->conalert & 0x0e) { in lm90_chip_read()
1677 case 0x0: in lm90_chip_read()
1681 case 0x2: in lm90_chip_read()
1684 case 0x6: in lm90_chip_read()
1687 case 0xe: in lm90_chip_read()
1697 return 0; in lm90_chip_read()
1715 clamp_val(val, 0, 100000)); in lm90_chip_write()
1739 return 0; in lm90_chip_is_visible()
1763 return 0; in lm90_read_string()
1788 return 0; in lm90_is_visible()
1801 u8 ff = 0xff; in lm90_detect_lm84()
1804 if (status < 0 || (status & 0xab)) in lm90_detect_lm84()
1812 for (i = 0; i < ARRAY_SIZE(regs); i++) { in lm90_detect_lm84()
1818 if (reg1 < 0) in lm90_detect_lm84()
1829 * If all registers always returned 0 or 0xff, all bets are off, in lm90_detect_lm84()
1832 return nonzero && ff != 0xff ? "lm84" : NULL; in lm90_detect_lm84()
1840 if (status < 0 || (status & 0x03)) in lm90_detect_max1617()
1843 if (config1 & 0x3f) in lm90_detect_max1617()
1847 * Fail if unsupported registers return anything but 0xff. in lm90_detect_max1617()
1850 * and should also return 0xff. in lm90_detect_max1617()
1852 if (i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_TEMPL) != 0xff || in lm90_detect_max1617()
1853 i2c_smbus_read_byte_data(client, MAX6657_REG_LOCAL_TEMPL) != 0xff || in lm90_detect_max1617()
1854 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_LOWL) != 0xff || in lm90_detect_max1617()
1855 i2c_smbus_read_byte(client) != 0xff) in lm90_detect_max1617()
1864 if (llo < 0 || rlo < 0) in lm90_detect_max1617()
1880 if ((s8)lhi < 0 || (s8)rhi < 0) in lm90_detect_max1617()
1889 * Word read operations return 0xff in second byte in lm90_detect_max1617()
1892 0xffff) in lm90_detect_max1617()
1895 (config1 | 0xff00)) in lm90_detect_max1617()
1898 (lhi | 0xff00)) in lm90_detect_max1617()
1912 if (config2 < 0) in lm90_detect_national()
1915 if ((config1 & 0x2a) || (config2 & 0xf8) || convrate > 0x09) in lm90_detect_national()
1918 if (address != 0x4c && address != 0x4d) in lm90_detect_national()
1921 switch (chip_id & 0xf0) { in lm90_detect_national()
1922 case 0x10: /* LM86 */ in lm90_detect_national()
1923 if (address == 0x4c) in lm90_detect_national()
1926 case 0x20: /* LM90 */ in lm90_detect_national()
1927 if (address == 0x4c) in lm90_detect_national()
1930 case 0x30: /* LM89/LM99 */ in lm90_detect_national()
1947 case 0xca: /* NCT218 */ in lm90_detect_on()
1948 if ((address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_on()
1949 convrate <= 0x0a) in lm90_detect_on()
1968 if (status < 0 || config2 < 0 || man_id2 < 0 || chip_id2 < 0) in lm90_detect_analog()
1973 * register values are listed. Registers 0x3d .. 0x3e are undocumented in lm90_detect_analog()
1975 * Register 0xff is undocumented for some of the chips. Register 0x3f in lm90_detect_analog()
1978 * The code below checks values for registers 0x3d, 0x3e, and 0xff, in lm90_detect_analog()
1979 * but not for register 0x3f. in lm90_detect_analog()
2008 case 0x00 ... 0x03: /* ADM1021 */ in lm90_detect_analog()
2009 case 0x05 ... 0x0f: 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 0x04: /* ADT7421 (undocumented) */ in lm90_detect_analog()
2015 if (man_id2 == 0x41 && chip_id2 == 0x21 && in lm90_detect_analog()
2016 (address == 0x4c || address == 0x4d) && in lm90_detect_analog()
2017 (config1 & 0x0b) == 0x08 && convrate <= 0x0a) in lm90_detect_analog()
2020 case 0x30 ... 0x38: /* ADM1021A, ADM1023 */ in lm90_detect_analog()
2021 case 0x3a ... 0x3e: in lm90_detect_analog()
2025 * found to have a Chip ID of 0x3c. in lm90_detect_analog()
2027 * (0x12 .. 0x14), but a chip labeled ADM1021A does support it. in lm90_detect_analog()
2029 * register (0x11) was added to revision F of the ADM1021A in lm90_detect_analog()
2035 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
2036 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2039 case 0x39: /* ADM1020 (undocumented) */ in lm90_detect_analog()
2040 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2041 (address == 0x4c || address == 0x4d || address == 0x4e) && in lm90_detect_analog()
2042 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2045 case 0x3f: /* NCT210 */ in lm90_detect_analog()
2046 if (man_id2 == 0x00 && chip_id2 == 0x00 && common_address && in lm90_detect_analog()
2047 !(status & 0x03) && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect_analog()
2050 case 0x40 ... 0x4f: /* ADM1032 */ in lm90_detect_analog()
2051 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2052 (address == 0x4c || address == 0x4d) && !(config1 & 0x3f) && in lm90_detect_analog()
2053 convrate <= 0x0a) in lm90_detect_analog()
2056 case 0x51: /* ADT7461 */ in lm90_detect_analog()
2057 if (man_id2 == 0x00 && chip_id2 == 0x00 && in lm90_detect_analog()
2058 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2059 convrate <= 0x0a) in lm90_detect_analog()
2062 case 0x54: /* NCT1008 */ in lm90_detect_analog()
2063 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2064 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2065 convrate <= 0x0a) in lm90_detect_analog()
2068 case 0x55: /* NCT72 */ in lm90_detect_analog()
2069 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2070 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2071 convrate <= 0x0a) in lm90_detect_analog()
2074 case 0x57: /* ADT7461A, NCT1008 (datasheet rev. 3) */ in lm90_detect_analog()
2075 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2076 (address == 0x4c || address == 0x4d) && !(config1 & 0x1b) && in lm90_detect_analog()
2077 convrate <= 0x0a) in lm90_detect_analog()
2080 case 0x5a: /* NCT214 */ in lm90_detect_analog()
2081 if (man_id2 == 0x41 && chip_id2 == 0x61 && in lm90_detect_analog()
2082 common_address && !(config1 & 0x1b) && convrate <= 0x0a) in lm90_detect_analog()
2085 case 0x62: /* ADT7481, undocumented */ in lm90_detect_analog()
2086 if (man_id2 == 0x41 && chip_id2 == 0x81 && in lm90_detect_analog()
2087 (address == 0x4b || address == 0x4c) && !(config1 & 0x10) && in lm90_detect_analog()
2088 !(config2 & 0x7f) && (convrate & 0x0f) <= 0x0b) { in lm90_detect_analog()
2092 case 0x65: /* ADT7482, datasheet */ in lm90_detect_analog()
2093 case 0x75: /* ADT7482, real chip */ in lm90_detect_analog()
2094 if (man_id2 == 0x41 && chip_id2 == 0x82 && in lm90_detect_analog()
2095 address == 0x4c && !(config1 & 0x10) && !(config2 & 0x7f) && in lm90_detect_analog()
2096 convrate <= 0x0a) in lm90_detect_analog()
2099 case 0x94: /* ADT7483 */ in lm90_detect_analog()
2100 if (man_id2 == 0x41 && chip_id2 == 0x83 && in lm90_detect_analog()
2102 ((address >= 0x18 && address <= 0x1a) || in lm90_detect_analog()
2103 (address >= 0x29 && address <= 0x2b) || in lm90_detect_analog()
2104 (address >= 0x4c && address <= 0x4e)) && in lm90_detect_analog()
2105 !(config1 & 0x10) && !(config2 & 0x7f) && convrate <= 0x0a) in lm90_detect_analog()
2123 case 0x01: in lm90_detect_maxim()
2141 if (emerg < 0 || man_id < 0 || emerg2 < 0 || status2 < 0) in lm90_detect_maxim()
2146 * register, reading it returns 0x01. Bit 4 of the config1 in lm90_detect_maxim()
2147 * register is unused and should return zero when read. Bit 0 of in lm90_detect_maxim()
2155 if (!(config1 & 0x10) && !(status2 & 0x01) && emerg == emerg2 && in lm90_detect_maxim()
2156 convrate <= 0x07) in lm90_detect_maxim()
2163 * address 0x12 (LM90_REG_REMOTE_OFFSL) exists for this chip and in lm90_detect_maxim()
2167 else if (!(config1 & 0x03) && convrate <= 0x07 && in lm90_detect_maxim()
2172 * address 0x10 or higher) except for manufacturer and in lm90_detect_maxim()
2175 * of 0x01. in lm90_detect_maxim()
2178 * 0x4d and device ID 0x01. It is unknown if other variants of in lm90_detect_maxim()
2182 else if (!(config1 & 0x03f) && convrate <= 0x07 && in lm90_detect_maxim()
2183 emerg == 0x01 && emerg2 == 0x01 && status2 == 0x01) in lm90_detect_maxim()
2186 case 0x08: in lm90_detect_maxim()
2192 if (common_address && !(config1 & 0x07) && convrate <= 0x07) in lm90_detect_maxim()
2195 case 0x09: in lm90_detect_maxim()
2202 * MAX6690 datasheet lists a chip ID of 0x08, and a chip labeled in lm90_detect_maxim()
2203 * MAX6654 was observed to have a chip ID of 0x09. in lm90_detect_maxim()
2205 if (common_address && !(config1 & 0x07) && convrate <= 0x07) in lm90_detect_maxim()
2208 case 0x4d: in lm90_detect_maxim()
2213 * register, or 0x4d. in lm90_detect_maxim()
2225 * address is 0x4c. in lm90_detect_maxim()
2227 if (address >= 0x48 && address <= 0x4f && config1 == convrate && in lm90_detect_maxim()
2228 !(config1 & 0x0f)) { in lm90_detect_maxim()
2238 if (i2c_smbus_read_byte_data(client, LM90_REG_MAN_ID) != 0x4d) in lm90_detect_maxim()
2242 if (i2c_smbus_read_byte_data(client, LM90_REG_CONVRATE) != 0x4d || in lm90_detect_maxim()
2243 i2c_smbus_read_byte_data(client, LM90_REG_LOCAL_LOW) != 0x4d || in lm90_detect_maxim()
2244 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_LOWH) != 0x4d) in lm90_detect_maxim()
2249 if (regval < 0 || (regval & 0x2b)) in lm90_detect_maxim()
2259 } else if ((address == 0x4c || address == 0x4d || address == 0x4e) && in lm90_detect_maxim()
2260 (config1 & 0x1f) == 0x0d && convrate <= 0x09) { in lm90_detect_maxim()
2261 if (address == 0x4c) in lm90_detect_maxim()
2267 case 0x59: in lm90_detect_maxim()
2272 * The I2C address of MAX6648/6692 is fixed at 0x4c. in lm90_detect_maxim()
2273 * MAX6646 is at address 0x4d, MAX6647 is at address 0x4e, in lm90_detect_maxim()
2274 * and MAX6649 is at address 0x4c. A slight difference between in lm90_detect_maxim()
2282 if (!(config1 & 0x3f) && convrate <= 0x07) { in lm90_detect_maxim()
2286 case 0x4c: in lm90_detect_maxim()
2289 * value of 0xff if DXP is open or shorted. in lm90_detect_maxim()
2290 * MAX6648 reports 0x80 in that case. in lm90_detect_maxim()
2294 if (temp == 0x80) in lm90_detect_maxim()
2299 case 0x4d: in lm90_detect_maxim()
2302 case 0x4e: in lm90_detect_maxim()
2324 if (config2 < 0) in lm90_detect_nuvoton()
2327 if (address == 0x4c && !(config1 & 0x2a) && !(config2 & 0xf8)) { in lm90_detect_nuvoton()
2328 if (chip_id == 0x01 && convrate <= 0x09) { in lm90_detect_nuvoton()
2331 } else if ((chip_id & 0xfe) == 0x10 && convrate <= 0x08) { in lm90_detect_nuvoton()
2347 case 0x00: in lm90_detect_nxp()
2349 if (config2 < 0) in lm90_detect_nxp()
2351 if (address >= 0x48 && address <= 0x4f && in lm90_detect_nxp()
2352 !(config1 & 0x2a) && !(config2 & 0xfe) && convrate <= 0x09) in lm90_detect_nxp()
2355 case 0x80: in lm90_detect_nxp()
2356 if (common_address && !(config1 & 0x3f) && convrate <= 0x07) in lm90_detect_nxp()
2372 * 0x4c and have a chip ID of 0x01. G781-1 is supposed to be at I2C in lm90_detect_gmt()
2373 * address 0x4d and have a chip ID of 0x03. However, when support in lm90_detect_gmt()
2374 * for G781 was added, chips at 0x4c and 0x4d were found to have a in lm90_detect_gmt()
2375 * chip ID of 0x01. A G781-1 at I2C address 0x4d was now found with in lm90_detect_gmt()
2376 * chip ID 0x03. in lm90_detect_gmt()
2377 * To avoid detection failures, accept chip ID 0x01 and 0x03 at both in lm90_detect_gmt()
2379 * G784 reports manufacturer ID 0x47 and chip ID 0x01. A public in lm90_detect_gmt()
2383 * ID 0x47 and chip ID 0x01 even though that chip does not officially in lm90_detect_gmt()
2389 if ((chip_id == 0x01 || chip_id == 0x03) && in lm90_detect_gmt()
2390 (address == 0x4c || address == 0x4d) && in lm90_detect_gmt()
2391 !(config1 & 0x3f) && convrate <= 0x08) { in lm90_detect_gmt()
2395 if (reg < 0 || reg & 0x1f) in lm90_detect_gmt()
2398 if (reg < 0 || reg & 0xf1) in lm90_detect_gmt()
2410 if (common_address && chip_id == 0x00 && !(config1 & 0x3f) && !(convrate & 0xf8)) { in lm90_detect_ti49()
2411 /* THMC10: Unsupported registers return 0xff */ in lm90_detect_ti49()
2412 if (i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_TEMPL) == 0xff && in lm90_detect_ti49()
2413 i2c_smbus_read_byte_data(client, LM90_REG_REMOTE_CRIT) == 0xff) in lm90_detect_ti49()
2425 if (chip_id == 0x00 && !(config1 & 0x1b) && convrate <= 0x09) { in lm90_detect_ti()
2435 if (!(local_ext & 0x0f) && (conalert & 0xf1) == 0x01 && in lm90_detect_ti()
2436 (chen & 0xfc) == 0x00 && (dfc & 0xfc) == 0x00) { in lm90_detect_ti()
2437 if (address == 0x4c && !(chen & 0x03)) in lm90_detect_ti()
2439 else if (address >= 0x48 && address <= 0x4f) in lm90_detect_ti()
2447 /* Return 0 if detection is successful, -ENODEV otherwise */
2455 (address >= 0x18 && address <= 0x1a) || in lm90_detect()
2456 (address >= 0x29 && address <= 0x2b) || in lm90_detect()
2457 (address >= 0x4c && address <= 0x4e); in lm90_detect()
2473 if (man_id < 0 || chip_id < 0 || config1 < 0 || convrate < 0 || lhigh < 0) in lm90_detect()
2489 if (convrate < 0 || man_id < 0 || chip_id < 0) in lm90_detect()
2496 if (common_address && !convrate && !(config1 & 0x7f)) in lm90_detect()
2499 case 0x01: /* National Semiconductor */ in lm90_detect()
2502 case 0x1a: /* ON */ in lm90_detect()
2505 case 0x23: /* Genesys Logic */ in lm90_detect()
2506 if (common_address && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect()
2509 case 0x41: /* Analog Devices */ in lm90_detect()
2513 case 0x47: /* GMT */ in lm90_detect()
2516 case 0x49: /* TI */ in lm90_detect()
2519 case 0x4d: /* Maxim Integrated */ in lm90_detect()
2523 case 0x54: /* ON MC1066, Microchip TC1068, TCM1617 (originally TelCom) */ in lm90_detect()
2524 if (common_address && !(config1 & 0x3f) && !(convrate & 0xf8)) in lm90_detect()
2527 case 0x55: /* TI */ in lm90_detect()
2530 case 0x5c: /* Winbond/Nuvoton */ in lm90_detect()
2533 case 0xa1: /* NXP Semiconductor/Philips */ in lm90_detect()
2536 case 0xff: /* MAX1617, G767, NE1617 */ in lm90_detect()
2537 if (common_address && chip_id == 0xff && convrate < 8) in lm90_detect()
2546 "Unsupported chip at 0x%02x (man_id=0x%02X, chip_id=0x%02X)\n", in lm90_detect()
2553 return 0; in lm90_detect()
2577 if (convrate < 0) in lm90_init_client()
2589 if (config < 0) in lm90_init_client()
2597 config |= 0x04; in lm90_init_client()
2598 if (!(config & 0x04)) in lm90_init_client()
2603 * Put MAX6680/MAX8881 into extended resolution (bit 0x10, in lm90_init_client()
2604 * 0.125 degree resolution) and range (0x08, extend range in lm90_init_client()
2610 config |= 0x18; in lm90_init_client()
2613 * Put MAX6654 into extended range (0x20, extend minimum range from in lm90_init_client()
2614 * 0 degrees to -64 degrees). Note that extended resolution is not in lm90_init_client()
2619 config |= 0x20; in lm90_init_client()
2622 * Select external channel 0 for devices with three sensors in lm90_init_client()
2625 config &= ~0x08; in lm90_init_client()
2632 config &= ~0x80; in lm90_init_client()
2634 config &= 0xBF; /* run */ in lm90_init_client()
2646 if (ret < 0) in lm90_is_tripped()
2698 if (id == 0) { in lm90_probe_channel_from_dt()
2711 return 0; in lm90_probe_channel_from_dt()
2733 return 0; in lm90_parse_dt_channel_info()
2793 data->info[0] = &data->chip_info; in lm90_probe()
2798 data->chip_config[0] = HWMON_C_REGISTER_TZ; in lm90_probe()
2800 data->chip_config[0] |= HWMON_C_ALARMS; in lm90_probe()
2802 data->chip_config[0] |= HWMON_C_UPDATE_INTERVAL; in lm90_probe()
2804 data->chip_config[0] |= HWMON_C_TEMP_SAMPLES; in lm90_probe()
2811 data->channel_config[0] = HWMON_T_INPUT | HWMON_T_MAX | in lm90_probe()
2817 data->channel_config[0] |= HWMON_T_MIN | HWMON_T_MIN_ALARM; in lm90_probe()
2822 data->channel_config[0] |= HWMON_T_CRIT | HWMON_T_CRIT_ALARM | HWMON_T_CRIT_HYST; in lm90_probe()
2830 data->channel_config[0] |= HWMON_T_EMERGENCY | in lm90_probe()
2837 data->channel_config[0] |= HWMON_T_EMERGENCY_ALARM; in lm90_probe()
2876 if (err < 0) { in lm90_probe()
2907 if (err < 0) { in lm90_probe()
2913 return 0; in lm90_probe()
2932 if (!(data->config & 0x80)) { in lm90_alert()
2934 lm90_update_confreg(data, data->config | 0x80); in lm90_alert()
2952 return 0; in lm90_suspend()
2963 return 0; in lm90_resume()