Lines Matching full:pwm1
278 struct pwm_data pwm1; /* Pwm control values */ member
351 data->pwm1.pwm = adm1026_read_value(client, in adm1026_update_device()
438 data->pwm1.enable = 2; in adm1026_update_device()
439 data->pwm1.auto_pwm_min = in adm1026_update_device()
440 PWM_MIN_FROM_REG(data->pwm1.pwm); in adm1026_update_device()
1267 return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm1.pwm)); in pwm1_show()
1276 if (data->pwm1.enable == 1) { in pwm1_store()
1285 data->pwm1.pwm = PWM_TO_REG(val); in pwm1_store()
1286 adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); in pwm1_store()
1297 return sprintf(buf, "%d\n", data->pwm1.auto_pwm_min); in temp1_auto_point1_pwm_show()
1314 data->pwm1.auto_pwm_min = clamp_val(val, 0, 255); in temp1_auto_point1_pwm_store()
1315 if (data->pwm1.enable == 2) { /* apply immediately */ in temp1_auto_point1_pwm_store()
1316 data->pwm1.pwm = PWM_TO_REG((data->pwm1.pwm & 0x0f) | in temp1_auto_point1_pwm_store()
1317 PWM_MIN_TO_REG(data->pwm1.auto_pwm_min)); in temp1_auto_point1_pwm_store()
1318 adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); in temp1_auto_point1_pwm_store()
1335 return sprintf(buf, "%d\n", data->pwm1.enable); in pwm1_enable_show()
1356 old_enable = data->pwm1.enable; in pwm1_enable_store()
1357 data->pwm1.enable = val; in pwm1_enable_store()
1361 if (val == 2) { /* apply pwm1_auto_pwm_min to pwm1 */ in pwm1_enable_store()
1362 data->pwm1.pwm = PWM_TO_REG((data->pwm1.pwm & 0x0f) | in pwm1_enable_store()
1363 PWM_MIN_TO_REG(data->pwm1.auto_pwm_min)); in pwm1_enable_store()
1364 adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); in pwm1_enable_store()
1367 data->pwm1.pwm = 255; in pwm1_enable_store()
1368 adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); in pwm1_enable_store()
1376 static DEVICE_ATTR_RW(pwm1);
1796 * value for pwm1.auto_pwm_min to its maximum in adm1026_init_client()
1798 * without first setting a value for pwm1.auto_pwm_min in adm1026_init_client()
1801 data->pwm1.auto_pwm_min = 255; in adm1026_init_client()