drivers: sensor: Convert fxos8700 pulse Kconfigs to dts properties
Converts fxos8700 pulse detection options from Kconfigs to optional device tree properties. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
832a896988
commit
d4b9d197f3
|
@ -121,81 +121,6 @@ config FXOS8700_PULSE_INT1
|
|||
help
|
||||
Say Y to route pulse interrupt to INT1 pin. Say N to route to INT2 pin.
|
||||
|
||||
config FXOS8700_PULSE_CFG
|
||||
hex "Pulse configuration register"
|
||||
range 0 0xff
|
||||
default 0x3f
|
||||
|
||||
config FXOS8700_PULSE_THSX
|
||||
hex "Pulse X-axis threshold"
|
||||
range 0 0x7f
|
||||
default 0x20
|
||||
help
|
||||
Threshold to start the pulse-event detection procedure on the X-axis.
|
||||
Threshold values for each axis are unsigned 7-bit numbers with a
|
||||
fixed resolution of 0.063 g/LSB, corresponding to an 8g acceleration
|
||||
full-scale range.
|
||||
|
||||
config FXOS8700_PULSE_THSY
|
||||
hex "Pulse Y-axis threshold"
|
||||
range 0 0x7f
|
||||
default 0x20
|
||||
help
|
||||
Threshold to start the pulse-event detection procedure on the Y-axis.
|
||||
Threshold values for each axis are unsigned 7-bit numbers with a
|
||||
fixed resolution of 0.063 g/LSB, corresponding to an 8g acceleration
|
||||
full-scale range.
|
||||
|
||||
config FXOS8700_PULSE_THSZ
|
||||
hex "Pulse Z-axis threshold"
|
||||
range 0 0x7f
|
||||
default 0x40
|
||||
help
|
||||
Threshold to start the pulse-event detection procedure on the Z-axis.
|
||||
Threshold values for each axis are unsigned 7-bit numbers with a
|
||||
fixed resolution of 0.063 g/LSB, corresponding to an 8g acceleration
|
||||
full-scale range.
|
||||
|
||||
config FXOS8700_PULSE_TMLT
|
||||
hex "Pulse time limit"
|
||||
range 0 0x7f
|
||||
default 0x18
|
||||
help
|
||||
The maximum time interval that can elapse between the start of the
|
||||
acceleration on the selected channel exceeding the specified
|
||||
threshold and the end when the channel acceleration goes back below
|
||||
the specified threshold. The resolution depends upon the sample rate
|
||||
(ODR) and the high-pass filter configuration
|
||||
(HP_FILTER_CUTOFF[pls_hpf_en]). For ODR=800 Hz and pls_hpf_en=0, the
|
||||
resolution is 0.625 ms/LSB.
|
||||
|
||||
config FXOS8700_PULSE_LTCY
|
||||
hex "Pulse latency"
|
||||
range 0 0xff
|
||||
default 0x28
|
||||
help
|
||||
The time interval that starts after the first pulse detection where
|
||||
the pulse-detection function ignores the start of a new pulse. The
|
||||
resolution depends upon the sample rate (ODR) and the high-pass filter
|
||||
configuration (HP_FILTER_CUTOFF[pls_hpf_en]). For ODR=800 Hz and
|
||||
pls_hpf_en=0, the resolution is 1.25 ms/LSB.
|
||||
|
||||
config FXOS8700_PULSE_WIND
|
||||
hex "Pulse window"
|
||||
range 0 0xff
|
||||
default 0x3c
|
||||
help
|
||||
The maximum interval of time that can elapse after the end of the
|
||||
latency interval in which the start of the second pulse event must be
|
||||
detected provided the device has been configured for double pulse
|
||||
detection. The detected second pulse width must be shorter than the
|
||||
time limit constraint specified by the PULSE_TMLT register, but the
|
||||
end of the double pulse need not finish within the time specified by
|
||||
the PULSE_WIND register. The resolution depends upon the sample rate
|
||||
(ODR) and the high-pass filter configuration
|
||||
(HP_FILTER_CUTOFF[pls_hpf_en]). For ODR=800 Hz and pls_hpf_en=0, the
|
||||
resolution is 1.25 ms/LSB.
|
||||
|
||||
endif # FXOS8700_PULSE
|
||||
|
||||
menuconfig FXOS8700_MOTION
|
||||
|
|
|
@ -580,13 +580,13 @@ static const struct fxos8700_config fxos8700_config = {
|
|||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_FXOS8700_PULSE
|
||||
.pulse_cfg = CONFIG_FXOS8700_PULSE_CFG,
|
||||
.pulse_ths[0] = CONFIG_FXOS8700_PULSE_THSX,
|
||||
.pulse_ths[1] = CONFIG_FXOS8700_PULSE_THSY,
|
||||
.pulse_ths[2] = CONFIG_FXOS8700_PULSE_THSZ,
|
||||
.pulse_tmlt = CONFIG_FXOS8700_PULSE_TMLT,
|
||||
.pulse_ltcy = CONFIG_FXOS8700_PULSE_LTCY,
|
||||
.pulse_wind = CONFIG_FXOS8700_PULSE_WIND,
|
||||
.pulse_cfg = DT_INST_PROP(0, pulse_cfg),
|
||||
.pulse_ths[0] = DT_INST_PROP(0, pulse_thsx),
|
||||
.pulse_ths[1] = DT_INST_PROP(0, pulse_thsy),
|
||||
.pulse_ths[2] = DT_INST_PROP(0, pulse_thsz),
|
||||
.pulse_tmlt = DT_INST_PROP(0, pulse_tmlt),
|
||||
.pulse_ltcy = DT_INST_PROP(0, pulse_ltcy),
|
||||
.pulse_wind = DT_INST_PROP(0, pulse_wind),
|
||||
#endif
|
||||
#ifdef CONFIG_FXOS8700_MAG_VECM
|
||||
.mag_vecm_cfg = CONFIG_FXOS8700_MAG_VECM_CFG,
|
||||
|
|
|
@ -31,3 +31,77 @@ properties:
|
|||
This pin defaults to active low when produced by the sensor.
|
||||
The property value should ensure the flags properly describe
|
||||
the signal that is presented to the driver.
|
||||
|
||||
pulse-cfg:
|
||||
type: int
|
||||
required: false
|
||||
default: 0x3f
|
||||
description: Pulse configuration register
|
||||
|
||||
pulse-thsx:
|
||||
type: int
|
||||
required: false
|
||||
default: 0x20
|
||||
description: Pulse X-axis threshold
|
||||
Threshold to start the pulse-event detection procedure on the X-axis.
|
||||
Threshold values for each axis are unsigned 7-bit numbers with a fixed
|
||||
resolution of 0.063 g/LSB, corresponding to an 8g acceleration
|
||||
full-scale range.
|
||||
|
||||
pulse-thsy:
|
||||
type: int
|
||||
required: false
|
||||
default: 0x20
|
||||
description: Pulse Y-axis threshold
|
||||
Threshold to start the pulse-event detection procedure on the Y-axis.
|
||||
Threshold values for each axis are unsigned 7-bit numbers with a fixed
|
||||
resolution of 0.063 g/LSB, corresponding to an 8g acceleration
|
||||
full-scale range.
|
||||
|
||||
pulse-thsz:
|
||||
type: int
|
||||
required: false
|
||||
default: 0x40
|
||||
description: Pulse Z-axis threshold
|
||||
Threshold to start the pulse-event detection procedure on the Z-axis.
|
||||
Threshold values for each axis are unsigned 7-bit numbers with a fixed
|
||||
resolution of 0.063 g/LSB, corresponding to an 8g acceleration
|
||||
full-scale range.
|
||||
|
||||
pulse-tmlt:
|
||||
type: int
|
||||
required: false
|
||||
default: 0x18
|
||||
description: Pulse time limit
|
||||
The maximum time interval that can elapse between the start of the
|
||||
acceleration on the selected channel exceeding the specified threshold
|
||||
and the end when the channel acceleration goes back below the specified
|
||||
threshold. The resolution depends upon the sample rate (ODR) and the
|
||||
high-pass filter configuration (HP_FILTER_CUTOFF[pls_hpf_en]). For
|
||||
ODR=800 Hz and pls_hpf_en=0, the resolution is 0.625 ms/LSB.
|
||||
|
||||
pulse-ltcy:
|
||||
type: int
|
||||
required: false
|
||||
default: 0x28
|
||||
description: Pulse latency
|
||||
The time interval that starts after the first pulse detection where the
|
||||
pulse-detection function ignores the start of a new pulse. The
|
||||
resolution depends upon the sample rate (ODR) and the high-pass filter
|
||||
configuration (HP_FILTER_CUTOFF[pls_hpf_en]). For ODR=800 Hz and
|
||||
pls_hpf_en=0, the resolution is 1.25 ms/LSB.
|
||||
|
||||
pulse-wind:
|
||||
type: int
|
||||
required: false
|
||||
default: 0x3c
|
||||
description: Pulse window
|
||||
The maximum interval of time that can elapse after the end of the
|
||||
latency interval in which the start of the second pulse event must be
|
||||
detected provided the device has been configured for double pulse
|
||||
detection. The detected second pulse width must be shorter than the
|
||||
time limit constraint specified by the PULSE_TMLT register, but the end
|
||||
of the double pulse need not finish within the time specified by the
|
||||
PULSE_WIND register. The resolution depends upon the sample rate (ODR)
|
||||
and the high-pass filter configuration (HP_FILTER_CUTOFF[pls_hpf_en]).
|
||||
For ODR=800 Hz and pls_hpf_en=0, the resolution is 1.25 ms/LSB.
|
||||
|
|
Loading…
Reference in New Issue