aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips/adm1026.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips/adm1026.c')
-rw-r--r--drivers/i2c/chips/adm1026.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/drivers/i2c/chips/adm1026.c b/drivers/i2c/chips/adm1026.c
index 39e2f4a900bf..c127bd965c31 100644
--- a/drivers/i2c/chips/adm1026.c
+++ b/drivers/i2c/chips/adm1026.c
@@ -754,24 +754,24 @@ static ssize_t set_in_max(struct device *dev, const char *buf,
754} 754}
755 755
756#define in_reg(offset) \ 756#define in_reg(offset) \
757static ssize_t show_in##offset (struct device *dev, char *buf) \ 757static ssize_t show_in##offset (struct device *dev, struct device_attribute *attr, char *buf) \
758{ \ 758{ \
759 return show_in(dev, buf, offset); \ 759 return show_in(dev, buf, offset); \
760} \ 760} \
761static ssize_t show_in##offset##_min (struct device *dev, char *buf) \ 761static ssize_t show_in##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \
762{ \ 762{ \
763 return show_in_min(dev, buf, offset); \ 763 return show_in_min(dev, buf, offset); \
764} \ 764} \
765static ssize_t set_in##offset##_min (struct device *dev, \ 765static ssize_t set_in##offset##_min (struct device *dev, struct device_attribute *attr, \
766 const char *buf, size_t count) \ 766 const char *buf, size_t count) \
767{ \ 767{ \
768 return set_in_min(dev, buf, count, offset); \ 768 return set_in_min(dev, buf, count, offset); \
769} \ 769} \
770static ssize_t show_in##offset##_max (struct device *dev, char *buf) \ 770static ssize_t show_in##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \
771{ \ 771{ \
772 return show_in_max(dev, buf, offset); \ 772 return show_in_max(dev, buf, offset); \
773} \ 773} \
774static ssize_t set_in##offset##_max (struct device *dev, \ 774static ssize_t set_in##offset##_max (struct device *dev, struct device_attribute *attr, \
775 const char *buf, size_t count) \ 775 const char *buf, size_t count) \
776{ \ 776{ \
777 return set_in_max(dev, buf, count, offset); \ 777 return set_in_max(dev, buf, count, offset); \
@@ -800,19 +800,19 @@ in_reg(13);
800in_reg(14); 800in_reg(14);
801in_reg(15); 801in_reg(15);
802 802
803static ssize_t show_in16(struct device *dev, char *buf) 803static ssize_t show_in16(struct device *dev, struct device_attribute *attr, char *buf)
804{ 804{
805 struct adm1026_data *data = adm1026_update_device(dev); 805 struct adm1026_data *data = adm1026_update_device(dev);
806 return sprintf(buf,"%d\n", INS_FROM_REG(16, data->in[16]) - 806 return sprintf(buf,"%d\n", INS_FROM_REG(16, data->in[16]) -
807 NEG12_OFFSET); 807 NEG12_OFFSET);
808} 808}
809static ssize_t show_in16_min(struct device *dev, char *buf) 809static ssize_t show_in16_min(struct device *dev, struct device_attribute *attr, char *buf)
810{ 810{
811 struct adm1026_data *data = adm1026_update_device(dev); 811 struct adm1026_data *data = adm1026_update_device(dev);
812 return sprintf(buf,"%d\n", INS_FROM_REG(16, data->in_min[16]) 812 return sprintf(buf,"%d\n", INS_FROM_REG(16, data->in_min[16])
813 - NEG12_OFFSET); 813 - NEG12_OFFSET);
814} 814}
815static ssize_t set_in16_min(struct device *dev, const char *buf, size_t count) 815static ssize_t set_in16_min(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
816{ 816{
817 struct i2c_client *client = to_i2c_client(dev); 817 struct i2c_client *client = to_i2c_client(dev);
818 struct adm1026_data *data = i2c_get_clientdata(client); 818 struct adm1026_data *data = i2c_get_clientdata(client);
@@ -824,13 +824,13 @@ static ssize_t set_in16_min(struct device *dev, const char *buf, size_t count)
824 up(&data->update_lock); 824 up(&data->update_lock);
825 return count; 825 return count;
826} 826}
827static ssize_t show_in16_max(struct device *dev, char *buf) 827static ssize_t show_in16_max(struct device *dev, struct device_attribute *attr, char *buf)
828{ 828{
829 struct adm1026_data *data = adm1026_update_device(dev); 829 struct adm1026_data *data = adm1026_update_device(dev);
830 return sprintf(buf,"%d\n", INS_FROM_REG(16, data->in_max[16]) 830 return sprintf(buf,"%d\n", INS_FROM_REG(16, data->in_max[16])
831 - NEG12_OFFSET); 831 - NEG12_OFFSET);
832} 832}
833static ssize_t set_in16_max(struct device *dev, const char *buf, size_t count) 833static ssize_t set_in16_max(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
834{ 834{
835 struct i2c_client *client = to_i2c_client(dev); 835 struct i2c_client *client = to_i2c_client(dev);
836 struct adm1026_data *data = i2c_get_clientdata(client); 836 struct adm1026_data *data = i2c_get_clientdata(client);
@@ -880,15 +880,15 @@ static ssize_t set_fan_min(struct device *dev, const char *buf,
880} 880}
881 881
882#define fan_offset(offset) \ 882#define fan_offset(offset) \
883static ssize_t show_fan_##offset (struct device *dev, char *buf) \ 883static ssize_t show_fan_##offset (struct device *dev, struct device_attribute *attr, char *buf) \
884{ \ 884{ \
885 return show_fan(dev, buf, offset - 1); \ 885 return show_fan(dev, buf, offset - 1); \
886} \ 886} \
887static ssize_t show_fan_##offset##_min (struct device *dev, char *buf) \ 887static ssize_t show_fan_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \
888{ \ 888{ \
889 return show_fan_min(dev, buf, offset - 1); \ 889 return show_fan_min(dev, buf, offset - 1); \
890} \ 890} \
891static ssize_t set_fan_##offset##_min (struct device *dev, \ 891static ssize_t set_fan_##offset##_min (struct device *dev, struct device_attribute *attr, \
892 const char *buf, size_t count) \ 892 const char *buf, size_t count) \
893{ \ 893{ \
894 return set_fan_min(dev, buf, count, offset - 1); \ 894 return set_fan_min(dev, buf, count, offset - 1); \
@@ -967,11 +967,11 @@ static ssize_t set_fan_div(struct device *dev, const char *buf,
967} 967}
968 968
969#define fan_offset_div(offset) \ 969#define fan_offset_div(offset) \
970static ssize_t show_fan_##offset##_div (struct device *dev, char *buf) \ 970static ssize_t show_fan_##offset##_div (struct device *dev, struct device_attribute *attr, char *buf) \
971{ \ 971{ \
972 return show_fan_div(dev, buf, offset - 1); \ 972 return show_fan_div(dev, buf, offset - 1); \
973} \ 973} \
974static ssize_t set_fan_##offset##_div (struct device *dev, \ 974static ssize_t set_fan_##offset##_div (struct device *dev, struct device_attribute *attr, \
975 const char *buf, size_t count) \ 975 const char *buf, size_t count) \
976{ \ 976{ \
977 return set_fan_div(dev, buf, count, offset - 1); \ 977 return set_fan_div(dev, buf, count, offset - 1); \
@@ -1033,24 +1033,24 @@ static ssize_t set_temp_max(struct device *dev, const char *buf,
1033 return count; 1033 return count;
1034} 1034}
1035#define temp_reg(offset) \ 1035#define temp_reg(offset) \
1036static ssize_t show_temp_##offset (struct device *dev, char *buf) \ 1036static ssize_t show_temp_##offset (struct device *dev, struct device_attribute *attr, char *buf) \
1037{ \ 1037{ \
1038 return show_temp(dev, buf, offset - 1); \ 1038 return show_temp(dev, buf, offset - 1); \
1039} \ 1039} \
1040static ssize_t show_temp_##offset##_min (struct device *dev, char *buf) \ 1040static ssize_t show_temp_##offset##_min (struct device *dev, struct device_attribute *attr, char *buf) \
1041{ \ 1041{ \
1042 return show_temp_min(dev, buf, offset - 1); \ 1042 return show_temp_min(dev, buf, offset - 1); \
1043} \ 1043} \
1044static ssize_t show_temp_##offset##_max (struct device *dev, char *buf) \ 1044static ssize_t show_temp_##offset##_max (struct device *dev, struct device_attribute *attr, char *buf) \
1045{ \ 1045{ \
1046 return show_temp_max(dev, buf, offset - 1); \ 1046 return show_temp_max(dev, buf, offset - 1); \
1047} \ 1047} \
1048static ssize_t set_temp_##offset##_min (struct device *dev, \ 1048static ssize_t set_temp_##offset##_min (struct device *dev, struct device_attribute *attr, \
1049 const char *buf, size_t count) \ 1049 const char *buf, size_t count) \
1050{ \ 1050{ \
1051 return set_temp_min(dev, buf, count, offset - 1); \ 1051 return set_temp_min(dev, buf, count, offset - 1); \
1052} \ 1052} \
1053static ssize_t set_temp_##offset##_max (struct device *dev, \ 1053static ssize_t set_temp_##offset##_max (struct device *dev, struct device_attribute *attr, \
1054 const char *buf, size_t count) \ 1054 const char *buf, size_t count) \
1055{ \ 1055{ \
1056 return set_temp_max(dev, buf, count, offset - 1); \ 1056 return set_temp_max(dev, buf, count, offset - 1); \
@@ -1087,11 +1087,11 @@ static ssize_t set_temp_offset(struct device *dev, const char *buf,
1087} 1087}
1088 1088
1089#define temp_offset_reg(offset) \ 1089#define temp_offset_reg(offset) \
1090static ssize_t show_temp_##offset##_offset (struct device *dev, char *buf) \ 1090static ssize_t show_temp_##offset##_offset (struct device *dev, struct device_attribute *attr, char *buf) \
1091{ \ 1091{ \
1092 return show_temp_offset(dev, buf, offset - 1); \ 1092 return show_temp_offset(dev, buf, offset - 1); \
1093} \ 1093} \
1094static ssize_t set_temp_##offset##_offset (struct device *dev, \ 1094static ssize_t set_temp_##offset##_offset (struct device *dev, struct device_attribute *attr, \
1095 const char *buf, size_t count) \ 1095 const char *buf, size_t count) \
1096{ \ 1096{ \
1097 return set_temp_offset(dev, buf, count, offset - 1); \ 1097 return set_temp_offset(dev, buf, count, offset - 1); \
@@ -1139,22 +1139,22 @@ static ssize_t set_temp_auto_point1_temp(struct device *dev, const char *buf,
1139} 1139}
1140 1140
1141#define temp_auto_point(offset) \ 1141#define temp_auto_point(offset) \
1142static ssize_t show_temp##offset##_auto_point1_temp (struct device *dev, \ 1142static ssize_t show_temp##offset##_auto_point1_temp (struct device *dev, struct device_attribute *attr, \
1143 char *buf) \ 1143 char *buf) \
1144{ \ 1144{ \
1145 return show_temp_auto_point1_temp(dev, buf, offset - 1); \ 1145 return show_temp_auto_point1_temp(dev, buf, offset - 1); \
1146} \ 1146} \
1147static ssize_t set_temp##offset##_auto_point1_temp (struct device *dev, \ 1147static ssize_t set_temp##offset##_auto_point1_temp (struct device *dev, struct device_attribute *attr, \
1148 const char *buf, size_t count) \ 1148 const char *buf, size_t count) \
1149{ \ 1149{ \
1150 return set_temp_auto_point1_temp(dev, buf, count, offset - 1); \ 1150 return set_temp_auto_point1_temp(dev, buf, count, offset - 1); \
1151} \ 1151} \
1152static ssize_t show_temp##offset##_auto_point1_temp_hyst (struct device \ 1152static ssize_t show_temp##offset##_auto_point1_temp_hyst (struct device \
1153 *dev, char *buf) \ 1153 *dev, struct device_attribute *attr, char *buf) \
1154{ \ 1154{ \
1155 return show_temp_auto_point1_temp_hyst(dev, buf, offset - 1); \ 1155 return show_temp_auto_point1_temp_hyst(dev, buf, offset - 1); \
1156} \ 1156} \
1157static ssize_t show_temp##offset##_auto_point2_temp (struct device *dev, \ 1157static ssize_t show_temp##offset##_auto_point2_temp (struct device *dev, struct device_attribute *attr, \
1158 char *buf) \ 1158 char *buf) \
1159{ \ 1159{ \
1160 return show_temp_auto_point2_temp(dev, buf, offset - 1); \ 1160 return show_temp_auto_point2_temp(dev, buf, offset - 1); \
@@ -1171,12 +1171,12 @@ temp_auto_point(1);
1171temp_auto_point(2); 1171temp_auto_point(2);
1172temp_auto_point(3); 1172temp_auto_point(3);
1173 1173
1174static ssize_t show_temp_crit_enable(struct device *dev, char *buf) 1174static ssize_t show_temp_crit_enable(struct device *dev, struct device_attribute *attr, char *buf)
1175{ 1175{
1176 struct adm1026_data *data = adm1026_update_device(dev); 1176 struct adm1026_data *data = adm1026_update_device(dev);
1177 return sprintf(buf,"%d\n", (data->config1 & CFG1_THERM_HOT) >> 4); 1177 return sprintf(buf,"%d\n", (data->config1 & CFG1_THERM_HOT) >> 4);
1178} 1178}
1179static ssize_t set_temp_crit_enable(struct device *dev, const char *buf, 1179static ssize_t set_temp_crit_enable(struct device *dev, struct device_attribute *attr, const char *buf,
1180 size_t count) 1180 size_t count)
1181{ 1181{
1182 struct i2c_client *client = to_i2c_client(dev); 1182 struct i2c_client *client = to_i2c_client(dev);
@@ -1224,11 +1224,11 @@ static ssize_t set_temp_crit(struct device *dev, const char *buf,
1224} 1224}
1225 1225
1226#define temp_crit_reg(offset) \ 1226#define temp_crit_reg(offset) \
1227static ssize_t show_temp_##offset##_crit (struct device *dev, char *buf) \ 1227static ssize_t show_temp_##offset##_crit (struct device *dev, struct device_attribute *attr, char *buf) \
1228{ \ 1228{ \
1229 return show_temp_crit(dev, buf, offset - 1); \ 1229 return show_temp_crit(dev, buf, offset - 1); \
1230} \ 1230} \
1231static ssize_t set_temp_##offset##_crit (struct device *dev, \ 1231static ssize_t set_temp_##offset##_crit (struct device *dev, struct device_attribute *attr, \
1232 const char *buf, size_t count) \ 1232 const char *buf, size_t count) \
1233{ \ 1233{ \
1234 return set_temp_crit(dev, buf, count, offset - 1); \ 1234 return set_temp_crit(dev, buf, count, offset - 1); \
@@ -1240,12 +1240,12 @@ temp_crit_reg(1);
1240temp_crit_reg(2); 1240temp_crit_reg(2);
1241temp_crit_reg(3); 1241temp_crit_reg(3);
1242 1242
1243static ssize_t show_analog_out_reg(struct device *dev, char *buf) 1243static ssize_t show_analog_out_reg(struct device *dev, struct device_attribute *attr, char *buf)
1244{ 1244{
1245 struct adm1026_data *data = adm1026_update_device(dev); 1245 struct adm1026_data *data = adm1026_update_device(dev);
1246 return sprintf(buf,"%d\n", DAC_FROM_REG(data->analog_out)); 1246 return sprintf(buf,"%d\n", DAC_FROM_REG(data->analog_out));
1247} 1247}
1248static ssize_t set_analog_out_reg(struct device *dev, const char *buf, 1248static ssize_t set_analog_out_reg(struct device *dev, struct device_attribute *attr, const char *buf,
1249 size_t count) 1249 size_t count)
1250{ 1250{
1251 struct i2c_client *client = to_i2c_client(dev); 1251 struct i2c_client *client = to_i2c_client(dev);
@@ -1262,7 +1262,7 @@ static ssize_t set_analog_out_reg(struct device *dev, const char *buf,
1262static DEVICE_ATTR(analog_out, S_IRUGO | S_IWUSR, show_analog_out_reg, 1262static DEVICE_ATTR(analog_out, S_IRUGO | S_IWUSR, show_analog_out_reg,
1263 set_analog_out_reg); 1263 set_analog_out_reg);
1264 1264
1265static ssize_t show_vid_reg(struct device *dev, char *buf) 1265static ssize_t show_vid_reg(struct device *dev, struct device_attribute *attr, char *buf)
1266{ 1266{
1267 struct adm1026_data *data = adm1026_update_device(dev); 1267 struct adm1026_data *data = adm1026_update_device(dev);
1268 return sprintf(buf,"%d\n", vid_from_reg(data->vid & 0x3f, data->vrm)); 1268 return sprintf(buf,"%d\n", vid_from_reg(data->vid & 0x3f, data->vrm));
@@ -1270,12 +1270,12 @@ static ssize_t show_vid_reg(struct device *dev, char *buf)
1270 1270
1271static DEVICE_ATTR(vid, S_IRUGO, show_vid_reg, NULL); 1271static DEVICE_ATTR(vid, S_IRUGO, show_vid_reg, NULL);
1272 1272
1273static ssize_t show_vrm_reg(struct device *dev, char *buf) 1273static ssize_t show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
1274{ 1274{
1275 struct adm1026_data *data = adm1026_update_device(dev); 1275 struct adm1026_data *data = adm1026_update_device(dev);
1276 return sprintf(buf,"%d\n", data->vrm); 1276 return sprintf(buf,"%d\n", data->vrm);
1277} 1277}
1278static ssize_t store_vrm_reg(struct device *dev, const char *buf, 1278static ssize_t store_vrm_reg(struct device *dev, struct device_attribute *attr, const char *buf,
1279 size_t count) 1279 size_t count)
1280{ 1280{
1281 struct i2c_client *client = to_i2c_client(dev); 1281 struct i2c_client *client = to_i2c_client(dev);
@@ -1287,7 +1287,7 @@ static ssize_t store_vrm_reg(struct device *dev, const char *buf,
1287 1287
1288static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg); 1288static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm_reg, store_vrm_reg);
1289 1289
1290static ssize_t show_alarms_reg(struct device *dev, char *buf) 1290static ssize_t show_alarms_reg(struct device *dev, struct device_attribute *attr, char *buf)
1291{ 1291{
1292 struct adm1026_data *data = adm1026_update_device(dev); 1292 struct adm1026_data *data = adm1026_update_device(dev);
1293 return sprintf(buf, "%ld\n", (long) (data->alarms)); 1293 return sprintf(buf, "%ld\n", (long) (data->alarms));
@@ -1295,12 +1295,12 @@ static ssize_t show_alarms_reg(struct device *dev, char *buf)
1295 1295
1296static DEVICE_ATTR(alarms, S_IRUGO, show_alarms_reg, NULL); 1296static DEVICE_ATTR(alarms, S_IRUGO, show_alarms_reg, NULL);
1297 1297
1298static ssize_t show_alarm_mask(struct device *dev, char *buf) 1298static ssize_t show_alarm_mask(struct device *dev, struct device_attribute *attr, char *buf)
1299{ 1299{
1300 struct adm1026_data *data = adm1026_update_device(dev); 1300 struct adm1026_data *data = adm1026_update_device(dev);
1301 return sprintf(buf,"%ld\n", data->alarm_mask); 1301 return sprintf(buf,"%ld\n", data->alarm_mask);
1302} 1302}
1303static ssize_t set_alarm_mask(struct device *dev, const char *buf, 1303static ssize_t set_alarm_mask(struct device *dev, struct device_attribute *attr, const char *buf,
1304 size_t count) 1304 size_t count)
1305{ 1305{
1306 struct i2c_client *client = to_i2c_client(dev); 1306 struct i2c_client *client = to_i2c_client(dev);
@@ -1331,12 +1331,12 @@ static DEVICE_ATTR(alarm_mask, S_IRUGO | S_IWUSR, show_alarm_mask,
1331 set_alarm_mask); 1331 set_alarm_mask);
1332 1332
1333 1333
1334static ssize_t show_gpio(struct device *dev, char *buf) 1334static ssize_t show_gpio(struct device *dev, struct device_attribute *attr, char *buf)
1335{ 1335{
1336 struct adm1026_data *data = adm1026_update_device(dev); 1336 struct adm1026_data *data = adm1026_update_device(dev);
1337 return sprintf(buf,"%ld\n", data->gpio); 1337 return sprintf(buf,"%ld\n", data->gpio);
1338} 1338}
1339static ssize_t set_gpio(struct device *dev, const char *buf, 1339static ssize_t set_gpio(struct device *dev, struct device_attribute *attr, const char *buf,
1340 size_t count) 1340 size_t count)
1341{ 1341{
1342 struct i2c_client *client = to_i2c_client(dev); 1342 struct i2c_client *client = to_i2c_client(dev);
@@ -1359,12 +1359,12 @@ static ssize_t set_gpio(struct device *dev, const char *buf,
1359static DEVICE_ATTR(gpio, S_IRUGO | S_IWUSR, show_gpio, set_gpio); 1359static DEVICE_ATTR(gpio, S_IRUGO | S_IWUSR, show_gpio, set_gpio);
1360 1360
1361 1361
1362static ssize_t show_gpio_mask(struct device *dev, char *buf) 1362static ssize_t show_gpio_mask(struct device *dev, struct device_attribute *attr, char *buf)
1363{ 1363{
1364 struct adm1026_data *data = adm1026_update_device(dev); 1364 struct adm1026_data *data = adm1026_update_device(dev);
1365 return sprintf(buf,"%ld\n", data->gpio_mask); 1365 return sprintf(buf,"%ld\n", data->gpio_mask);
1366} 1366}
1367static ssize_t set_gpio_mask(struct device *dev, const char *buf, 1367static ssize_t set_gpio_mask(struct device *dev, struct device_attribute *attr, const char *buf,
1368 size_t count) 1368 size_t count)
1369{ 1369{
1370 struct i2c_client *client = to_i2c_client(dev); 1370 struct i2c_client *client = to_i2c_client(dev);
@@ -1386,12 +1386,12 @@ static ssize_t set_gpio_mask(struct device *dev, const char *buf,
1386 1386
1387static DEVICE_ATTR(gpio_mask, S_IRUGO | S_IWUSR, show_gpio_mask, set_gpio_mask); 1387static DEVICE_ATTR(gpio_mask, S_IRUGO | S_IWUSR, show_gpio_mask, set_gpio_mask);
1388 1388
1389static ssize_t show_pwm_reg(struct device *dev, char *buf) 1389static ssize_t show_pwm_reg(struct device *dev, struct device_attribute *attr, char *buf)
1390{ 1390{
1391 struct adm1026_data *data = adm1026_update_device(dev); 1391 struct adm1026_data *data = adm1026_update_device(dev);
1392 return sprintf(buf,"%d\n", PWM_FROM_REG(data->pwm1.pwm)); 1392 return sprintf(buf,"%d\n", PWM_FROM_REG(data->pwm1.pwm));
1393} 1393}
1394static ssize_t set_pwm_reg(struct device *dev, const char *buf, 1394static ssize_t set_pwm_reg(struct device *dev, struct device_attribute *attr, const char *buf,
1395 size_t count) 1395 size_t count)
1396{ 1396{
1397 struct i2c_client *client = to_i2c_client(dev); 1397 struct i2c_client *client = to_i2c_client(dev);
@@ -1407,12 +1407,12 @@ static ssize_t set_pwm_reg(struct device *dev, const char *buf,
1407 } 1407 }
1408 return count; 1408 return count;
1409} 1409}
1410static ssize_t show_auto_pwm_min(struct device *dev, char *buf) 1410static ssize_t show_auto_pwm_min(struct device *dev, struct device_attribute *attr, char *buf)
1411{ 1411{
1412 struct adm1026_data *data = adm1026_update_device(dev); 1412 struct adm1026_data *data = adm1026_update_device(dev);
1413 return sprintf(buf,"%d\n", data->pwm1.auto_pwm_min); 1413 return sprintf(buf,"%d\n", data->pwm1.auto_pwm_min);
1414} 1414}
1415static ssize_t set_auto_pwm_min(struct device *dev, const char *buf, 1415static ssize_t set_auto_pwm_min(struct device *dev, struct device_attribute *attr, const char *buf,
1416 size_t count) 1416 size_t count)
1417{ 1417{
1418 struct i2c_client *client = to_i2c_client(dev); 1418 struct i2c_client *client = to_i2c_client(dev);
@@ -1429,16 +1429,16 @@ static ssize_t set_auto_pwm_min(struct device *dev, const char *buf,
1429 up(&data->update_lock); 1429 up(&data->update_lock);
1430 return count; 1430 return count;
1431} 1431}
1432static ssize_t show_auto_pwm_max(struct device *dev, char *buf) 1432static ssize_t show_auto_pwm_max(struct device *dev, struct device_attribute *attr, char *buf)
1433{ 1433{
1434 return sprintf(buf,"%d\n", ADM1026_PWM_MAX); 1434 return sprintf(buf,"%d\n", ADM1026_PWM_MAX);
1435} 1435}
1436static ssize_t show_pwm_enable(struct device *dev, char *buf) 1436static ssize_t show_pwm_enable(struct device *dev, struct device_attribute *attr, char *buf)
1437{ 1437{
1438 struct adm1026_data *data = adm1026_update_device(dev); 1438 struct adm1026_data *data = adm1026_update_device(dev);
1439 return sprintf(buf,"%d\n", data->pwm1.enable); 1439 return sprintf(buf,"%d\n", data->pwm1.enable);
1440} 1440}
1441static ssize_t set_pwm_enable(struct device *dev, const char *buf, 1441static ssize_t set_pwm_enable(struct device *dev, struct device_attribute *attr, const char *buf,
1442 size_t count) 1442 size_t count)
1443{ 1443{
1444 struct i2c_client *client = to_i2c_client(dev); 1444 struct i2c_client *client = to_i2c_client(dev);