Lines Matching +full:sens +full:-
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * w83627hf.c - Part of lm_sensors, Linux kernel modules for hardware
5 * Copyright (c) 1998 - 2003 Frodo Looijaard <frodol@dds.nl>,
9 * Copyright (c) 2007 - 1012 Jean Delvare <jdelvare@suse.de>
37 #include <linux/hwmon-sysfs.h>
38 #include <linux/hwmon-vid.h>
102 outb(reg, sio->sioaddr); in superio_outb()
103 outb(val, sio->sioaddr + 1); in superio_outb()
109 outb(reg, sio->sioaddr); in superio_inb()
110 return inb(sio->sioaddr + 1); in superio_inb()
116 outb(DEV, sio->sioaddr); in superio_select()
117 outb(ld, sio->sioaddr + 1); in superio_select()
123 if (!request_muxed_region(sio->sioaddr, 2, DRVNAME)) in superio_enter()
124 return -EBUSY; in superio_enter()
126 outb(0x87, sio->sioaddr); in superio_enter()
127 outb(0x87, sio->sioaddr); in superio_enter()
135 outb(0xAA, sio->sioaddr); in superio_exit()
136 release_region(sio->sioaddr, 2); in superio_exit()
162 (0x554 + (((nr) - 7) * 2)))
164 (0x555 + (((nr) - 7) * 2)))
166 (0x550 + (nr) - 7))
168 /* nr:0-2 for fans:1-3 */
174 /* these are zero-based, unlike config constants above */
261 #define TEMP_MIN (-128000)
265 * TEMP: 0.001C/bit (-128C to +127C)
271 ntemp += (ntemp < 0 ? -500 : 500); in TEMP_TO_REG()
280 #define FAN_FROM_REG(val,div) ((val)==0?-1:(val)==255?0:1350000/((val)*(div)))
307 /* Clock bit 8 -> 180 kHz or 24 MHz */ in pwm_freq_from_reg()
379 u16 sens[3]; /* 1 = pentium diode; 2 = 3904 diode; member
406 mutex_lock(&data->update_lock); in w83627hf_suspend()
407 data->scfg1 = w83627hf_read_value(data, W83781D_REG_SCFG1); in w83627hf_suspend()
408 data->scfg2 = w83627hf_read_value(data, W83781D_REG_SCFG2); in w83627hf_suspend()
409 mutex_unlock(&data->update_lock); in w83627hf_suspend()
417 int i, num_temps = (data->type == w83697hf) ? 2 : 3; in w83627hf_resume()
420 mutex_lock(&data->update_lock); in w83627hf_resume()
423 if (((data->type == w83697hf) && (i == 1)) || in w83627hf_resume()
424 ((data->type != w83627hf && data->type != w83697hf) in w83627hf_resume()
428 data->in_max[i]); in w83627hf_resume()
430 data->in_min[i]); in w83627hf_resume()
434 data->fan_min[i]); in w83627hf_resume()
437 data->temp_max[i]); in w83627hf_resume()
439 data->temp_max_hyst[i]); in w83627hf_resume()
443 if (data->type == w83627thf || data->type == w83637hf || in w83627hf_resume()
444 data->type == w83687thf) in w83627hf_resume()
446 data->vrm_ovt); in w83627hf_resume()
447 w83627hf_write_value(data, W83781D_REG_SCFG1, data->scfg1); in w83627hf_resume()
448 w83627hf_write_value(data, W83781D_REG_SCFG2, data->scfg2); in w83627hf_resume()
450 /* Force re-reading all values */ in w83627hf_resume()
451 data->valid = 0; in w83627hf_resume()
452 mutex_unlock(&data->update_lock); in w83627hf_resume()
479 int nr = to_sensor_dev_attr(devattr)->index; in in_input_show()
481 return sprintf(buf, "%ld\n", (long)IN_FROM_REG(data->in[nr])); in in_input_show()
486 int nr = to_sensor_dev_attr(devattr)->index; in in_min_show()
488 return sprintf(buf, "%ld\n", (long)IN_FROM_REG(data->in_min[nr])); in in_min_show()
493 int nr = to_sensor_dev_attr(devattr)->index; in in_max_show()
495 return sprintf(buf, "%ld\n", (long)IN_FROM_REG(data->in_max[nr])); in in_max_show()
501 int nr = to_sensor_dev_attr(devattr)->index; in in_min_store()
510 mutex_lock(&data->update_lock); in in_min_store()
511 data->in_min[nr] = IN_TO_REG(val); in in_min_store()
512 w83627hf_write_value(data, W83781D_REG_IN_MIN(nr), data->in_min[nr]); in in_min_store()
513 mutex_unlock(&data->update_lock); in in_min_store()
520 int nr = to_sensor_dev_attr(devattr)->index; in in_max_store()
529 mutex_lock(&data->update_lock); in in_max_store()
530 data->in_max[nr] = IN_TO_REG(val); in in_max_store()
531 w83627hf_write_value(data, W83781D_REG_IN_MAX(nr), data->in_max[nr]); in in_max_store()
532 mutex_unlock(&data->update_lock); in in_max_store()
566 if ((data->vrm_ovt & 0x01) && in show_in_0()
567 (w83627thf == data->type || w83637hf == data->type in show_in_0()
568 || w83687thf == data->type)) in show_in_0()
583 return show_in_0(data, buf, data->in[0]); in in0_input_show()
590 return show_in_0(data, buf, data->in_min[0]); in in0_min_show()
597 return show_in_0(data, buf, data->in_max[0]); in in0_max_show()
612 mutex_lock(&data->update_lock); in in0_min_store()
614 if ((data->vrm_ovt & 0x01) && in in0_min_store()
615 (w83627thf == data->type || w83637hf == data->type in in0_min_store()
616 || w83687thf == data->type)) in in0_min_store()
619 data->in_min[0] = in in0_min_store()
620 clamp_val(((val * 100) - 70000 + 244) / 488, 0, 255); in in0_min_store()
623 data->in_min[0] = IN_TO_REG(val); in in0_min_store()
625 w83627hf_write_value(data, W83781D_REG_IN_MIN(0), data->in_min[0]); in in0_min_store()
626 mutex_unlock(&data->update_lock); in in0_min_store()
642 mutex_lock(&data->update_lock); in in0_max_store()
644 if ((data->vrm_ovt & 0x01) && in in0_max_store()
645 (w83627thf == data->type || w83637hf == data->type in in0_max_store()
646 || w83687thf == data->type)) in in0_max_store()
649 data->in_max[0] = in in0_max_store()
650 clamp_val(((val * 100) - 70000 + 244) / 488, 0, 255); in in0_max_store()
653 data->in_max[0] = IN_TO_REG(val); in in0_max_store()
655 w83627hf_write_value(data, W83781D_REG_IN_MAX(0), data->in_max[0]); in in0_max_store()
656 mutex_unlock(&data->update_lock); in in0_max_store()
668 int nr = to_sensor_dev_attr(devattr)->index; in fan_input_show()
670 return sprintf(buf, "%ld\n", FAN_FROM_REG(data->fan[nr], in fan_input_show()
671 (long)DIV_FROM_REG(data->fan_div[nr]))); in fan_input_show()
676 int nr = to_sensor_dev_attr(devattr)->index; in fan_min_show()
678 return sprintf(buf, "%ld\n", FAN_FROM_REG(data->fan_min[nr], in fan_min_show()
679 (long)DIV_FROM_REG(data->fan_div[nr]))); in fan_min_show()
685 int nr = to_sensor_dev_attr(devattr)->index; in fan_min_store()
694 mutex_lock(&data->update_lock); in fan_min_store()
695 data->fan_min[nr] = FAN_TO_REG(val, DIV_FROM_REG(data->fan_div[nr])); in fan_min_store()
697 data->fan_min[nr]); in fan_min_store()
699 mutex_unlock(&data->update_lock); in fan_min_store()
713 int nr = to_sensor_dev_attr(devattr)->index; in temp_show()
716 u16 tmp = data->temp[nr]; in temp_show()
724 int nr = to_sensor_dev_attr(devattr)->index; in temp_max_show()
727 u16 tmp = data->temp_max[nr]; in temp_max_show()
736 int nr = to_sensor_dev_attr(devattr)->index; in temp_max_hyst_show()
739 u16 tmp = data->temp_max_hyst[nr]; in temp_max_hyst_show()
748 int nr = to_sensor_dev_attr(devattr)->index; in temp_max_store()
759 mutex_lock(&data->update_lock); in temp_max_store()
760 data->temp_max[nr] = tmp; in temp_max_store()
762 mutex_unlock(&data->update_lock); in temp_max_store()
770 int nr = to_sensor_dev_attr(devattr)->index; in temp_max_hyst_store()
781 mutex_lock(&data->update_lock); in temp_max_hyst_store()
782 data->temp_max_hyst[nr] = tmp; in temp_max_hyst_store()
784 mutex_unlock(&data->update_lock); in temp_max_hyst_store()
802 return sprintf(buf, "%ld\n", (long) vid_from_reg(data->vid, data->vrm)); in cpu0_vid_show()
810 return sprintf(buf, "%ld\n", (long) data->vrm); in vrm_show()
825 return -EINVAL; in vrm_store()
826 data->vrm = val; in vrm_store()
836 return sprintf(buf, "%ld\n", (long) data->alarms); in alarms_show()
844 int bitnr = to_sensor_dev_attr(attr)->index; in alarm_show()
845 return sprintf(buf, "%u\n", (data->alarms >> bitnr) & 1); in alarm_show()
868 (long)BEEP_MASK_FROM_REG(data->beep_mask)); in beep_mask_show()
883 mutex_lock(&data->update_lock); in beep_mask_store()
886 data->beep_mask = (data->beep_mask & 0x8000) in beep_mask_store()
889 data->beep_mask & 0xff); in beep_mask_store()
891 ((data->beep_mask) >> 16) & 0xff); in beep_mask_store()
893 (data->beep_mask >> 8) & 0xff); in beep_mask_store()
895 mutex_unlock(&data->update_lock); in beep_mask_store()
905 int bitnr = to_sensor_dev_attr(attr)->index; in beep_show()
906 return sprintf(buf, "%u\n", (data->beep_mask >> bitnr) & 1); in beep_show()
914 int bitnr = to_sensor_dev_attr(attr)->index; in beep_store()
924 return -EINVAL; in beep_store()
926 mutex_lock(&data->update_lock); in beep_store()
928 data->beep_mask |= (1 << bitnr); in beep_store()
930 data->beep_mask &= ~(1 << bitnr); in beep_store()
942 reg |= (1 << (bitnr - 8)); in beep_store()
944 reg &= ~(1 << (bitnr - 8)); in beep_store()
949 reg |= (1 << (bitnr - 16)); in beep_store()
951 reg &= ~(1 << (bitnr - 16)); in beep_store()
954 mutex_unlock(&data->update_lock); in beep_store()
979 int nr = to_sensor_dev_attr(devattr)->index; in fan_div_show()
982 (long) DIV_FROM_REG(data->fan_div[nr])); in fan_div_show()
994 int nr = to_sensor_dev_attr(devattr)->index; in fan_div_store()
1005 mutex_lock(&data->update_lock); in fan_div_store()
1008 min = FAN_FROM_REG(data->fan_min[nr], in fan_div_store()
1009 DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
1011 data->fan_div[nr] = DIV_TO_REG(val); in fan_div_store()
1015 | ((data->fan_div[nr] & 0x03) << (nr==0 ? 4 : 6)); in fan_div_store()
1020 | ((data->fan_div[nr] & 0x04) << (3 + nr)); in fan_div_store()
1024 data->fan_min[nr] = FAN_TO_REG(min, DIV_FROM_REG(data->fan_div[nr])); in fan_div_store()
1025 w83627hf_write_value(data, W83627HF_REG_FAN_MIN(nr), data->fan_min[nr]); in fan_div_store()
1027 mutex_unlock(&data->update_lock); in fan_div_store()
1038 int nr = to_sensor_dev_attr(devattr)->index; in pwm_show()
1040 return sprintf(buf, "%ld\n", (long) data->pwm[nr]); in pwm_show()
1047 int nr = to_sensor_dev_attr(devattr)->index; in pwm_store()
1056 mutex_lock(&data->update_lock); in pwm_store()
1058 if (data->type == w83627thf) { in pwm_store()
1059 /* bits 0-3 are reserved in 627THF */ in pwm_store()
1060 data->pwm[nr] = PWM_TO_REG(val) & 0xf0; in pwm_store()
1062 W836X7HF_REG_PWM(data->type, nr), in pwm_store()
1063 data->pwm[nr] | in pwm_store()
1065 W836X7HF_REG_PWM(data->type, nr)) & 0x0f)); in pwm_store()
1067 data->pwm[nr] = PWM_TO_REG(val); in pwm_store()
1069 W836X7HF_REG_PWM(data->type, nr), in pwm_store()
1070 data->pwm[nr]); in pwm_store()
1073 mutex_unlock(&data->update_lock); in pwm_store()
1085 int nr = to_sensor_dev_attr(devattr)->index; in pwm_enable_show()
1087 return sprintf(buf, "%d\n", data->pwm_enable[nr]); in pwm_enable_show()
1094 int nr = to_sensor_dev_attr(devattr)->index; in pwm_enable_store()
1105 return -EINVAL; in pwm_enable_store()
1106 mutex_lock(&data->update_lock); in pwm_enable_store()
1107 data->pwm_enable[nr] = val; in pwm_enable_store()
1110 reg |= (val - 1) << W83627THF_PWM_ENABLE_SHIFT[nr]; in pwm_enable_store()
1112 mutex_unlock(&data->update_lock); in pwm_enable_store()
1123 int nr = to_sensor_dev_attr(devattr)->index; in pwm_freq_show()
1125 if (data->type == w83627hf) in pwm_freq_show()
1127 pwm_freq_from_reg_627hf(data->pwm_freq[nr])); in pwm_freq_show()
1130 pwm_freq_from_reg(data->pwm_freq[nr])); in pwm_freq_show()
1137 int nr = to_sensor_dev_attr(devattr)->index; in pwm_freq_store()
1147 mutex_lock(&data->update_lock); in pwm_freq_store()
1149 if (data->type == w83627hf) { in pwm_freq_store()
1150 data->pwm_freq[nr] = pwm_freq_to_reg_627hf(val); in pwm_freq_store()
1152 (data->pwm_freq[nr] << (nr*4)) | in pwm_freq_store()
1156 data->pwm_freq[nr] = pwm_freq_to_reg(val); in pwm_freq_store()
1158 data->pwm_freq[nr]); in pwm_freq_store()
1161 mutex_unlock(&data->update_lock); in pwm_freq_store()
1173 int nr = to_sensor_dev_attr(devattr)->index; in temp_type_show()
1175 return sprintf(buf, "%ld\n", (long) data->sens[nr]); in temp_type_show()
1182 int nr = to_sensor_dev_attr(devattr)->index; in temp_type_store()
1192 mutex_lock(&data->update_lock); in temp_type_store()
1202 data->sens[nr] = val; in temp_type_store()
1211 data->sens[nr] = val; in temp_type_store()
1221 data->sens[nr] = val; in temp_type_store()
1230 mutex_unlock(&data->update_lock); in temp_type_store()
1243 return sprintf(buf, "%s\n", data->name); in name_show()
1261 sio_data->sioaddr = sioaddr; in w83627hf_find()
1266 err = -ENODEV; in w83627hf_find()
1270 sio_data->type = w83627hf; in w83627hf_find()
1273 sio_data->type = w83627thf; in w83627hf_find()
1276 sio_data->type = w83697hf; in w83627hf_find()
1279 sio_data->type = w83637hf; in w83627hf_find()
1282 sio_data->type = w83687thf; in w83627hf_find()
1308 names[sio_data->type], *addr); in w83627hf_find()
1395 struct device *dev = &pdev->dev; in w83627hf_probe()
1410 if (!devm_request_region(dev, res->start, WINB_REGION_SIZE, DRVNAME)) { in w83627hf_probe()
1411 dev_err(dev, "Failed to request region 0x%lx-0x%lx\n", in w83627hf_probe()
1412 (unsigned long)res->start, in w83627hf_probe()
1413 (unsigned long)(res->start + WINB_REGION_SIZE - 1)); in w83627hf_probe()
1414 return -EBUSY; in w83627hf_probe()
1419 return -ENOMEM; in w83627hf_probe()
1421 data->addr = res->start; in w83627hf_probe()
1422 data->type = sio_data->type; in w83627hf_probe()
1423 data->name = names[sio_data->type]; in w83627hf_probe()
1424 mutex_init(&data->lock); in w83627hf_probe()
1425 mutex_init(&data->update_lock); in w83627hf_probe()
1433 data->fan_min[i] = w83627hf_read_value( in w83627hf_probe()
1438 err = sysfs_create_group(&dev->kobj, &w83627hf_group); in w83627hf_probe()
1442 /* Register chip-specific device attributes */ in w83627hf_probe()
1443 if (data->type == w83627hf || data->type == w83697hf) in w83627hf_probe()
1470 if (data->type != w83697hf) in w83627hf_probe()
1505 if (data->type != w83697hf && data->vid != 0xff) { in w83627hf_probe()
1507 data->vrm = vid_which_vrm(); in w83627hf_probe()
1514 if (data->type == w83627thf || data->type == w83637hf in w83627hf_probe()
1515 || data->type == w83687thf) { in w83627hf_probe()
1521 if (data->type == w83637hf || data->type == w83687thf) in w83627hf_probe()
1530 if (data->type != w83627hf) in w83627hf_probe()
1537 if (data->type == w83627thf || data->type == w83637hf in w83627hf_probe()
1538 || data->type == w83687thf) { in w83627hf_probe()
1545 data->hwmon_dev = hwmon_device_register(dev); in w83627hf_probe()
1546 if (IS_ERR(data->hwmon_dev)) { in w83627hf_probe()
1547 err = PTR_ERR(data->hwmon_dev); in w83627hf_probe()
1554 sysfs_remove_group(&dev->kobj, &w83627hf_group); in w83627hf_probe()
1555 sysfs_remove_group(&dev->kobj, &w83627hf_group_opt); in w83627hf_probe()
1563 hwmon_device_unregister(data->hwmon_dev); in w83627hf_remove()
1565 sysfs_remove_group(&pdev->dev.kobj, &w83627hf_group); in w83627hf_remove()
1566 sysfs_remove_group(&pdev->dev.kobj, &w83627hf_group_opt); in w83627hf_remove()
1571 /* Registers 0x50-0x5f are banked */
1575 outb_p(W83781D_REG_BANK, data->addr + W83781D_ADDR_REG_OFFSET); in w83627hf_set_bank()
1576 outb_p(reg >> 8, data->addr + W83781D_DATA_REG_OFFSET); in w83627hf_set_bank()
1584 outb_p(W83781D_REG_BANK, data->addr + W83781D_ADDR_REG_OFFSET); in w83627hf_reset_bank()
1585 outb_p(0, data->addr + W83781D_DATA_REG_OFFSET); in w83627hf_reset_bank()
1593 mutex_lock(&data->lock); in w83627hf_read_value()
1600 outb_p(reg & 0xff, data->addr + W83781D_ADDR_REG_OFFSET); in w83627hf_read_value()
1601 res = inb_p(data->addr + W83781D_DATA_REG_OFFSET); in w83627hf_read_value()
1604 data->addr + W83781D_ADDR_REG_OFFSET); in w83627hf_read_value()
1606 (res << 8) + inb_p(data->addr + in w83627hf_read_value()
1610 mutex_unlock(&data->lock); in w83627hf_read_value()
1616 struct w83627hf_sio_data *sio_data = dev_get_platdata(&pdev->dev); in w83627thf_read_gpio5()
1625 dev_warn(&pdev->dev, in w83627thf_read_gpio5()
1636 dev_dbg(&pdev->dev, "GPIO5 disabled, no VID function\n"); in w83627thf_read_gpio5()
1646 dev_dbg(&pdev->dev, "GPIO5 not configured for VID " in w83627thf_read_gpio5()
1651 dev_info(&pdev->dev, "Reading VID from GPIO5\n"); in w83627thf_read_gpio5()
1661 struct w83627hf_sio_data *sio_data = dev_get_platdata(&pdev->dev); in w83687thf_read_vid()
1670 dev_warn(&pdev->dev, in w83687thf_read_vid()
1679 dev_dbg(&pdev->dev, "VID disabled, no VID function\n"); in w83687thf_read_vid()
1685 dev_dbg(&pdev->dev, "VID configured as output, " in w83687thf_read_vid()
1701 mutex_lock(&data->lock); in w83627hf_write_value()
1707 outb_p(reg & 0xff, data->addr + W83781D_ADDR_REG_OFFSET); in w83627hf_write_value()
1710 data->addr + W83781D_DATA_REG_OFFSET); in w83627hf_write_value()
1712 data->addr + W83781D_ADDR_REG_OFFSET); in w83627hf_write_value()
1715 data->addr + W83781D_DATA_REG_OFFSET); in w83627hf_write_value()
1717 mutex_unlock(&data->lock); in w83627hf_write_value()
1725 enum chips type = data->type; in w83627hf_init_device()
1728 /* Minimize conflicts with other winbond i2c-only clients... */ in w83627hf_init_device()
1740 data->vid = (lo & 0x0f) | ((hi & 0x01) << 4); in w83627hf_init_device()
1742 data->vid = w83627thf_read_gpio5(pdev); in w83627hf_init_device()
1744 data->vid = w83687thf_read_vid(pdev); in w83627hf_init_device()
1749 data->vrm_ovt = in w83627hf_init_device()
1755 if (!(tmp & BIT_SCFG1[i - 1])) { in w83627hf_init_device()
1756 data->sens[i - 1] = 4; in w83627hf_init_device()
1760 W83781D_REG_SCFG2) & BIT_SCFG2[i - 1]) in w83627hf_init_device()
1761 data->sens[i - 1] = 1; in w83627hf_init_device()
1763 data->sens[i - 1] = 2; in w83627hf_init_device()
1773 dev_warn(&pdev->dev, "Enabling temp2, readings " in w83627hf_init_device()
1784 dev_warn(&pdev->dev, "Enabling temp3, " in w83627hf_init_device()
1809 data->fan_div[0] = (reg >> 4) & 0x03; in w83627hf_update_fan_div()
1810 data->fan_div[1] = (reg >> 6) & 0x03; in w83627hf_update_fan_div()
1811 if (data->type != w83697hf) { in w83627hf_update_fan_div()
1812 data->fan_div[2] = (w83627hf_read_value(data, in w83627hf_update_fan_div()
1816 data->fan_div[0] |= (reg >> 3) & 0x04; in w83627hf_update_fan_div()
1817 data->fan_div[1] |= (reg >> 4) & 0x04; in w83627hf_update_fan_div()
1818 if (data->type != w83697hf) in w83627hf_update_fan_div()
1819 data->fan_div[2] |= (reg >> 5) & 0x04; in w83627hf_update_fan_div()
1825 int i, num_temps = (data->type == w83697hf) ? 2 : 3; in w83627hf_update_device()
1826 int num_pwms = (data->type == w83697hf) ? 2 : 3; in w83627hf_update_device()
1828 mutex_lock(&data->update_lock); in w83627hf_update_device()
1830 if (time_after(jiffies, data->last_updated + HZ + HZ / 2) in w83627hf_update_device()
1831 || !data->valid) { in w83627hf_update_device()
1834 if (((data->type == w83697hf) && (i == 1)) || in w83627hf_update_device()
1835 ((data->type != w83627hf && data->type != w83697hf) in w83627hf_update_device()
1838 data->in[i] = in w83627hf_update_device()
1840 data->in_min[i] = in w83627hf_update_device()
1843 data->in_max[i] = in w83627hf_update_device()
1848 data->fan[i] = in w83627hf_update_device()
1850 data->fan_min[i] = in w83627hf_update_device()
1856 W836X7HF_REG_PWM(data->type, i)); in w83627hf_update_device()
1857 /* bits 0-3 are reserved in 627THF */ in w83627hf_update_device()
1858 if (data->type == w83627thf) in w83627hf_update_device()
1860 data->pwm[i] = tmp; in w83627hf_update_device()
1862 (data->type == w83627hf || data->type == w83697hf)) in w83627hf_update_device()
1865 if (data->type == w83627hf) { in w83627hf_update_device()
1868 data->pwm_freq[0] = tmp & 0x07; in w83627hf_update_device()
1869 data->pwm_freq[1] = (tmp >> 4) & 0x07; in w83627hf_update_device()
1870 } else if (data->type != w83627thf) { in w83627hf_update_device()
1872 data->pwm_freq[i - 1] = in w83627hf_update_device()
1874 W83637HF_REG_PWM_FREQ[i - 1]); in w83627hf_update_device()
1875 if (i == 2 && (data->type == w83697hf)) in w83627hf_update_device()
1879 if (data->type != w83627hf) { in w83627hf_update_device()
1883 data->pwm_enable[i] = in w83627hf_update_device()
1889 data->temp[i] = w83627hf_read_value( in w83627hf_update_device()
1891 data->temp_max[i] = w83627hf_read_value( in w83627hf_update_device()
1893 data->temp_max_hyst[i] = w83627hf_read_value( in w83627hf_update_device()
1899 data->alarms = in w83627hf_update_device()
1904 data->beep_mask = (i << 8) | in w83627hf_update_device()
1907 data->last_updated = jiffies; in w83627hf_update_device()
1908 data->valid = 1; in w83627hf_update_device()
1911 mutex_unlock(&data->update_lock); in w83627hf_update_device()
1921 .end = address + WINB_REGION_OFFSET + WINB_REGION_SIZE - 1, in w83627hf_device_add()
1933 err = -ENOMEM; in w83627hf_device_add()
1973 return -ENODEV; in sensors_w83627hf_init()