adt7475.c (56e35eeebed2dcb4e1a17ad119e039cf095854ac) | adt7475.c (84d2a314bbe440d7c2e8636a1923aa3ea1aca51b) |
---|---|
1/* 2 * adt7475 - Thermal sensor driver for the ADT7475 chip and derivatives 3 * Copyright (C) 2007-2008, Advanced Micro Devices, Inc. 4 * Copyright (C) 2008 Jordan Crouse <jordan@cosmicpenguin.net> 5 * Copyright (C) 2008 Hans de Goede <hdegoede@redhat.com> 6 7 * Derived from the lm83 driver by Jean Delvare 8 * --- 848 unchanged lines hidden (view full) --- 857 MIN, 3); 858static SENSOR_DEVICE_ATTR_2(fan4_alarm, S_IRUGO, show_tach, NULL, ALARM, 3); 859static SENSOR_DEVICE_ATTR_2(pwm1, S_IRUGO | S_IWUSR, show_pwm, set_pwm, INPUT, 860 0); 861static SENSOR_DEVICE_ATTR_2(pwm1_freq, S_IRUGO | S_IWUSR, show_pwmfreq, 862 set_pwmfreq, INPUT, 0); 863static SENSOR_DEVICE_ATTR_2(pwm1_enable, S_IRUGO | S_IWUSR, show_pwmctrl, 864 set_pwmctrl, INPUT, 0); | 1/* 2 * adt7475 - Thermal sensor driver for the ADT7475 chip and derivatives 3 * Copyright (C) 2007-2008, Advanced Micro Devices, Inc. 4 * Copyright (C) 2008 Jordan Crouse <jordan@cosmicpenguin.net> 5 * Copyright (C) 2008 Hans de Goede <hdegoede@redhat.com> 6 7 * Derived from the lm83 driver by Jean Delvare 8 * --- 848 unchanged lines hidden (view full) --- 857 MIN, 3); 858static SENSOR_DEVICE_ATTR_2(fan4_alarm, S_IRUGO, show_tach, NULL, ALARM, 3); 859static SENSOR_DEVICE_ATTR_2(pwm1, S_IRUGO | S_IWUSR, show_pwm, set_pwm, INPUT, 860 0); 861static SENSOR_DEVICE_ATTR_2(pwm1_freq, S_IRUGO | S_IWUSR, show_pwmfreq, 862 set_pwmfreq, INPUT, 0); 863static SENSOR_DEVICE_ATTR_2(pwm1_enable, S_IRUGO | S_IWUSR, show_pwmctrl, 864 set_pwmctrl, INPUT, 0); |
865static SENSOR_DEVICE_ATTR_2(pwm1_auto_channel_temp, S_IRUGO | S_IWUSR, | 865static SENSOR_DEVICE_ATTR_2(pwm1_auto_channels_temp, S_IRUGO | S_IWUSR, |
866 show_pwmchan, set_pwmchan, INPUT, 0); 867static SENSOR_DEVICE_ATTR_2(pwm1_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, 868 set_pwm, MIN, 0); 869static SENSOR_DEVICE_ATTR_2(pwm1_auto_point2_pwm, S_IRUGO | S_IWUSR, show_pwm, 870 set_pwm, MAX, 0); 871static SENSOR_DEVICE_ATTR_2(pwm2, S_IRUGO | S_IWUSR, show_pwm, set_pwm, INPUT, 872 1); 873static SENSOR_DEVICE_ATTR_2(pwm2_freq, S_IRUGO | S_IWUSR, show_pwmfreq, 874 set_pwmfreq, INPUT, 1); 875static SENSOR_DEVICE_ATTR_2(pwm2_enable, S_IRUGO | S_IWUSR, show_pwmctrl, 876 set_pwmctrl, INPUT, 1); | 866 show_pwmchan, set_pwmchan, INPUT, 0); 867static SENSOR_DEVICE_ATTR_2(pwm1_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, 868 set_pwm, MIN, 0); 869static SENSOR_DEVICE_ATTR_2(pwm1_auto_point2_pwm, S_IRUGO | S_IWUSR, show_pwm, 870 set_pwm, MAX, 0); 871static SENSOR_DEVICE_ATTR_2(pwm2, S_IRUGO | S_IWUSR, show_pwm, set_pwm, INPUT, 872 1); 873static SENSOR_DEVICE_ATTR_2(pwm2_freq, S_IRUGO | S_IWUSR, show_pwmfreq, 874 set_pwmfreq, INPUT, 1); 875static SENSOR_DEVICE_ATTR_2(pwm2_enable, S_IRUGO | S_IWUSR, show_pwmctrl, 876 set_pwmctrl, INPUT, 1); |
877static SENSOR_DEVICE_ATTR_2(pwm2_auto_channel_temp, S_IRUGO | S_IWUSR, | 877static SENSOR_DEVICE_ATTR_2(pwm2_auto_channels_temp, S_IRUGO | S_IWUSR, |
878 show_pwmchan, set_pwmchan, INPUT, 1); 879static SENSOR_DEVICE_ATTR_2(pwm2_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, 880 set_pwm, MIN, 1); 881static SENSOR_DEVICE_ATTR_2(pwm2_auto_point2_pwm, S_IRUGO | S_IWUSR, show_pwm, 882 set_pwm, MAX, 1); 883static SENSOR_DEVICE_ATTR_2(pwm3, S_IRUGO | S_IWUSR, show_pwm, set_pwm, INPUT, 884 2); 885static SENSOR_DEVICE_ATTR_2(pwm3_freq, S_IRUGO | S_IWUSR, show_pwmfreq, 886 set_pwmfreq, INPUT, 2); 887static SENSOR_DEVICE_ATTR_2(pwm3_enable, S_IRUGO | S_IWUSR, show_pwmctrl, 888 set_pwmctrl, INPUT, 2); | 878 show_pwmchan, set_pwmchan, INPUT, 1); 879static SENSOR_DEVICE_ATTR_2(pwm2_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, 880 set_pwm, MIN, 1); 881static SENSOR_DEVICE_ATTR_2(pwm2_auto_point2_pwm, S_IRUGO | S_IWUSR, show_pwm, 882 set_pwm, MAX, 1); 883static SENSOR_DEVICE_ATTR_2(pwm3, S_IRUGO | S_IWUSR, show_pwm, set_pwm, INPUT, 884 2); 885static SENSOR_DEVICE_ATTR_2(pwm3_freq, S_IRUGO | S_IWUSR, show_pwmfreq, 886 set_pwmfreq, INPUT, 2); 887static SENSOR_DEVICE_ATTR_2(pwm3_enable, S_IRUGO | S_IWUSR, show_pwmctrl, 888 set_pwmctrl, INPUT, 2); |
889static SENSOR_DEVICE_ATTR_2(pwm3_auto_channel_temp, S_IRUGO | S_IWUSR, | 889static SENSOR_DEVICE_ATTR_2(pwm3_auto_channels_temp, S_IRUGO | S_IWUSR, |
890 show_pwmchan, set_pwmchan, INPUT, 2); 891static SENSOR_DEVICE_ATTR_2(pwm3_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, 892 set_pwm, MIN, 2); 893static SENSOR_DEVICE_ATTR_2(pwm3_auto_point2_pwm, S_IRUGO | S_IWUSR, show_pwm, 894 set_pwm, MAX, 2); 895 896static struct attribute *adt7475_attrs[] = { 897 &sensor_dev_attr_in1_input.dev_attr.attr, --- 43 unchanged lines hidden (view full) --- 941 &sensor_dev_attr_fan3_min.dev_attr.attr, 942 &sensor_dev_attr_fan3_alarm.dev_attr.attr, 943 &sensor_dev_attr_fan4_input.dev_attr.attr, 944 &sensor_dev_attr_fan4_min.dev_attr.attr, 945 &sensor_dev_attr_fan4_alarm.dev_attr.attr, 946 &sensor_dev_attr_pwm1.dev_attr.attr, 947 &sensor_dev_attr_pwm1_freq.dev_attr.attr, 948 &sensor_dev_attr_pwm1_enable.dev_attr.attr, | 890 show_pwmchan, set_pwmchan, INPUT, 2); 891static SENSOR_DEVICE_ATTR_2(pwm3_auto_point1_pwm, S_IRUGO | S_IWUSR, show_pwm, 892 set_pwm, MIN, 2); 893static SENSOR_DEVICE_ATTR_2(pwm3_auto_point2_pwm, S_IRUGO | S_IWUSR, show_pwm, 894 set_pwm, MAX, 2); 895 896static struct attribute *adt7475_attrs[] = { 897 &sensor_dev_attr_in1_input.dev_attr.attr, --- 43 unchanged lines hidden (view full) --- 941 &sensor_dev_attr_fan3_min.dev_attr.attr, 942 &sensor_dev_attr_fan3_alarm.dev_attr.attr, 943 &sensor_dev_attr_fan4_input.dev_attr.attr, 944 &sensor_dev_attr_fan4_min.dev_attr.attr, 945 &sensor_dev_attr_fan4_alarm.dev_attr.attr, 946 &sensor_dev_attr_pwm1.dev_attr.attr, 947 &sensor_dev_attr_pwm1_freq.dev_attr.attr, 948 &sensor_dev_attr_pwm1_enable.dev_attr.attr, |
949 &sensor_dev_attr_pwm1_auto_channel_temp.dev_attr.attr, | 949 &sensor_dev_attr_pwm1_auto_channels_temp.dev_attr.attr, |
950 &sensor_dev_attr_pwm1_auto_point1_pwm.dev_attr.attr, 951 &sensor_dev_attr_pwm1_auto_point2_pwm.dev_attr.attr, 952 &sensor_dev_attr_pwm2.dev_attr.attr, 953 &sensor_dev_attr_pwm2_freq.dev_attr.attr, 954 &sensor_dev_attr_pwm2_enable.dev_attr.attr, | 950 &sensor_dev_attr_pwm1_auto_point1_pwm.dev_attr.attr, 951 &sensor_dev_attr_pwm1_auto_point2_pwm.dev_attr.attr, 952 &sensor_dev_attr_pwm2.dev_attr.attr, 953 &sensor_dev_attr_pwm2_freq.dev_attr.attr, 954 &sensor_dev_attr_pwm2_enable.dev_attr.attr, |
955 &sensor_dev_attr_pwm2_auto_channel_temp.dev_attr.attr, | 955 &sensor_dev_attr_pwm2_auto_channels_temp.dev_attr.attr, |
956 &sensor_dev_attr_pwm2_auto_point1_pwm.dev_attr.attr, 957 &sensor_dev_attr_pwm2_auto_point2_pwm.dev_attr.attr, 958 &sensor_dev_attr_pwm3.dev_attr.attr, 959 &sensor_dev_attr_pwm3_freq.dev_attr.attr, 960 &sensor_dev_attr_pwm3_enable.dev_attr.attr, | 956 &sensor_dev_attr_pwm2_auto_point1_pwm.dev_attr.attr, 957 &sensor_dev_attr_pwm2_auto_point2_pwm.dev_attr.attr, 958 &sensor_dev_attr_pwm3.dev_attr.attr, 959 &sensor_dev_attr_pwm3_freq.dev_attr.attr, 960 &sensor_dev_attr_pwm3_enable.dev_attr.attr, |
961 &sensor_dev_attr_pwm3_auto_channel_temp.dev_attr.attr, | 961 &sensor_dev_attr_pwm3_auto_channels_temp.dev_attr.attr, |
962 &sensor_dev_attr_pwm3_auto_point1_pwm.dev_attr.attr, 963 &sensor_dev_attr_pwm3_auto_point2_pwm.dev_attr.attr, 964 NULL, 965}; 966 967struct attribute_group adt7475_attr_group = { .attrs = adt7475_attrs }; 968 969static int adt7475_detect(struct i2c_client *client, int kind, --- 251 unchanged lines hidden --- | 962 &sensor_dev_attr_pwm3_auto_point1_pwm.dev_attr.attr, 963 &sensor_dev_attr_pwm3_auto_point2_pwm.dev_attr.attr, 964 NULL, 965}; 966 967struct attribute_group adt7475_attr_group = { .attrs = adt7475_attrs }; 968 969static int adt7475_detect(struct i2c_client *client, int kind, --- 251 unchanged lines hidden --- |