Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Unable to get TCA9548A to work #45714

Closed
npant333 opened this issue May 17, 2022 · 1 comment
Closed

Unable to get TCA9548A to work #45714

npant333 opened this issue May 17, 2022 · 1 comment
Labels
bug The issue is a bug, or the PR is fixing a bug

Comments

@npant333
Copy link

I am trying to use TCA9548A using zephyr. The following code returns error that "Device is not ready". I have connected the hardware properly i.e. SDA/SCL/GND/Vcc are connected properly between my processor and TCA9548A

Any help in what is not correct here?

const struct device *i2c_dev = device_get_binding(DEVICE_DT_GET(DT_NODELABEL(ch0)));
if (!device_is_ready(i2c_dev)) {
printk("Device is not ready.\n");
return;
}

The overlay file is as follows

&i2c0 {
status = "okay";
mux: tca9548a@70 {
compatible = "ti,tca9548a";
reg = <0x70>;
status = "okay";
label = "i2c_mux";
#address-cells = <1>;
#size-cells = <0>;

	ch0: mux_i2c@0 {
		compatible = "ti,tca9548a-channel";
		label = "mux_dw_0";
		reg = <0>;
		#address-cells = <1>;
		#size-cells = <0>;
	};

	ch1: mux_i2c@1 {
		compatible = "ti,tca9548a-channel";
		label = "mux_dw_1";
		reg = <1>;
		#address-cells = <1>;
		#size-cells = <0>;
    };
};

};

@npant333 npant333 added the bug The issue is a bug, or the PR is fixing a bug label May 17, 2022
@carlocaione
Copy link
Collaborator

const struct device *i2c_dev = DEVICE_DT_GET(DT_NODELABEL(ch0));

@carlescufi carlescufi changed the title Unable to get TCA9548A work Unable to get TCA9548A to work May 17, 2022
@zephyrproject-rtos zephyrproject-rtos locked and limited conversation to collaborators May 17, 2022
@carlescufi carlescufi converted this issue into discussion #45742 May 17, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

No branches or pull requests

2 participants