You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
pwm: rockchip: support pwm version 4
Change-Id: I64e270c49e51244a9437f40cdc9e0df5aff1576d Signed-off-by: Damon Ding <damon.ding@rock-chips.com>
This commit is contained in:
@@ -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
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user