boards: Set devicetree alias for ST LSM6DSL nodes
Set accel0 alias for all boards with the LSM6DSL accelerometer to use by the accel_polling sample. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
This commit is contained in:
parent
d481a25493
commit
49fa59b72c
7 changed files with 12 additions and 20 deletions
|
@ -43,6 +43,7 @@
|
||||||
led0 = &green_led_0;
|
led0 = &green_led_0;
|
||||||
led1 = &green_led_1;
|
led1 = &green_led_1;
|
||||||
sw0 = &user_button;
|
sw0 = &user_button;
|
||||||
|
accel0 = &lsm6dsl;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -94,7 +95,7 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
/* ST Microelectronics LSM6DSL accel/gyro sensor */
|
/* ST Microelectronics LSM6DSL accel/gyro sensor */
|
||||||
lsm6dsl@1 {
|
lsm6dsl: lsm6dsl@1 {
|
||||||
compatible = "st,lsm6dsl";
|
compatible = "st,lsm6dsl";
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
spi-max-frequency = <1000000>;
|
spi-max-frequency = <1000000>;
|
||||||
|
|
|
@ -40,14 +40,10 @@ endchoice
|
||||||
|
|
||||||
endif # LSM6DSL
|
endif # LSM6DSL
|
||||||
|
|
||||||
if SENSOR
|
|
||||||
|
|
||||||
config I2C
|
config I2C
|
||||||
default y
|
default y if SENSOR
|
||||||
|
|
||||||
config SPI
|
config SPI
|
||||||
default y
|
default y if SENSOR
|
||||||
|
|
||||||
endif # SENSOR
|
|
||||||
|
|
||||||
endif # BOARD_96B_ARGONKEY
|
endif # BOARD_96B_ARGONKEY
|
||||||
|
|
|
@ -25,12 +25,8 @@ choice LSM6DSL_TRIGGER_MODE
|
||||||
depends on LSM6DSL
|
depends on LSM6DSL
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
if SENSOR
|
|
||||||
|
|
||||||
config I2C
|
config I2C
|
||||||
default y
|
default y if SENSOR
|
||||||
|
|
||||||
endif # SENSOR
|
|
||||||
|
|
||||||
if BT
|
if BT
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
led0 = &green_led_1;
|
led0 = &green_led_1;
|
||||||
sw0 = &user_button;
|
sw0 = &user_button;
|
||||||
watchdog0 = &iwdg;
|
watchdog0 = &iwdg;
|
||||||
|
accel0 = &lsm6dsl;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -109,7 +110,7 @@
|
||||||
reg = <0x5d>;
|
reg = <0x5d>;
|
||||||
};
|
};
|
||||||
|
|
||||||
lsm6dsl@6a {
|
lsm6dsl: lsm6dsl@6a {
|
||||||
compatible = "st,lsm6dsl";
|
compatible = "st,lsm6dsl";
|
||||||
reg = <0x6a>;
|
reg = <0x6a>;
|
||||||
irq-gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
|
irq-gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
|
||||||
|
|
|
@ -30,12 +30,8 @@ choice LSM6DSL_TRIGGER_MODE
|
||||||
depends on LSM6DSL
|
depends on LSM6DSL
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
if SENSOR
|
|
||||||
|
|
||||||
config I2C
|
config I2C
|
||||||
default y
|
default y if SENSOR
|
||||||
|
|
||||||
endif # SENSOR
|
|
||||||
|
|
||||||
if BT
|
if BT
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@
|
||||||
eswifi0 = &wifi0;
|
eswifi0 = &wifi0;
|
||||||
watchdog0 = &iwdg;
|
watchdog0 = &iwdg;
|
||||||
spi-flash0 = &mx25r6435f;
|
spi-flash0 = &mx25r6435f;
|
||||||
|
accel0 = &lsm6dsl;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -116,7 +117,7 @@
|
||||||
reg = <0x5d>;
|
reg = <0x5d>;
|
||||||
};
|
};
|
||||||
|
|
||||||
lsm6dsl@6a {
|
lsm6dsl: lsm6dsl@6a {
|
||||||
compatible = "st,lsm6dsl";
|
compatible = "st,lsm6dsl";
|
||||||
reg = <0x6a>;
|
reg = <0x6a>;
|
||||||
irq-gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
|
irq-gpios = <&gpiod 11 GPIO_ACTIVE_HIGH>;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
aliases {
|
aliases {
|
||||||
magn0 = &lsm303agr_magn;
|
magn0 = &lsm303agr_magn;
|
||||||
accel0 = &lsm303agr_accel;
|
accel0 = &lsm303agr_accel;
|
||||||
|
accel1 = &lsm6dsl;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -24,7 +25,7 @@
|
||||||
reg = <0x5d>;
|
reg = <0x5d>;
|
||||||
};
|
};
|
||||||
|
|
||||||
lsm6dsl@6b {
|
lsm6dsl: lsm6dsl@6b {
|
||||||
compatible = "st,lsm6dsl";
|
compatible = "st,lsm6dsl";
|
||||||
reg = <0x6b>;
|
reg = <0x6b>;
|
||||||
irq-gpios = <&arduino_header 10 GPIO_ACTIVE_HIGH>; /* D4 */
|
irq-gpios = <&arduino_header 10 GPIO_ACTIVE_HIGH>; /* D4 */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue