@@ -148,7 +148,7 @@ struct amc6821_data {
148
148
int temp [TEMP_IDX_LEN ];
149
149
150
150
u16 fan [FAN1_IDX_LEN ];
151
- u8 fan1_div ;
151
+ u8 fan1_pulses ;
152
152
153
153
u8 pwm1 ;
154
154
u8 temp1_auto_point_temp [3 ];
@@ -193,9 +193,9 @@ static struct amc6821_data *amc6821_update_device(struct device *dev)
193
193
client ,
194
194
fan_reg_hi [i ]) << 8 ;
195
195
}
196
- data -> fan1_div = i2c_smbus_read_byte_data (client ,
196
+ data -> fan1_pulses = i2c_smbus_read_byte_data (client ,
197
197
AMC6821_REG_CONF4 );
198
- data -> fan1_div = data -> fan1_div & AMC6821_CONF4_PSPR ? 4 : 2 ;
198
+ data -> fan1_pulses = data -> fan1_pulses & AMC6821_CONF4_PSPR ? 4 : 2 ;
199
199
200
200
data -> pwm1_auto_point_pwm [0 ] = 0 ;
201
201
data -> pwm1_auto_point_pwm [2 ] = 255 ;
@@ -646,16 +646,16 @@ static ssize_t fan_store(struct device *dev, struct device_attribute *attr,
646
646
return count ;
647
647
}
648
648
649
- static ssize_t fan1_div_show (struct device * dev ,
650
- struct device_attribute * devattr , char * buf )
649
+ static ssize_t fan1_pulses_show (struct device * dev ,
650
+ struct device_attribute * devattr , char * buf )
651
651
{
652
652
struct amc6821_data * data = amc6821_update_device (dev );
653
- return sprintf (buf , "%d\n" , data -> fan1_div );
653
+ return sprintf (buf , "%d\n" , data -> fan1_pulses );
654
654
}
655
655
656
- static ssize_t fan1_div_store (struct device * dev ,
657
- struct device_attribute * attr , const char * buf ,
658
- size_t count )
656
+ static ssize_t fan1_pulses_store (struct device * dev ,
657
+ struct device_attribute * attr , const char * buf ,
658
+ size_t count )
659
659
{
660
660
struct amc6821_data * data = dev_get_drvdata (dev );
661
661
struct i2c_client * client = data -> client ;
@@ -675,11 +675,11 @@ static ssize_t fan1_div_store(struct device *dev,
675
675
switch (val ) {
676
676
case 2 :
677
677
config &= ~AMC6821_CONF4_PSPR ;
678
- data -> fan1_div = 2 ;
678
+ data -> fan1_pulses = 2 ;
679
679
break ;
680
680
case 4 :
681
681
config |= AMC6821_CONF4_PSPR ;
682
- data -> fan1_div = 4 ;
682
+ data -> fan1_pulses = 4 ;
683
683
break ;
684
684
default :
685
685
count = - EINVAL ;
@@ -714,7 +714,7 @@ static SENSOR_DEVICE_ATTR_RO(fan1_input, fan, IDX_FAN1_INPUT);
714
714
static SENSOR_DEVICE_ATTR_RW (fan1_min , fan , IDX_FAN1_MIN ) ;
715
715
static SENSOR_DEVICE_ATTR_RW (fan1_max , fan , IDX_FAN1_MAX ) ;
716
716
static SENSOR_DEVICE_ATTR_RO (fan1_fault , fan1_fault , 0 ) ;
717
- static SENSOR_DEVICE_ATTR_RW (fan1_div , fan1_div , 0 ) ;
717
+ static SENSOR_DEVICE_ATTR_RW (fan1_pulses , fan1_pulses , 0 ) ;
718
718
719
719
static SENSOR_DEVICE_ATTR_RW (pwm1 , pwm1 , 0 ) ;
720
720
static SENSOR_DEVICE_ATTR_RW (pwm1_enable , pwm1_enable , 0 ) ;
@@ -757,7 +757,7 @@ static struct attribute *amc6821_attrs[] = {
757
757
& sensor_dev_attr_fan1_min .dev_attr .attr ,
758
758
& sensor_dev_attr_fan1_max .dev_attr .attr ,
759
759
& sensor_dev_attr_fan1_fault .dev_attr .attr ,
760
- & sensor_dev_attr_fan1_div .dev_attr .attr ,
760
+ & sensor_dev_attr_fan1_pulses .dev_attr .attr ,
761
761
& sensor_dev_attr_pwm1 .dev_attr .attr ,
762
762
& sensor_dev_attr_pwm1_enable .dev_attr .attr ,
763
763
& sensor_dev_attr_pwm1_auto_channels_temp .dev_attr .attr ,
0 commit comments