-
Notifications
You must be signed in to change notification settings - Fork 5.2k
mpu6050 device tree overlay #2031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
fd0b9e7
e7ad416
522b369
62544f9
f0c1395
03b5e40
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Definitions for MPU6050 | ||
/dts-v1/; | ||
/plugin/; | ||
|
||
/ { | ||
compatible = "brcm,bcm2708"; | ||
|
||
fragment@0 { | ||
target = <&i2c1>; | ||
__overlay__ { | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
status = "okay"; | ||
clock-frequency = <400000>; | ||
|
||
mpu6050: inv-mpu6050@68 { | ||
compatible = "invensense,mpu6050"; | ||
reg = <0x68>; | ||
interrupt-parent = <&gpio>; | ||
interrupts = <4 1>; | ||
}; | ||
}; | ||
}; | ||
|
||
__overrides__ { | ||
mpu6050_interrupt_pin = <&mpu6050>,"interrupts:0"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need to qualify the parameter name with the device name - the parameters exposed by an overlay are only in scope until the next overlay is loaded, so it is safe to have multiple overlays all using the same parameter names. Other overlays have used |
||
}; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1171,6 +1171,8 @@ CONFIG_IIO=m | |
CONFIG_IIO_BUFFER=y | ||
CONFIG_IIO_BUFFER_CB=m | ||
CONFIG_IIO_KFIFO_BUF=m | ||
CONFIG_INV_MPU6050_IIO=m | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't what savedefconfig generates - I get:
Setting INV_MPU6050_I2C is enough to imply INV_MPU6050_IIO, IIO_BUFFER and IIO_KFIFO_BUF. The order in the Kconfig files determines where they should go. Using |
||
CONFIG_INV_MPU6050_I2C=m | ||
CONFIG_MCP320X=m | ||
CONFIG_MCP3422=m | ||
CONFIG_DHT11=m | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the other entries are in strict alphabetical order - please do the same. As well as being tidy and logical it helps to avoid merge conflicts.