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,
522 if (err >= 0) in lm90_read_reg()
548 if (oldh < 0) in lm90_read16()
551 if (l < 0) in lm90_read16()
554 if (newh < 0) in lm90_read16()
558 if (l < 0) in lm90_read16()
576 return 0; in lm90_update_confreg()
582 * than channel 0 is selected. Also, calling code must make sure to re-select
583 * external channel 0 before releasing the lock. This is necessary because
589 int err = 0; in lm90_select_remote_channel()
592 u8 config = data->config & ~0x08; in lm90_select_remote_channel()
595 config |= 0x08; in lm90_select_remote_channel()
608 err = lm90_update_confreg(data, config | 0x40); in lm90_write_convrate()
609 if (err < 0) in lm90_write_convrate()
637 for (i = 0, update_interval = LM90_MAX_CONVRATE_MS << 6; in lm90_set_convrate()
654 if (val < 0) in lm90_update_limits()
659 if (val < 0) in lm90_update_limits()
664 if (val < 0) in lm90_update_limits()
669 if (val < 0) in lm90_update_limits()
675 if (val < 0) in lm90_update_limits()
681 if (val < 0) in lm90_update_limits()
687 if (val < 0) in lm90_update_limits()
695 if (val < 0) in lm90_update_limits()
702 if (val < 0) in lm90_update_limits()
707 if (val < 0) in lm90_update_limits()
714 if (val < 0) in lm90_update_limits()
718 if (val < 0) in lm90_update_limits()
723 if (val < 0) in lm90_update_limits()
728 if (val < 0) in lm90_update_limits()
733 if (val < 0) in lm90_update_limits()
737 lm90_select_remote_channel(data, 0); in lm90_update_limits()
740 return 0; in lm90_update_limits()
752 if (val < 0) in lm90_update_device()
764 if (val < 0) in lm90_update_device()
769 if (val < 0) in lm90_update_device()
776 if (val < 0) in lm90_update_device()
781 if (val < 0) in lm90_update_device()
787 if (val < 0) in lm90_update_device()
792 if (val < 0) in lm90_update_device()
798 if (val < 0) in lm90_update_device()
803 if (val < 0) { in lm90_update_device()
804 lm90_select_remote_channel(data, 0); in lm90_update_device()
809 lm90_select_remote_channel(data, 0); in lm90_update_device()
812 if (val < 0) in lm90_update_device()
821 if (!(data->config_orig & 0x80) && in lm90_update_device()
823 if (data->config & 0x80) { in lm90_update_device()
825 lm90_update_confreg(data, data->config & ~0x80); in lm90_update_device()
833 return 0; in lm90_update_device()
871 if (val < 0) in temp_to_s8()
878 if (val <= 0) in temp_to_u8()
879 return 0; in temp_to_u8()
888 return 0x8000; in temp_to_s16()
890 return 0x7FE0; in temp_to_s16()
891 if (val < 0) in temp_to_s16()
898 if (val <= 0) in hyst_to_reg()
899 return 0; in hyst_to_reg()
907 * attempts to write values that are outside the range 0 < temp < 127 are
911 * 64 (e.g., 0 -> -64 degC). The range is restricted to -64..191 degC.
923 return (val - 0x4000) / 64 * 250; in temp_from_u16_adt7461()
931 return 0; in temp_to_u8_adt7461()
933 return 0xFF; in temp_to_u8_adt7461()
936 if (val <= 0) in temp_to_u8_adt7461()
937 return 0; in temp_to_u8_adt7461()
947 return 0; in temp_to_u16_adt7461()
949 return 0xFFC0; in temp_to_u16_adt7461()
952 if (val <= 0) in temp_to_u16_adt7461()
953 return 0; in temp_to_u16_adt7461()
955 return 0x7FC0; in temp_to_u16_adt7461()
976 if (err < 0) in pec_store()
980 case 0: in pec_store()
1046 if (err < 0) in lm90_set_temp11()
1050 data->temp11[index] & 0xff); in lm90_set_temp11()
1052 lm90_select_remote_channel(data, 0); in lm90_set_temp11()
1103 lm90_select_remote_channel(data, 0); in lm90_set_temp8()
1167 static const u8 lm90_crit_alarm_bits[3] = { 0, 1, 9 };
1169 static const u8 lm90_fault_bits[3] = { 0, 2, 10 };
1202 if (channel == 0) in lm90_temp_read()
1210 if (channel == 0) in lm90_temp_read()
1235 return 0; in lm90_temp_read()
1251 if (channel == 0) in lm90_temp_write()
1261 if (channel == 0) in lm90_temp_write()
1310 if (channel == 0) in lm90_temp_is_visible()
1314 return 0; in lm90_temp_is_visible()
1340 return 0; in lm90_chip_read()
1358 clamp_val(val, 0, 100000)); in lm90_chip_write()
1378 return 0; in lm90_chip_is_visible()
1417 return 0; in lm90_is_visible()
1421 /* Return 0 if detection is successful, -ENODEV otherwise */
1438 if (man_id < 0 || chip_id < 0 || config1 < 0 || convrate < 0) in lm90_detect()
1441 if (man_id == 0x01 || man_id == 0x5C || man_id == 0x41) { in lm90_detect()
1443 if (config2 < 0) in lm90_detect()
1446 config2 = 0; /* Make compiler happy */ in lm90_detect()
1448 if ((address == 0x4C || address == 0x4D) in lm90_detect()
1449 && man_id == 0x01) { /* National Semiconductor */ in lm90_detect()
1450 if ((config1 & 0x2A) == 0x00 in lm90_detect()
1451 && (config2 & 0xF8) == 0x00 in lm90_detect()
1452 && convrate <= 0x09) { in lm90_detect()
1453 if (address == 0x4C in lm90_detect()
1454 && (chip_id & 0xF0) == 0x20) { /* LM90 */ in lm90_detect()
1457 if ((chip_id & 0xF0) == 0x30) { /* LM89/LM99 */ in lm90_detect()
1460 "Assuming LM99 chip at 0x%02x\n", in lm90_detect()
1467 if (address == 0x4C in lm90_detect()
1468 && (chip_id & 0xF0) == 0x10) { /* LM86 */ in lm90_detect()
1473 if ((address == 0x4C || address == 0x4D) in lm90_detect()
1474 && man_id == 0x41) { /* Analog Devices */ in lm90_detect()
1475 if ((chip_id & 0xF0) == 0x40 /* ADM1032 */ in lm90_detect()
1476 && (config1 & 0x3F) == 0x00 in lm90_detect()
1477 && convrate <= 0x0A) { in lm90_detect()
1487 if (chip_id == 0x51 /* ADT7461 */ in lm90_detect()
1488 && (config1 & 0x1B) == 0x00 in lm90_detect()
1489 && convrate <= 0x0A) { in lm90_detect()
1492 if (chip_id == 0x57 /* ADT7461A, NCT1008 */ in lm90_detect()
1493 && (config1 & 0x1B) == 0x00 in lm90_detect()
1494 && convrate <= 0x0A) { in lm90_detect()
1498 if (man_id == 0x4D) { /* Maxim */ in lm90_detect()
1515 if (emerg < 0 || man_id < 0 || emerg2 < 0 || status2 < 0) in lm90_detect()
1529 * address is 0x4C. in lm90_detect()
1532 && (address == 0x4C || address == 0x4D || address == 0x4E) in lm90_detect()
1533 && (config1 & 0x1F) == (man_id & 0x0F) in lm90_detect()
1534 && convrate <= 0x09) { in lm90_detect()
1535 if (address == 0x4C) in lm90_detect()
1542 * register, reading it returns 0x01. Bit 4 of the config1 in lm90_detect()
1543 * register is unused and should return zero when read. Bit 0 of in lm90_detect()
1551 if (chip_id == 0x01 in lm90_detect()
1552 && (config1 & 0x10) == 0x00 in lm90_detect()
1553 && (status2 & 0x01) == 0x00 in lm90_detect()
1555 && convrate <= 0x07) { in lm90_detect()
1564 if (chip_id == 0x01 in lm90_detect()
1565 && (config1 & 0x03) == 0x00 in lm90_detect()
1566 && convrate <= 0x07) { in lm90_detect()
1574 if (chip_id == 0x59 in lm90_detect()
1575 && (config1 & 0x3f) == 0x00 in lm90_detect()
1576 && convrate <= 0x07) { in lm90_detect()
1584 if (chip_id == 0x08 in lm90_detect()
1585 && (config1 & 0x07) == 0x00 in lm90_detect()
1586 && convrate <= 0x07) { in lm90_detect()
1590 if (address == 0x4C in lm90_detect()
1591 && man_id == 0x5C) { /* Winbond/Nuvoton */ in lm90_detect()
1592 if ((config1 & 0x2A) == 0x00 in lm90_detect()
1593 && (config2 & 0xF8) == 0x00) { in lm90_detect()
1594 if (chip_id == 0x01 /* W83L771W/G */ in lm90_detect()
1595 && convrate <= 0x09) { in lm90_detect()
1598 if ((chip_id & 0xFE) == 0x10 /* W83L771AWG/ASG */ in lm90_detect()
1599 && convrate <= 0x08) { in lm90_detect()
1604 if (address >= 0x48 && address <= 0x4F in lm90_detect()
1605 && man_id == 0xA1) { /* NXP Semiconductor/Philips */ in lm90_detect()
1606 if (chip_id == 0x00 in lm90_detect()
1607 && (config1 & 0x2A) == 0x00 in lm90_detect()
1608 && (config2 & 0xFE) == 0x00 in lm90_detect()
1609 && convrate <= 0x09) { in lm90_detect()
1613 if ((address == 0x4C || address == 0x4D) in lm90_detect()
1614 && man_id == 0x47) { /* GMT */ in lm90_detect()
1615 if (chip_id == 0x01 /* G781 */ in lm90_detect()
1616 && (config1 & 0x3F) == 0x00 in lm90_detect()
1617 && convrate <= 0x08) in lm90_detect()
1620 if (address == 0x4C in lm90_detect()
1621 && man_id == 0x55) { /* Texas Instruments */ in lm90_detect()
1627 if (chip_id == 0x00 /* TMP451 */ in lm90_detect()
1628 && (config1 & 0x1B) == 0x00 in lm90_detect()
1629 && convrate <= 0x09 in lm90_detect()
1630 && (local_ext & 0x0F) == 0x00) in lm90_detect()
1636 "Unsupported chip at 0x%02x (man_id=0x%02X, " in lm90_detect()
1637 "chip_id=0x%02X)\n", address, man_id, chip_id); in lm90_detect()
1643 return 0; in lm90_detect()
1662 if (convrate < 0) in lm90_init_client()
1670 if (config < 0) in lm90_init_client()
1679 if (config & 0x04) in lm90_init_client()
1684 * Put MAX6680/MAX8881 into extended resolution (bit 0x10, in lm90_init_client()
1685 * 0.125 degree resolution) and range (0x08, extend range in lm90_init_client()
1689 config |= 0x18; in lm90_init_client()
1692 * Put MAX6654 into extended range (0x20, extend minimum range from in lm90_init_client()
1693 * 0 degrees to -64 degrees). Note that extended resolution is not in lm90_init_client()
1698 config |= 0x20; in lm90_init_client()
1701 * Select external channel 0 for max6695/96 in lm90_init_client()
1704 config &= ~0x08; in lm90_init_client()
1706 config &= 0xBF; /* run */ in lm90_init_client()
1715 int st, st2 = 0; in lm90_is_tripped()
1718 if (st < 0) in lm90_is_tripped()
1723 if (st2 < 0) in lm90_is_tripped()
1729 if ((st & 0x7f) == 0 && (st2 & 0xfe) == 0) in lm90_is_tripped()
1797 if (err < 0) { in lm90_probe()
1836 data->info[0] = HWMON_CHANNEL_INFO(chip, in lm90_probe()
1844 data->channel_config[0] = HWMON_T_INPUT | HWMON_T_MIN | HWMON_T_MAX | in lm90_probe()
1855 data->channel_config[0] |= HWMON_T_EMERGENCY | in lm90_probe()
1862 data->channel_config[0] |= HWMON_T_EMERGENCY_ALARM; in lm90_probe()
1883 if (err < 0) { in lm90_probe()
1913 if (err < 0) { in lm90_probe()
1919 return 0; in lm90_probe()
1941 lm90_update_confreg(data, data->config | 0x80); in lm90_alert()