show_pwm
show_pwm, set_pwm, SYS_PWM, ix-1); \
show_pwm, set_pwm, SYS_PWM_FREQ, ix-1); \
show_pwm, set_pwm, SYS_PWM_ENABLE, ix-1); \
show_pwm, set_pwm, SYS_PWM_RAMP_RATE, ix-1); \
show_pwm, set_pwm, SYS_PWM_AUTO_CHANNELS_ZONE, ix-1); \
show_pwm, set_pwm, SYS_PWM_AUTO_PWM_MIN, ix-1); \
show_pwm, set_pwm, SYS_PWM_AUTO_POINT1_PWM, ix-1); \
show_pwm, NULL, SYS_PWM_AUTO_POINT2_PWM, ix-1)
show_pwm, set_pwm, SYS_PWM, ix-1); \
show_pwm, set_pwm, SYS_PWM_FREQ, ix-1); \
show_pwm, NULL, SYS_PWM_ENABLE, ix-1)
static SENSOR_DEVICE_ATTR(pwm1, S_IRUGO, show_pwm, set_pwm, 0);
static SENSOR_DEVICE_ATTR(pwm2, S_IRUGO, show_pwm, set_pwm, 1);
static SENSOR_DEVICE_ATTR(pwm3, S_IRUGO, show_pwm, set_pwm, 2);
SENSOR_ATTR_2(pwm1, S_IRUGO|S_IWUSR, show_pwm, store_pwm, 0, 0),
SENSOR_ATTR_2(pwm2, S_IRUGO|S_IWUSR, show_pwm, store_pwm, 0, 1),
SENSOR_ATTR_2(pwm3, S_IRUGO|S_IWUSR, show_pwm, store_pwm, 0, 2),
SENSOR_ATTR_2(pwm4, S_IRUGO|S_IWUSR, show_pwm, store_pwm, 0, 3),
show_pwm, set_pwm, 0);
show_pwm, set_pwm, 1);
static SENSOR_DEVICE_ATTR(pwm1, S_IRUGO | S_IWUSR, show_pwm, set_pwm, 0);
static SENSOR_DEVICE_ATTR(pwm2, S_IRUGO | S_IWUSR, show_pwm, set_pwm, 1);
static SENSOR_DEVICE_ATTR(pwm3, S_IRUGO | S_IWUSR, show_pwm, set_pwm, 2);
static SENSOR_DEVICE_ATTR(pwm4, S_IRUGO | S_IWUSR, show_pwm, set_pwm, 3);
static SENSOR_DEVICE_ATTR(pwm5, S_IRUGO | S_IWUSR, show_pwm, set_pwm, 4);
static SENSOR_DEVICE_ATTR(pwm6, S_IRUGO | S_IWUSR, show_pwm, set_pwm, 5);
SENSOR_TEMPLATE(pwm, "pwm%d", S_IRUGO, show_pwm, store_pwm, 0);
SENSOR_TEMPLATE_2(pwm, "pwm%d", 0644, show_pwm, store_pwm, 0, 0);
SENSOR_TEMPLATE_2(pwm_weight_duty_step, "pwm%d_weight_duty_step", 0644, show_pwm, store_pwm, 0, 5);
SENSOR_TEMPLATE_2(pwm_weight_duty_base, "pwm%d_weight_duty_base", 0644, show_pwm, store_pwm, 0, 6);
SENSOR_TEMPLATE_2(pwm_start, "pwm%d_start", 0644, show_pwm, store_pwm, 0, 1);
SENSOR_TEMPLATE_2(pwm_floor, "pwm%d_floor", 0644, show_pwm, store_pwm, 0, 2);
SENSOR_TEMPLATE_2(pwm_max, "pwm%d_max", 0644, show_pwm, store_pwm, 0, 3);
SENSOR_TEMPLATE_2(pwm_step, "pwm%d_step", 0644, show_pwm, store_pwm, 0, 4);
show_pwm, NULL, SHOW_PWM, ix-1), \
show_pwm, set_pwm, SHOW_SET_PWM_ENABLE, ix-1), \
show_pwm, set_pwm, SHOW_SET_PWM_AUTO_CHANNELS_TEMP, ix-1)
show_pwm, set_pwm, SHOW_SET_PWM_FREQ, ix-1)
show_pwm, NULL, SHOW_SET_PWM_FREQ, ix-1)
static SENSOR_DEVICE_ATTR(pwm1, S_IRUGO | S_IWUSR, show_pwm, store_pwm, 0);
static SENSOR_DEVICE_ATTR(pwm2, S_IRUGO | S_IWUSR, show_pwm, store_pwm, 1);
static SENSOR_DEVICE_ATTR(pwm3, S_IRUGO | S_IWUSR, show_pwm, store_pwm, 2);
static SENSOR_DEVICE_ATTR(pwm4, S_IRUGO | S_IWUSR, show_pwm, store_pwm, 3);
show_pwm, store_pwm, 0),
show_pwm, store_pwm, 1),
show_pwm, store_pwm, 2),
show_pwm, store_pwm, 3),
show_pwm, store_pwm, 4),
static SENSOR_DEVICE_ATTR(pwm1, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 0);
static SENSOR_DEVICE_ATTR(pwm2, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 1);
static SENSOR_DEVICE_ATTR(pwm3, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 2);
static SENSOR_DEVICE_ATTR(pwm4, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 3);
static SENSOR_DEVICE_ATTR(pwm5, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 4);
static SENSOR_DEVICE_ATTR(pwm6, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 5);
static SENSOR_DEVICE_ATTR(pwm7, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 6);
SENSOR_ATTR_2(pwm##index, S_IWUSR | S_IRUGO, show_pwm, \
show_pwm, store_pwm, PWM_NONSTOP, index - 1), \
show_pwm, store_pwm, PWM_START, index - 1), \
show_pwm, store_pwm, PWM_STOP_TIME, index - 1)
SENSOR_ATTR_2(pwm##index, S_IWUSR | S_IRUGO, show_pwm, \
show_pwm, store_pwm, PWM_FREQ, index - 1), \
show_pwm, store_pwm, PWM_NONSTOP, index - 1), \
show_pwm, store_pwm, PWM_START, index - 1), \
show_pwm, store_pwm, PWM_STOP_TIME, index - 1), \
SENSOR_ATTR(pwm1, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 0),
SENSOR_ATTR(pwm2, S_IWUSR | S_IRUGO, show_pwm, store_pwm, 1),