pwm: rockchip: support pwm version 4

Change-Id: I64e270c49e51244a9437f40cdc9e0df5aff1576d
Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
This commit is contained in:
Damon Ding
2023-11-27 16:55:22 +08:00
committed by Tao Huang
parent 0b024bc977
commit 732061bcf9
3 changed files with 889 additions and 27 deletions

View File

@@ -25,4 +25,40 @@ static void rockchip_pwm_oneshot_callback(struct pwm_device *pwm, struct pwm_sta
*/
}
static void rockchip_pwm_wave_middle_callback(struct pwm_device *pwm)
{
/*
* If you want to update the configuration of wave table, set
* struct rockchip_pwm_wave_table and call rockchip_pwm_set_wave().
*
* struct rockchip_pwm_wave_config wave_config;
* struct rockchip_pwm_wave_table duty_table;
*
* //fill the duty table
* ......
* wave_config.duty_table = &duty_table;
* wave_config.enable = true;
* rockchip_pwm_set_wave(pwm, &wave_config);
*
*/
}
static void rockchip_pwm_wave_max_callback(struct pwm_device *pwm)
{
/*
* If you want to update the configuration of wave table, set
* struct rockchip_pwm_wave_table and call rockchip_pwm_set_wave().
*
* struct rockchip_pwm_wave_config wave_config;
* struct rockchip_pwm_wave_table duty_table;
*
* //fill the duty table
* ......
* wave_config.duty_table = &duty_table;
* wave_config.enable = true;
* rockchip_pwm_set_wave(pwm, &wave_config);
*
*/
}
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -32,7 +32,7 @@ enum rockchip_pwm_global_ctrl_cmd {
* struct rockchip_pwm_wave_table - wave table config object
* @offset: the offset of wave table to set
* @len: the length of wave table to set
* @table: the values of wave table to set (in nanoseconds)
* @table: the values of wave table to set
* @
*/
struct rockchip_pwm_wave_table {