summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2017-07-19 11:54:23 (GMT)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-07-27 12:59:01 (GMT)
commit06f4e36baf7833c2fa40af34b240e4132898689b (patch)
tree7744769b661b85832623ac794c093f4ea39f2ae1 /arch
parent3030c951f19bf69fd12fe700d33c4be3ad2ee734 (diff)
downloadu-boot-fsl-qoriq-06f4e36baf7833c2fa40af34b240e4132898689b.tar.xz
rockchip: pwm: add mask for config setting
Use mask to clear old setting before direct set the new config, or else there it will mess up the config when it's not the same with default value. Fixes: 3851059 rockchip: Setup default PWM flags Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/arch-rockchip/pwm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-rockchip/pwm.h b/arch/arm/include/asm/arch-rockchip/pwm.h
index 08ff945..b1d8047 100644
--- a/arch/arm/include/asm/arch-rockchip/pwm.h
+++ b/arch/arm/include/asm/arch-rockchip/pwm.h
@@ -25,9 +25,11 @@ check_member(rk3288_pwm, ctrl, 0xc);
#define PWM_DUTY_POSTIVE (1 << 3)
#define PWM_DUTY_NEGATIVE (0 << 3)
+#define PWM_DUTY_MASK (1 << 3)
#define PWM_INACTIVE_POSTIVE (1 << 4)
#define PWM_INACTIVE_NEGATIVE (0 << 4)
+#define PWM_INACTIVE_MASK (1 << 4)
#define PWM_OUTPUT_LEFT (0 << 5)
#define PWM_OUTPUT_CENTER (1 << 5)