Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
hwmon: (w83795) Check for BEEP pin availability
hwmon: (w83795) Clear intrusion alarm immediately
hwmon: (w83795) Read the intrusion state properly
hwmon: (w83795) Print the actual temperature channels as sources
hwmon: (w83795) List all usable temperature sources
hwmon: (w83795) Expose fan control method
hwmon: (w83795) Fix fan control mode attributes
hwmon: (lm95241) Check validity of input values
hwmon: Change mail address of Hans J. Koch

+192 -42
+1 -1
drivers/hwmon/amc6821.c
··· 4 4 Copyright (C) 2009 T. Mertelj <tomaz.mertelj@guest.arnes.si> 5 5 6 6 Based on max6650.c: 7 - Copyright (C) 2007 Hans J. Koch <hjk@linutronix.de> 7 + Copyright (C) 2007 Hans J. Koch <hjk@hansjkoch.de> 8 8 9 9 This program is free software; you can redistribute it and/or modify 10 10 it under the terms of the GNU General Public License as published by
+2 -2
drivers/hwmon/lm93.c
··· 20 20 Adapted to 2.6.20 by Carsten Emde <cbe@osadl.org> 21 21 Copyright (c) 2006 Carsten Emde, Open Source Automation Development Lab 22 22 23 - Modified for mainline integration by Hans J. Koch <hjk@linutronix.de> 23 + Modified for mainline integration by Hans J. Koch <hjk@hansjkoch.de> 24 24 Copyright (c) 2007 Hans J. Koch, Linutronix GmbH 25 25 26 26 This program is free software; you can redistribute it and/or modify ··· 2629 2629 } 2630 2630 2631 2631 MODULE_AUTHOR("Mark M. Hoffman <mhoffman@lightlink.com>, " 2632 - "Hans J. Koch <hjk@linutronix.de"); 2632 + "Hans J. Koch <hjk@hansjkoch.de>"); 2633 2633 MODULE_DESCRIPTION("LM93 driver"); 2634 2634 MODULE_LICENSE("GPL"); 2635 2635
+14 -5
drivers/hwmon/lm95241.c
··· 128 128 { 129 129 struct i2c_client *client = to_i2c_client(dev); 130 130 struct lm95241_data *data = i2c_get_clientdata(client); 131 + unsigned long val; 131 132 132 - strict_strtol(buf, 10, &data->interval); 133 - data->interval = data->interval * HZ / 1000; 133 + if (strict_strtoul(buf, 10, &val) < 0) 134 + return -EINVAL; 135 + 136 + data->interval = val * HZ / 1000; 134 137 135 138 return count; 136 139 } ··· 191 188 struct lm95241_data *data = i2c_get_clientdata(client); \ 192 189 \ 193 190 long val; \ 194 - strict_strtol(buf, 10, &val); \ 191 + \ 192 + if (strict_strtol(buf, 10, &val) < 0) \ 193 + return -EINVAL; \ 195 194 \ 196 195 if ((val == 1) || (val == 2)) { \ 197 196 \ ··· 232 227 struct lm95241_data *data = i2c_get_clientdata(client); \ 233 228 \ 234 229 long val; \ 235 - strict_strtol(buf, 10, &val); \ 230 + \ 231 + if (strict_strtol(buf, 10, &val) < 0) \ 232 + return -EINVAL;\ 236 233 \ 237 234 mutex_lock(&data->update_lock); \ 238 235 \ ··· 263 256 struct lm95241_data *data = i2c_get_clientdata(client); \ 264 257 \ 265 258 long val; \ 266 - strict_strtol(buf, 10, &val); \ 259 + \ 260 + if (strict_strtol(buf, 10, &val) < 0) \ 261 + return -EINVAL; \ 267 262 \ 268 263 mutex_lock(&data->update_lock); \ 269 264 \
+1 -1
drivers/hwmon/max6650.c
··· 2 2 * max6650.c - Part of lm_sensors, Linux kernel modules for hardware 3 3 * monitoring. 4 4 * 5 - * (C) 2007 by Hans J. Koch <hjk@linutronix.de> 5 + * (C) 2007 by Hans J. Koch <hjk@hansjkoch.de> 6 6 * 7 7 * based on code written by John Morris <john.morris@spirentcom.com> 8 8 * Copyright (c) 2003 Spirent Communications
+174 -33
drivers/hwmon/w83795.c
··· 165 165 166 166 #define W83795_REG_VID_CTRL 0x6A 167 167 168 + #define W83795_REG_ALARM_CTRL 0x40 169 + #define ALARM_CTRL_RTSACS (1 << 7) 168 170 #define W83795_REG_ALARM(index) (0x41 + (index)) 171 + #define W83795_REG_CLR_CHASSIS 0x4D 169 172 #define W83795_REG_BEEP(index) (0x50 + (index)) 170 173 171 - #define W83795_REG_CLR_CHASSIS 0x4D 174 + #define W83795_REG_OVT_CFG 0x58 175 + #define OVT_CFG_SEL (1 << 7) 172 176 173 177 174 178 #define W83795_REG_FCMS1 0x201 ··· 181 177 #define W83795_REG_FOMC 0x20F 182 178 183 179 #define W83795_REG_TSS(index) (0x209 + (index)) 180 + 181 + #define TSS_MAP_RESERVED 0xff 182 + static const u8 tss_map[4][6] = { 183 + { 0, 1, 2, 3, 4, 5}, 184 + { 6, 7, 8, 9, 0, 1}, 185 + {10, 11, 12, 13, 2, 3}, 186 + { 4, 5, 4, 5, TSS_MAP_RESERVED, TSS_MAP_RESERVED}, 187 + }; 184 188 185 189 #define PWM_OUTPUT 0 186 190 #define PWM_FREQ 1 ··· 381 369 u8 setup_pwm[3]; /* Register value */ 382 370 383 371 u8 alarms[6]; /* Register value */ 372 + u8 enable_beep; 384 373 u8 beeps[6]; /* Register value */ 385 374 386 375 char valid; ··· 512 499 } 513 500 514 501 /* Read beep settings */ 515 - for (i = 0; i < ARRAY_SIZE(data->beeps); i++) 516 - data->beeps[i] = w83795_read(client, W83795_REG_BEEP(i)); 502 + if (data->enable_beep) { 503 + for (i = 0; i < ARRAY_SIZE(data->beeps); i++) 504 + data->beeps[i] = 505 + w83795_read(client, W83795_REG_BEEP(i)); 506 + } 517 507 518 508 data->valid_limits = 1; 519 509 } ··· 593 577 struct i2c_client *client = to_i2c_client(dev); 594 578 struct w83795_data *data = i2c_get_clientdata(client); 595 579 u16 tmp; 580 + u8 intrusion; 596 581 int i; 597 582 598 583 mutex_lock(&data->update_lock); ··· 665 648 w83795_read(client, W83795_REG_PWM(i, PWM_OUTPUT)); 666 649 } 667 650 668 - /* update alarm */ 651 + /* Update intrusion and alarms 652 + * It is important to read intrusion first, because reading from 653 + * register SMI STS6 clears the interrupt status temporarily. */ 654 + tmp = w83795_read(client, W83795_REG_ALARM_CTRL); 655 + /* Switch to interrupt status for intrusion if needed */ 656 + if (tmp & ALARM_CTRL_RTSACS) 657 + w83795_write(client, W83795_REG_ALARM_CTRL, 658 + tmp & ~ALARM_CTRL_RTSACS); 659 + intrusion = w83795_read(client, W83795_REG_ALARM(5)) & (1 << 6); 660 + /* Switch to real-time alarms */ 661 + w83795_write(client, W83795_REG_ALARM_CTRL, tmp | ALARM_CTRL_RTSACS); 669 662 for (i = 0; i < ARRAY_SIZE(data->alarms); i++) 670 663 data->alarms[i] = w83795_read(client, W83795_REG_ALARM(i)); 664 + data->alarms[5] |= intrusion; 665 + /* Restore original configuration if needed */ 666 + if (!(tmp & ALARM_CTRL_RTSACS)) 667 + w83795_write(client, W83795_REG_ALARM_CTRL, 668 + tmp & ~ALARM_CTRL_RTSACS); 671 669 672 670 data->last_updated = jiffies; 673 671 data->valid = 1; ··· 762 730 val = w83795_read(client, W83795_REG_CLR_CHASSIS); 763 731 val |= 0x80; 764 732 w83795_write(client, W83795_REG_CLR_CHASSIS, val); 733 + 734 + /* Clear status and force cache refresh */ 735 + w83795_read(client, W83795_REG_ALARM(5)); 736 + data->valid = 0; 765 737 mutex_unlock(&data->update_lock); 766 738 return count; 767 739 } ··· 893 857 int index = sensor_attr->index; 894 858 u8 tmp; 895 859 896 - if (1 == (data->pwm_fcms[0] & (1 << index))) { 860 + /* Speed cruise mode */ 861 + if (data->pwm_fcms[0] & (1 << index)) { 897 862 tmp = 2; 898 863 goto out; 899 864 } 865 + /* Thermal cruise or SmartFan IV mode */ 900 866 for (tmp = 0; tmp < 6; tmp++) { 901 867 if (data->pwm_tfmr[tmp] & (1 << index)) { 902 868 tmp = 3; 903 869 goto out; 904 870 } 905 871 } 906 - if (data->pwm_fomc & (1 << index)) 907 - tmp = 0; 908 - else 909 - tmp = 1; 872 + /* Manual mode */ 873 + tmp = 1; 910 874 911 875 out: 912 876 return sprintf(buf, "%u\n", tmp); ··· 926 890 927 891 if (strict_strtoul(buf, 10, &val) < 0) 928 892 return -EINVAL; 929 - if (val > 2) 893 + if (val < 1 || val > 2) 930 894 return -EINVAL; 931 895 932 896 mutex_lock(&data->update_lock); 933 897 switch (val) { 934 - case 0: 935 898 case 1: 899 + /* Clear speed cruise mode bits */ 936 900 data->pwm_fcms[0] &= ~(1 << index); 937 901 w83795_write(client, W83795_REG_FCMS1, data->pwm_fcms[0]); 902 + /* Clear thermal cruise mode bits */ 938 903 for (i = 0; i < 6; i++) { 939 904 data->pwm_tfmr[i] &= ~(1 << index); 940 905 w83795_write(client, W83795_REG_TFMR(i), 941 906 data->pwm_tfmr[i]); 942 907 } 943 - data->pwm_fomc |= 1 << index; 944 - data->pwm_fomc ^= val << index; 945 - w83795_write(client, W83795_REG_FOMC, data->pwm_fomc); 946 908 break; 947 909 case 2: 948 910 data->pwm_fcms[0] |= (1 << index); ··· 952 918 } 953 919 954 920 static ssize_t 921 + show_pwm_mode(struct device *dev, struct device_attribute *attr, char *buf) 922 + { 923 + struct w83795_data *data = w83795_update_pwm_config(dev); 924 + int index = to_sensor_dev_attr_2(attr)->index; 925 + unsigned int mode; 926 + 927 + if (data->pwm_fomc & (1 << index)) 928 + mode = 0; /* DC */ 929 + else 930 + mode = 1; /* PWM */ 931 + 932 + return sprintf(buf, "%u\n", mode); 933 + } 934 + 935 + /* 936 + * Check whether a given temperature source can ever be useful. 937 + * Returns the number of selectable temperature channels which are 938 + * enabled. 939 + */ 940 + static int w83795_tss_useful(const struct w83795_data *data, int tsrc) 941 + { 942 + int useful = 0, i; 943 + 944 + for (i = 0; i < 4; i++) { 945 + if (tss_map[i][tsrc] == TSS_MAP_RESERVED) 946 + continue; 947 + if (tss_map[i][tsrc] < 6) /* Analog */ 948 + useful += (data->has_temp >> tss_map[i][tsrc]) & 1; 949 + else /* Digital */ 950 + useful += (data->has_dts >> (tss_map[i][tsrc] - 6)) & 1; 951 + } 952 + 953 + return useful; 954 + } 955 + 956 + static ssize_t 955 957 show_temp_src(struct device *dev, struct device_attribute *attr, char *buf) 956 958 { 957 959 struct sensor_device_attribute_2 *sensor_attr = 958 960 to_sensor_dev_attr_2(attr); 959 961 struct w83795_data *data = w83795_update_pwm_config(dev); 960 962 int index = sensor_attr->index; 961 - u8 val = index / 2; 962 - u8 tmp = data->temp_src[val]; 963 + u8 tmp = data->temp_src[index / 2]; 963 964 964 965 if (index & 1) 965 - val = 4; 966 + tmp >>= 4; /* Pick high nibble */ 966 967 else 967 - val = 0; 968 - tmp >>= val; 969 - tmp &= 0x0f; 968 + tmp &= 0x0f; /* Pick low nibble */ 970 969 971 - return sprintf(buf, "%u\n", tmp); 970 + /* Look-up the actual temperature channel number */ 971 + if (tmp >= 4 || tss_map[tmp][index] == TSS_MAP_RESERVED) 972 + return -EINVAL; /* Shouldn't happen */ 973 + 974 + return sprintf(buf, "%u\n", (unsigned int)tss_map[tmp][index] + 1); 972 975 } 973 976 974 977 static ssize_t ··· 1017 946 struct sensor_device_attribute_2 *sensor_attr = 1018 947 to_sensor_dev_attr_2(attr); 1019 948 int index = sensor_attr->index; 1020 - unsigned long tmp; 949 + int tmp; 950 + unsigned long channel; 1021 951 u8 val = index / 2; 1022 952 1023 - if (strict_strtoul(buf, 10, &tmp) < 0) 953 + if (strict_strtoul(buf, 10, &channel) < 0 || 954 + channel < 1 || channel > 14) 1024 955 return -EINVAL; 1025 - tmp = SENSORS_LIMIT(tmp, 0, 15); 956 + 957 + /* Check if request can be fulfilled */ 958 + for (tmp = 0; tmp < 4; tmp++) { 959 + if (tss_map[tmp][index] == channel - 1) 960 + break; 961 + } 962 + if (tmp == 4) /* No match */ 963 + return -EINVAL; 1026 964 1027 965 mutex_lock(&data->update_lock); 1028 966 if (index & 1) { ··· 1595 1515 1596 1516 #define NOT_USED -1 1597 1517 1598 - /* Don't change the attribute order, _max and _min are accessed by index 1518 + /* Don't change the attribute order, _max, _min and _beep are accessed by index 1599 1519 * somewhere else in the code */ 1600 1520 #define SENSOR_ATTR_IN(index) { \ 1601 1521 SENSOR_ATTR_2(in##index##_input, S_IRUGO, show_in, NULL, \ ··· 1610 1530 show_alarm_beep, store_beep, BEEP_ENABLE, \ 1611 1531 index + ((index > 14) ? 1 : 0)) } 1612 1532 1533 + /* Don't change the attribute order, _beep is accessed by index 1534 + * somewhere else in the code */ 1613 1535 #define SENSOR_ATTR_FAN(index) { \ 1614 1536 SENSOR_ATTR_2(fan##index##_input, S_IRUGO, show_fan, \ 1615 1537 NULL, FAN_INPUT, index - 1), \ ··· 1635 1553 show_pwm, store_pwm, PWM_FREQ, index - 1), \ 1636 1554 SENSOR_ATTR_2(pwm##index##_enable, S_IWUSR | S_IRUGO, \ 1637 1555 show_pwm_enable, store_pwm_enable, NOT_USED, index - 1), \ 1556 + SENSOR_ATTR_2(pwm##index##_mode, S_IRUGO, \ 1557 + show_pwm_mode, NULL, NOT_USED, index - 1), \ 1638 1558 SENSOR_ATTR_2(fan##index##_target, S_IWUSR | S_IRUGO, \ 1639 1559 show_fanin, store_fanin, FANIN_TARGET, index - 1) } 1640 1560 1561 + /* Don't change the attribute order, _beep is accessed by index 1562 + * somewhere else in the code */ 1641 1563 #define SENSOR_ATTR_DTS(index) { \ 1642 1564 SENSOR_ATTR_2(temp##index##_type, S_IRUGO , \ 1643 1565 show_dts_mode, NULL, NOT_USED, index - 7), \ ··· 1660 1574 SENSOR_ATTR_2(temp##index##_beep, S_IWUSR | S_IRUGO, \ 1661 1575 show_alarm_beep, store_beep, BEEP_ENABLE, index + 17) } 1662 1576 1577 + /* Don't change the attribute order, _beep is accessed by index 1578 + * somewhere else in the code */ 1663 1579 #define SENSOR_ATTR_TEMP(index) { \ 1664 1580 SENSOR_ATTR_2(temp##index##_type, S_IRUGO | (index < 4 ? S_IWUSR : 0), \ 1665 1581 show_temp_mode, store_temp_mode, NOT_USED, index - 1), \ ··· 1681 1593 SENSOR_ATTR_2(temp##index##_beep, S_IWUSR | S_IRUGO, \ 1682 1594 show_alarm_beep, store_beep, BEEP_ENABLE, \ 1683 1595 index + (index > 4 ? 11 : 17)), \ 1684 - SENSOR_ATTR_2(temp##index##_source_sel, S_IWUSR | S_IRUGO, \ 1685 - show_temp_src, store_temp_src, NOT_USED, index - 1), \ 1686 1596 SENSOR_ATTR_2(temp##index##_pwm_enable, S_IWUSR | S_IRUGO, \ 1687 1597 show_temp_pwm_enable, store_temp_pwm_enable, \ 1688 1598 TEMP_PWM_ENABLE, index - 1), \ ··· 1766 1680 SENSOR_ATTR_FAN(14), 1767 1681 }; 1768 1682 1769 - static const struct sensor_device_attribute_2 w83795_temp[][29] = { 1683 + static const struct sensor_device_attribute_2 w83795_temp[][28] = { 1770 1684 SENSOR_ATTR_TEMP(1), 1771 1685 SENSOR_ATTR_TEMP(2), 1772 1686 SENSOR_ATTR_TEMP(3), ··· 1786 1700 SENSOR_ATTR_DTS(14), 1787 1701 }; 1788 1702 1789 - static const struct sensor_device_attribute_2 w83795_pwm[][7] = { 1703 + static const struct sensor_device_attribute_2 w83795_pwm[][8] = { 1790 1704 SENSOR_ATTR_PWM(1), 1791 1705 SENSOR_ATTR_PWM(2), 1792 1706 SENSOR_ATTR_PWM(3), ··· 1797 1711 SENSOR_ATTR_PWM(8), 1798 1712 }; 1799 1713 1714 + static const struct sensor_device_attribute_2 w83795_tss[6] = { 1715 + SENSOR_ATTR_2(temp1_source_sel, S_IWUSR | S_IRUGO, 1716 + show_temp_src, store_temp_src, NOT_USED, 0), 1717 + SENSOR_ATTR_2(temp2_source_sel, S_IWUSR | S_IRUGO, 1718 + show_temp_src, store_temp_src, NOT_USED, 1), 1719 + SENSOR_ATTR_2(temp3_source_sel, S_IWUSR | S_IRUGO, 1720 + show_temp_src, store_temp_src, NOT_USED, 2), 1721 + SENSOR_ATTR_2(temp4_source_sel, S_IWUSR | S_IRUGO, 1722 + show_temp_src, store_temp_src, NOT_USED, 3), 1723 + SENSOR_ATTR_2(temp5_source_sel, S_IWUSR | S_IRUGO, 1724 + show_temp_src, store_temp_src, NOT_USED, 4), 1725 + SENSOR_ATTR_2(temp6_source_sel, S_IWUSR | S_IRUGO, 1726 + show_temp_src, store_temp_src, NOT_USED, 5), 1727 + }; 1728 + 1800 1729 static const struct sensor_device_attribute_2 sda_single_files[] = { 1801 1730 SENSOR_ATTR_2(intrusion0_alarm, S_IWUSR | S_IRUGO, show_alarm_beep, 1802 1731 store_chassis_clear, ALARM_STATUS, 46), 1803 - SENSOR_ATTR_2(intrusion0_beep, S_IWUSR | S_IRUGO, show_alarm_beep, 1804 - store_beep, BEEP_ENABLE, 46), 1805 - SENSOR_ATTR_2(beep_enable, S_IWUSR | S_IRUGO, show_alarm_beep, 1806 - store_beep, BEEP_ENABLE, 47), 1807 1732 #ifdef CONFIG_SENSORS_W83795_FANCTRL 1808 1733 SENSOR_ATTR_2(speed_cruise_tolerance, S_IWUSR | S_IRUGO, show_fanin, 1809 1734 store_fanin, FANIN_TOL, NOT_USED), ··· 1825 1728 SENSOR_ATTR_2(pwm_downtime, S_IWUSR | S_IRUGO, show_sf_setup, 1826 1729 store_sf_setup, SETUP_PWM_DOWNTIME, NOT_USED), 1827 1730 #endif 1731 + }; 1732 + 1733 + static const struct sensor_device_attribute_2 sda_beep_files[] = { 1734 + SENSOR_ATTR_2(intrusion0_beep, S_IWUSR | S_IRUGO, show_alarm_beep, 1735 + store_beep, BEEP_ENABLE, 46), 1736 + SENSOR_ATTR_2(beep_enable, S_IWUSR | S_IRUGO, show_alarm_beep, 1737 + store_beep, BEEP_ENABLE, 47), 1828 1738 }; 1829 1739 1830 1740 /* ··· 1963 1859 if (!(data->has_in & (1 << i))) 1964 1860 continue; 1965 1861 for (j = 0; j < ARRAY_SIZE(w83795_in[0]); j++) { 1862 + if (j == 4 && !data->enable_beep) 1863 + continue; 1966 1864 err = fn(dev, &w83795_in[i][j].dev_attr); 1967 1865 if (err) 1968 1866 return err; ··· 1975 1869 if (!(data->has_fan & (1 << i))) 1976 1870 continue; 1977 1871 for (j = 0; j < ARRAY_SIZE(w83795_fan[0]); j++) { 1872 + if (j == 3 && !data->enable_beep) 1873 + continue; 1978 1874 err = fn(dev, &w83795_fan[i][j].dev_attr); 1979 1875 if (err) 1980 1876 return err; 1981 1877 } 1982 1878 } 1983 1879 1880 + for (i = 0; i < ARRAY_SIZE(w83795_tss); i++) { 1881 + j = w83795_tss_useful(data, i); 1882 + if (!j) 1883 + continue; 1884 + err = fn(dev, &w83795_tss[i].dev_attr); 1885 + if (err) 1886 + return err; 1887 + } 1888 + 1984 1889 for (i = 0; i < ARRAY_SIZE(sda_single_files); i++) { 1985 1890 err = fn(dev, &sda_single_files[i].dev_attr); 1986 1891 if (err) 1987 1892 return err; 1893 + } 1894 + 1895 + if (data->enable_beep) { 1896 + for (i = 0; i < ARRAY_SIZE(sda_beep_files); i++) { 1897 + err = fn(dev, &sda_beep_files[i].dev_attr); 1898 + if (err) 1899 + return err; 1900 + } 1988 1901 } 1989 1902 1990 1903 #ifdef CONFIG_SENSORS_W83795_FANCTRL ··· 2024 1899 #else 2025 1900 for (j = 0; j < 8; j++) { 2026 1901 #endif 1902 + if (j == 7 && !data->enable_beep) 1903 + continue; 2027 1904 err = fn(dev, &w83795_temp[i][j].dev_attr); 2028 1905 if (err) 2029 1906 return err; ··· 2037 1910 if (!(data->has_dts & (1 << i))) 2038 1911 continue; 2039 1912 for (j = 0; j < ARRAY_SIZE(w83795_dts[0]); j++) { 1913 + if (j == 7 && !data->enable_beep) 1914 + continue; 2040 1915 err = fn(dev, &w83795_dts[i][j].dev_attr); 2041 1916 if (err) 2042 1917 return err; ··· 2177 2048 data->has_pwm = 8; 2178 2049 else 2179 2050 data->has_pwm = 2; 2051 + 2052 + /* Check if BEEP pin is available */ 2053 + if (data->chip_type == w83795g) { 2054 + /* The W83795G has a dedicated BEEP pin */ 2055 + data->enable_beep = 1; 2056 + } else { 2057 + /* The W83795ADG has a shared pin for OVT# and BEEP, so you 2058 + * can't have both */ 2059 + tmp = w83795_read(client, W83795_REG_OVT_CFG); 2060 + if ((tmp & OVT_CFG_SEL) == 0) 2061 + data->enable_beep = 1; 2062 + } 2180 2063 2181 2064 err = w83795_handle_files(dev, device_create_file); 2182 2065 if (err)