Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/pwm: pwm-fsl-ftm: use common header for FlexTimer #defines

This also fixes the wrong value for the previously defined
FTM_MODE_INIT macro (it was not used).

Reviewed-by: Esben Haabendal <esben@haabendal.dk>
Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Patrick Havelange and committed by
Greg Kroah-Hartman
e590eb40 cdff4314

+1 -43
+1 -43
drivers/pwm/pwm-fsl-ftm.c
··· 22 22 #include <linux/pwm.h> 23 23 #include <linux/regmap.h> 24 24 #include <linux/slab.h> 25 + #include <linux/fsl/ftm.h> 25 26 26 - #define FTM_SC 0x00 27 - #define FTM_SC_CLK_MASK_SHIFT 3 28 - #define FTM_SC_CLK_MASK (3 << FTM_SC_CLK_MASK_SHIFT) 29 27 #define FTM_SC_CLK(c) (((c) + 1) << FTM_SC_CLK_MASK_SHIFT) 30 - #define FTM_SC_PS_MASK 0x7 31 - 32 - #define FTM_CNT 0x04 33 - #define FTM_MOD 0x08 34 - 35 - #define FTM_CSC_BASE 0x0C 36 - #define FTM_CSC_MSB BIT(5) 37 - #define FTM_CSC_MSA BIT(4) 38 - #define FTM_CSC_ELSB BIT(3) 39 - #define FTM_CSC_ELSA BIT(2) 40 - #define FTM_CSC(_channel) (FTM_CSC_BASE + ((_channel) * 8)) 41 - 42 - #define FTM_CV_BASE 0x10 43 - #define FTM_CV(_channel) (FTM_CV_BASE + ((_channel) * 8)) 44 - 45 - #define FTM_CNTIN 0x4C 46 - #define FTM_STATUS 0x50 47 - 48 - #define FTM_MODE 0x54 49 - #define FTM_MODE_FTMEN BIT(0) 50 - #define FTM_MODE_INIT BIT(2) 51 - #define FTM_MODE_PWMSYNC BIT(3) 52 - 53 - #define FTM_SYNC 0x58 54 - #define FTM_OUTINIT 0x5C 55 - #define FTM_OUTMASK 0x60 56 - #define FTM_COMBINE 0x64 57 - #define FTM_DEADTIME 0x68 58 - #define FTM_EXTTRIG 0x6C 59 - #define FTM_POL 0x70 60 - #define FTM_FMS 0x74 61 - #define FTM_FILTER 0x78 62 - #define FTM_FLTCTRL 0x7C 63 - #define FTM_QDCTRL 0x80 64 - #define FTM_CONF 0x84 65 - #define FTM_FLTPOL 0x88 66 - #define FTM_SYNCONF 0x8C 67 - #define FTM_INVCTRL 0x90 68 - #define FTM_SWOCTRL 0x94 69 - #define FTM_PWMLOAD 0x98 70 28 71 29 enum fsl_pwm_clk { 72 30 FSL_PWM_CLK_SYS,