linux/include/linux/fsl/ftm.h

// SPDX-License-Identifier: GPL-2.0
#ifndef __FSL_FTM_H__
#define __FSL_FTM_H__

#define FTM_SC
#define FTM_CNT
#define FTM_MOD

#define FTM_CNTIN
#define FTM_STATUS
#define FTM_MODE
#define FTM_SYNC
#define FTM_OUTINIT
#define FTM_OUTMASK
#define FTM_COMBINE
#define FTM_DEADTIME
#define FTM_EXTTRIG
#define FTM_POL
#define FTM_FMS
#define FTM_FILTER
#define FTM_FLTCTRL
#define FTM_QDCTRL
#define FTM_CONF
#define FTM_FLTPOL
#define FTM_SYNCONF
#define FTM_INVCTRL
#define FTM_SWOCTRL
#define FTM_PWMLOAD

#define FTM_SC_CLK_MASK_SHIFT
#define FTM_SC_CLK_MASK
#define FTM_SC_TOF
#define FTM_SC_TOIE
#define FTM_SC_CPWMS
#define FTM_SC_CLKS
#define FTM_SC_PS_1
#define FTM_SC_PS_2
#define FTM_SC_PS_4
#define FTM_SC_PS_8
#define FTM_SC_PS_16
#define FTM_SC_PS_32
#define FTM_SC_PS_64
#define FTM_SC_PS_128
#define FTM_SC_PS_MASK

#define FTM_MODE_FAULTIE
#define FTM_MODE_FAULTM
#define FTM_MODE_CAPTEST
#define FTM_MODE_PWMSYNC
#define FTM_MODE_WPDIS
#define FTM_MODE_INIT
#define FTM_MODE_FTMEN

/* NXP Errata: The PHAFLTREN and PHBFLTREN bits are tide to zero internally
 * and these bits cannot be set. Flextimer cannot use Filter in
 * Quadrature Decoder Mode.
 * https://community.nxp.com/thread/467648#comment-1010319
 */
#define FTM_QDCTRL_PHAFLTREN
#define FTM_QDCTRL_PHBFLTREN
#define FTM_QDCTRL_PHAPOL
#define FTM_QDCTRL_PHBPOL
#define FTM_QDCTRL_QUADMODE
#define FTM_QDCTRL_QUADDIR
#define FTM_QDCTRL_TOFDIR
#define FTM_QDCTRL_QUADEN

#define FTM_FMS_FAULTF
#define FTM_FMS_WPEN
#define FTM_FMS_FAULTIN
#define FTM_FMS_FAULTF3
#define FTM_FMS_FAULTF2
#define FTM_FMS_FAULTF1
#define FTM_FMS_FAULTF0

#define FTM_CSC_BASE
#define FTM_CSC_MSB
#define FTM_CSC_MSA
#define FTM_CSC_ELSB
#define FTM_CSC_ELSA
#define FTM_CSC(_channel)

#define FTM_CV_BASE
#define FTM_CV(_channel)

#define FTM_PS_MAX

#endif