Skip to content

How to define channels for ti,ads1x1x-base #61960

Closed Answered by naNEQ
naNEQ asked this question in Q&A
Discussion options

You must be logged in to vote

To reply my own question, I think I found the answer. The following worked just perfect (at least I can build, I haven't tried it on a real hardware to see if it works yet) and if I understand it correctly, I think the problem was that I was missing the two parameters "#address-cells" and "#size-cells".

&i2c0 {
	lis2dh@18 {
		compatible = "st,lis2dh";
		label = "LIS2DH";
		reg = <0x18>;
		irq-gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>, <&gpio0 30 GPIO_ACTIVE_HIGH>;
		disconnect-sdo-sa0-pull-up;
	};
	i2c_adc: ads1015@48 {
		compatible = "ti,ads1015";
		reg = <0x48>;
		#io-channel-cells = <1>;
		#address-cells = <1>;
		#size-cells = <0>;
		channel@0 {
			reg = <0>;
			zephyr,gain = "ADC_GAIN_1";
			

Replies: 6 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by naNEQ
Comment options

You must be logged in to vote
4 replies
@naNEQ
Comment options

@hubert-tt
Comment options

@naNEQ
Comment options

@hubert-tt
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@naNEQ
Comment options

@GilDev
Comment options

@GastonMelo
Comment options

@GilDev
Comment options

Comment options

You must be logged in to vote
2 replies
@GastonMelo
Comment options

@naNEQ
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants