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.
49 * from 0 to 145 degrees.
100 * MAX6657, MAX6658, NCT1008 and W83L771 have address 0x4c.
102 * have address 0x4d.
103 * MAX6647 has address 0x4e.
104 * MAX6659 can have address 0x4c, 0x4d or 0x4e.
105 * MAX6654, MAX6680, and MAX6681 can have address 0x18, 0x19, 0x1a, 0x29,
106 * 0x2a, 0x2b, 0x4c, 0x4d or 0x4e.
107 * SA56004 can have address 0x48 through 0x4F.
111 0x18, 0x19, 0x1a, 0x29, 0x2a, 0x2b, 0x48, 0x49, 0x4a, 0x4b, 0x4c,
112 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
121 #define LM90_REG_R_MAN_ID 0xFE
122 #define LM90_REG_R_CHIP_ID 0xFF
123 #define LM90_REG_R_CONFIG1 0x03
124 #define LM90_REG_W_CONFIG1 0x09
125 #define LM90_REG_R_CONFIG2 0xBF
126 #define LM90_REG_W_CONFIG2 0xBF
127 #define LM90_REG_R_CONVRATE 0x04
128 #define LM90_REG_W_CONVRATE 0x0A
129 #define LM90_REG_R_STATUS 0x02
130 #define LM90_REG_R_LOCAL_TEMP 0x00
131 #define LM90_REG_R_LOCAL_HIGH 0x05
132 #define LM90_REG_W_LOCAL_HIGH 0x0B
133 #define LM90_REG_R_LOCAL_LOW 0x06
134 #define LM90_REG_W_LOCAL_LOW 0x0C
135 #define LM90_REG_R_LOCAL_CRIT 0x20
136 #define LM90_REG_W_LOCAL_CRIT 0x20
137 #define LM90_REG_R_REMOTE_TEMPH 0x01
138 #define LM90_REG_R_REMOTE_TEMPL 0x10
139 #define LM90_REG_R_REMOTE_OFFSH 0x11
140 #define LM90_REG_W_REMOTE_OFFSH 0x11
141 #define LM90_REG_R_REMOTE_OFFSL 0x12
142 #define LM90_REG_W_REMOTE_OFFSL 0x12
143 #define LM90_REG_R_REMOTE_HIGHH 0x07
144 #define LM90_REG_W_REMOTE_HIGHH 0x0D
145 #define LM90_REG_R_REMOTE_HIGHL 0x13
146 #define LM90_REG_W_REMOTE_HIGHL 0x13
147 #define LM90_REG_R_REMOTE_LOWH 0x08
148 #define LM90_REG_W_REMOTE_LOWH 0x0E
149 #define LM90_REG_R_REMOTE_LOWL 0x14
150 #define LM90_REG_W_REMOTE_LOWL 0x14
151 #define LM90_REG_R_REMOTE_CRIT 0x19
152 #define LM90_REG_W_REMOTE_CRIT 0x19
153 #define LM90_REG_R_TCRIT_HYST 0x21
154 #define LM90_REG_W_TCRIT_HYST 0x21
158 #define MAX6657_REG_R_LOCAL_TEMPL 0x11
159 #define MAX6696_REG_R_STATUS2 0x12
160 #define MAX6659_REG_R_REMOTE_EMERG 0x16
161 #define MAX6659_REG_W_REMOTE_EMERG 0x16
162 #define MAX6659_REG_R_LOCAL_EMERG 0x17
163 #define MAX6659_REG_W_LOCAL_EMERG 0x17
167 #define SA56004_REG_R_LOCAL_TEMPL 0x22
172 #define TMP451_REG_R_LOCAL_TEMPL 0x15
177 #define LM90_FLAG_ADT7461_EXT (1 << 0) /* ADT7461 extended mode */
188 #define LM90_STATUS_LTHRM (1 << 0) /* local THERM limit tripped */
348 .alert_alarms = 0x7c,
354 .alert_alarms = 0x7c,
360 .alert_alarms = 0x7c,
365 .alert_alarms = 0x7b,
370 .alert_alarms = 0x7b,
375 .alert_alarms = 0x7b,
379 .alert_alarms = 0x7c,
384 .alert_alarms = 0x7c,
390 .alert_alarms = 0x7c,
396 .alert_alarms = 0x7c,
402 .alert_alarms = 0x7c,
408 .alert_alarms = 0x1c7c,
414 .alert_alarms = 0x7c,
419 .alert_alarms = 0x7b,
426 .alert_alarms = 0x7c,
436 LOCAL_LOW = 0,
451 REMOTE_TEMP = 0,
523 if (err >= 0) in lm90_read_reg()
549 if (oldh < 0) in lm90_read16()
552 if (l < 0) in lm90_read16()
555 if (newh < 0) in lm90_read16()
559 if (l < 0) in lm90_read16()
577 return 0; in lm90_update_confreg()
583 * than channel 0 is selected. Also, calling code must make sure to re-select
584 * external channel 0 before releasing the lock. This is necessary because
590 int err = 0; in lm90_select_remote_channel()
593 u8 config = data->config & ~0x08; in lm90_select_remote_channel()
596 config |= 0x08; in lm90_select_remote_channel()
609 err = lm90_update_confreg(data, config | 0x40); in lm90_write_convrate()
610 if (err < 0) in lm90_write_convrate()
638 for (i = 0, update_interval = LM90_MAX_CONVRATE_MS << 6; in lm90_set_convrate()
655 if (val < 0) in lm90_update_limits()
660 if (val < 0) in lm90_update_limits()
665 if (val < 0) in lm90_update_limits()
670 if (val < 0) in lm90_update_limits()
676 if (val < 0) in lm90_update_limits()
682 if (val < 0) in lm90_update_limits()
688 if (val < 0) in lm90_update_limits()
696 if (val < 0) in lm90_update_limits()
703 if (val < 0) in lm90_update_limits()
708 if (val < 0) in lm90_update_limits()
715 if (val < 0) in lm90_update_limits()
719 if (val < 0) in lm90_update_limits()
724 if (val < 0) in lm90_update_limits()
729 if (val < 0) in lm90_update_limits()
734 if (val < 0) in lm90_update_limits()
738 lm90_select_remote_channel(data, 0); in lm90_update_limits()
741 return 0; in lm90_update_limits()
753 if (val < 0) in lm90_update_device()
765 if (val < 0) in lm90_update_device()
770 if (val < 0) in lm90_update_device()
777 if (val < 0) in lm90_update_device()
782 if (val < 0) in lm90_update_device()
788 if (val < 0) in lm90_update_device()
793 if (val < 0) in lm90_update_device()
799 if (val < 0) in lm90_update_device()
804 if (val < 0) { in lm90_update_device()
805 lm90_select_remote_channel(data, 0); in lm90_update_device()
810 lm90_select_remote_channel(data, 0); in lm90_update_device()
813 if (val < 0) in lm90_update_device()
822 if (!(data->config_orig & 0x80) && in lm90_update_device()
824 if (data->config & 0x80) { in lm90_update_device()
826 lm90_update_confreg(data, data->config & ~0x80); in lm90_update_device()
834 return 0; in lm90_update_device()
872 if (val < 0) in temp_to_s8()
879 if (val <= 0) in temp_to_u8()
880 return 0; in temp_to_u8()
889 return 0x8000; in temp_to_s16()
891 return 0x7FE0; in temp_to_s16()
892 if (val < 0) in temp_to_s16()
899 if (val <= 0) in hyst_to_reg()
900 return 0; in hyst_to_reg()
908 * attempts to write values that are outside the range 0 < temp < 127 are
912 * 64 (e.g., 0 -> -64 degC). The range is restricted to -64..191 degC.
924 return (val - 0x4000) / 64 * 250; in temp_from_u16_adt7461()
932 return 0; in temp_to_u8_adt7461()
934 return 0xFF; in temp_to_u8_adt7461()
937 if (val <= 0) in temp_to_u8_adt7461()
938 return 0; in temp_to_u8_adt7461()
948 return 0; in temp_to_u16_adt7461()
950 return 0xFFC0; in temp_to_u16_adt7461()
953 if (val <= 0) in temp_to_u16_adt7461()
954 return 0; in temp_to_u16_adt7461()
956 return 0x7FC0; in temp_to_u16_adt7461()
977 if (err < 0) in pec_store()
981 case 0: in pec_store()
1050 if (err < 0) in lm90_set_temp11()
1054 data->temp11[index] & 0xff); in lm90_set_temp11()
1056 lm90_select_remote_channel(data, 0); in lm90_set_temp11()
1110 lm90_select_remote_channel(data, 0); in lm90_set_temp8()
1177 static const u8 lm90_crit_alarm_bits[3] = { 0, 1, 9 };
1179 static const u8 lm90_fault_bits[3] = { 0, 2, 10 };
1212 if (channel == 0) in lm90_temp_read()
1220 if (channel == 0) in lm90_temp_read()
1245 return 0; in lm90_temp_read()
1261 if (channel == 0) in lm90_temp_write()
1271 if (channel == 0) in lm90_temp_write()
1320 if (channel == 0) in lm90_temp_is_visible()
1324 return 0; in lm90_temp_is_visible()
1350 return 0; in lm90_chip_read()
1368 clamp_val(val, 0, 100000)); in lm90_chip_write()
1388 return 0; in lm90_chip_is_visible()
1427 return 0; in lm90_is_visible()
1431 /* Return 0 if detection is successful, -ENODEV otherwise */
1448 if (man_id < 0 || chip_id < 0 || config1 < 0 || convrate < 0) in lm90_detect()
1451 if (man_id == 0x01 || man_id == 0x5C || man_id == 0x41) { in lm90_detect()
1453 if (config2 < 0) in lm90_detect()
1456 config2 = 0; /* Make compiler happy */ in lm90_detect()
1458 if ((address == 0x4C || address == 0x4D) in lm90_detect()
1459 && man_id == 0x01) { /* National Semiconductor */ in lm90_detect()
1460 if ((config1 & 0x2A) == 0x00 in lm90_detect()
1461 && (config2 & 0xF8) == 0x00 in lm90_detect()
1462 && convrate <= 0x09) { in lm90_detect()
1463 if (address == 0x4C in lm90_detect()
1464 && (chip_id & 0xF0) == 0x20) { /* LM90 */ in lm90_detect()
1467 if ((chip_id & 0xF0) == 0x30) { /* LM89/LM99 */ in lm90_detect()
1470 "Assuming LM99 chip at 0x%02x\n", in lm90_detect()
1477 if (address == 0x4C in lm90_detect()
1478 && (chip_id & 0xF0) == 0x10) { /* LM86 */ in lm90_detect()
1483 if ((address == 0x4C || address == 0x4D) in lm90_detect()
1484 && man_id == 0x41) { /* Analog Devices */ in lm90_detect()
1485 if ((chip_id & 0xF0) == 0x40 /* ADM1032 */ in lm90_detect()
1486 && (config1 & 0x3F) == 0x00 in lm90_detect()
1487 && convrate <= 0x0A) { in lm90_detect()
1497 if (chip_id == 0x51 /* ADT7461 */ in lm90_detect()
1498 && (config1 & 0x1B) == 0x00 in lm90_detect()
1499 && convrate <= 0x0A) { in lm90_detect()
1502 if (chip_id == 0x57 /* ADT7461A, NCT1008 */ in lm90_detect()
1503 && (config1 & 0x1B) == 0x00 in lm90_detect()
1504 && convrate <= 0x0A) { in lm90_detect()
1508 if (man_id == 0x4D) { /* Maxim */ in lm90_detect()
1525 if (emerg < 0 || man_id < 0 || emerg2 < 0 || status2 < 0) in lm90_detect()
1539 * address is 0x4C. in lm90_detect()
1542 && (address == 0x4C || address == 0x4D || address == 0x4E) in lm90_detect()
1543 && (config1 & 0x1F) == (man_id & 0x0F) in lm90_detect()
1544 && convrate <= 0x09) { in lm90_detect()
1545 if (address == 0x4C) in lm90_detect()
1552 * register, reading it returns 0x01. Bit 4 of the config1 in lm90_detect()
1553 * register is unused and should return zero when read. Bit 0 of in lm90_detect()
1561 if (chip_id == 0x01 in lm90_detect()
1562 && (config1 & 0x10) == 0x00 in lm90_detect()
1563 && (status2 & 0x01) == 0x00 in lm90_detect()
1565 && convrate <= 0x07) { in lm90_detect()
1574 if (chip_id == 0x01 in lm90_detect()
1575 && (config1 & 0x03) == 0x00 in lm90_detect()
1576 && convrate <= 0x07) { in lm90_detect()
1584 if (chip_id == 0x59 in lm90_detect()
1585 && (config1 & 0x3f) == 0x00 in lm90_detect()
1586 && convrate <= 0x07) { in lm90_detect()
1594 if (chip_id == 0x08 in lm90_detect()
1595 && (config1 & 0x07) == 0x00 in lm90_detect()
1596 && convrate <= 0x07) { in lm90_detect()
1600 if (address == 0x4C in lm90_detect()
1601 && man_id == 0x5C) { /* Winbond/Nuvoton */ in lm90_detect()
1602 if ((config1 & 0x2A) == 0x00 in lm90_detect()
1603 && (config2 & 0xF8) == 0x00) { in lm90_detect()
1604 if (chip_id == 0x01 /* W83L771W/G */ in lm90_detect()
1605 && convrate <= 0x09) { in lm90_detect()
1608 if ((chip_id & 0xFE) == 0x10 /* W83L771AWG/ASG */ in lm90_detect()
1609 && convrate <= 0x08) { in lm90_detect()
1614 if (address >= 0x48 && address <= 0x4F in lm90_detect()
1615 && man_id == 0xA1) { /* NXP Semiconductor/Philips */ in lm90_detect()
1616 if (chip_id == 0x00 in lm90_detect()
1617 && (config1 & 0x2A) == 0x00 in lm90_detect()
1618 && (config2 & 0xFE) == 0x00 in lm90_detect()
1619 && convrate <= 0x09) { in lm90_detect()
1623 if ((address == 0x4C || address == 0x4D) in lm90_detect()
1624 && man_id == 0x47) { /* GMT */ in lm90_detect()
1625 if (chip_id == 0x01 /* G781 */ in lm90_detect()
1626 && (config1 & 0x3F) == 0x00 in lm90_detect()
1627 && convrate <= 0x08) in lm90_detect()
1630 if (address == 0x4C in lm90_detect()
1631 && man_id == 0x55) { /* Texas Instruments */ in lm90_detect()
1637 if (chip_id == 0x00 /* TMP451 */ in lm90_detect()
1638 && (config1 & 0x1B) == 0x00 in lm90_detect()
1639 && convrate <= 0x09 in lm90_detect()
1640 && (local_ext & 0x0F) == 0x00) in lm90_detect()
1646 "Unsupported chip at 0x%02x (man_id=0x%02X, " in lm90_detect()
1647 "chip_id=0x%02X)\n", address, man_id, chip_id); in lm90_detect()
1653 return 0; in lm90_detect()
1672 if (convrate < 0) in lm90_init_client()
1680 if (config < 0) in lm90_init_client()
1689 if (config & 0x04) in lm90_init_client()
1694 * Put MAX6680/MAX8881 into extended resolution (bit 0x10, in lm90_init_client()
1695 * 0.125 degree resolution) and range (0x08, extend range in lm90_init_client()
1699 config |= 0x18; in lm90_init_client()
1702 * Put MAX6654 into extended range (0x20, extend minimum range from in lm90_init_client()
1703 * 0 degrees to -64 degrees). Note that extended resolution is not in lm90_init_client()
1708 config |= 0x20; in lm90_init_client()
1711 * Select external channel 0 for max6695/96 in lm90_init_client()
1714 config &= ~0x08; in lm90_init_client()
1721 config &= ~0x80; in lm90_init_client()
1723 config &= 0xBF; /* run */ in lm90_init_client()
1732 int st, st2 = 0; in lm90_is_tripped()
1735 if (st < 0) in lm90_is_tripped()
1740 if (st2 < 0) in lm90_is_tripped()
1746 if ((st & 0x7f) == 0 && (st2 & 0xfe) == 0) in lm90_is_tripped()
1770 hwmon_temp_min, 0); in lm90_is_tripped()
1779 hwmon_temp_max, 0); in lm90_is_tripped()
1833 if (err < 0) { in lm90_probe()
1872 data->info[0] = HWMON_CHANNEL_INFO(chip, in lm90_probe()
1880 data->channel_config[0] = HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX | in lm90_probe()
1891 data->channel_config[0] |= HWMON_T_EMERGENCY | in lm90_probe()
1898 data->channel_config[0] |= HWMON_T_EMERGENCY_ALARM; in lm90_probe()
1919 if (err < 0) { in lm90_probe()
1950 if (err < 0) { in lm90_probe()
1956 return 0; in lm90_probe()
1978 lm90_update_confreg(data, data->config | 0x80); in lm90_alert()
1993 return 0; in lm90_suspend()
2004 return 0; in lm90_resume()