• Home
  • Raw
  • Download

Lines Matching refs:pwm1

289 	struct pwm_data pwm1;	/* Pwm control values */  member
362 data->pwm1.pwm = adm1026_read_value(client, in adm1026_update_device()
449 data->pwm1.enable = 2; in adm1026_update_device()
450 data->pwm1.auto_pwm_min = in adm1026_update_device()
451 PWM_MIN_FROM_REG(data->pwm1.pwm); in adm1026_update_device()
1255 return sprintf(buf, "%d\n", PWM_FROM_REG(data->pwm1.pwm)); in show_pwm_reg()
1264 if (data->pwm1.enable == 1) { in set_pwm_reg()
1273 data->pwm1.pwm = PWM_TO_REG(val); in set_pwm_reg()
1274 adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); in set_pwm_reg()
1284 return sprintf(buf, "%d\n", data->pwm1.auto_pwm_min); in show_auto_pwm_min()
1301 data->pwm1.auto_pwm_min = clamp_val(val, 0, 255); in set_auto_pwm_min()
1302 if (data->pwm1.enable == 2) { /* apply immediately */ in set_auto_pwm_min()
1303 data->pwm1.pwm = PWM_TO_REG((data->pwm1.pwm & 0x0f) | in set_auto_pwm_min()
1304 PWM_MIN_TO_REG(data->pwm1.auto_pwm_min)); in set_auto_pwm_min()
1305 adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); in set_auto_pwm_min()
1321 return sprintf(buf, "%d\n", data->pwm1.enable); in show_pwm_enable()
1341 old_enable = data->pwm1.enable; in set_pwm_enable()
1342 data->pwm1.enable = val; in set_pwm_enable()
1347 data->pwm1.pwm = PWM_TO_REG((data->pwm1.pwm & 0x0f) | in set_pwm_enable()
1348 PWM_MIN_TO_REG(data->pwm1.auto_pwm_min)); in set_pwm_enable()
1349 adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); in set_pwm_enable()
1352 data->pwm1.pwm = 255; in set_pwm_enable()
1353 adm1026_write_value(client, ADM1026_REG_PWM, data->pwm1.pwm); in set_pwm_enable()
1361 static DEVICE_ATTR(pwm1, S_IRUGO | S_IWUSR, show_pwm_reg, set_pwm_reg);
1786 data->pwm1.auto_pwm_min = 255; in adm1026_init_client()