The get_state of pwm_ops is 'int' type, but starfive_pwm_ptc_get_state
function is 'void' type.
It needs to fix correct pointer type.
Change-Id: I8560bb1c0d9571fc0d4e66aa593d257e474f033f
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
return container_of(c, struct starfive_pwm_ptc_device, chip);
}
-static void starfive_pwm_ptc_get_state(struct pwm_chip *chip,
+static int starfive_pwm_ptc_get_state(struct pwm_chip *chip,
struct pwm_device *dev,
struct pwm_state *state)
{
state->duty_cycle = data_hrc * pwm_clk_ns;
state->polarity = PWM_POLARITY_NORMAL;
state->enabled = 1;
+
+ return 0;
}
static int starfive_pwm_ptc_apply(struct pwm_chip *chip,