boards: dts: Add fxas21002 interrupt bindings and fix sensor sample

Adds dts bindings for the fxas21002 interrupt pins to all boards that
have this sensor.

The fxas21002 driver is currently only aware of one sensor interrupt
pin, therefore the routing of INT1 or INT2 to the driver is handled in
each board's dts.fixup.

The fxas21002 sample application has been broken since the refactoring
of the mcux gpio driver to dts in commit
4e8f29f319. The sample is now fixed.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
Maureen Helm 2018-05-05 14:55:32 -05:00 committed by Kumar Gala
commit 9cd36c7bd2
5 changed files with 17 additions and 10 deletions

View file

@ -90,16 +90,6 @@ config BATTERY_SENSE
endif # ADC
if FXAS21002
config FXAS21002_GPIO_NAME
default GPIO_MCUX_PORTC_NAME
config FXAS21002_GPIO_PIN
default 18
endif # FXAS21002
if PWM_MCUX_FTM
config PWM_3

View file

@ -7,6 +7,8 @@
#define CONFIG_FXAS21002_NAME NXP_KINETIS_I2C_40067000_NXP_FXAS21002_20_LABEL
#define CONFIG_FXAS21002_I2C_NAME NXP_KINETIS_I2C_40067000_NXP_FXAS21002_20_BUS_NAME
#define CONFIG_FXAS21002_I2C_ADDRESS NXP_KINETIS_I2C_40067000_NXP_FXAS21002_20_BASE_ADDRESS
#define CONFIG_FXAS21002_GPIO_NAME NXP_KINETIS_I2C_40067000_NXP_FXAS21002_20_INT2_GPIOS_CONTROLLER
#define CONFIG_FXAS21002_GPIO_PIN NXP_KINETIS_I2C_40067000_NXP_FXAS21002_20_INT2_GPIOS_PIN
#define CONFIG_MAX30101_NAME NXP_KINETIS_I2C_40066000_MAX_MAX30101_57_LABEL
#define CONFIG_MAX30101_I2C_NAME NXP_KINETIS_I2C_40066000_MAX_MAX30101_57_BUS_NAME

View file

@ -96,6 +96,8 @@
compatible = "nxp,fxas21002";
reg = <0x20>;
label = "FXAS21002";
int1-gpios = <&gpiod 1 0>;
int2-gpios = <&gpioc 18 0>;
};
};

View file

@ -92,12 +92,16 @@ config FXAS21002_TRIGGER
if FXAS21002_TRIGGER
if !HAS_DTS_GPIO_DEVICE
config FXAS21002_GPIO_NAME
string "GPIO device name"
config FXAS21002_GPIO_PIN
int "GPIO pin"
endif
config FXAS21002_DRDY_INT1
bool "Data ready interrupt to INT1 pin"
default n

View file

@ -18,4 +18,13 @@ properties:
compatible:
constraint: "nxp,fxas21002"
int1-gpios:
type: compound
category: optional
generation: define, use-prop-name
int2-gpios:
type: compound
category: optional
generation: define, use-prop-name
...