Skip to content

do not ignore sysfs class being zero - #619

Open
N3xp7im3 wants to merge 1 commit into
rockowitz:2.2.8-devfrom
N3xp7im3:sysfs-class-being-zero
Open

do not ignore sysfs class being zero#619
N3xp7im3 wants to merge 1 commit into
rockowitz:2.2.8-devfrom
N3xp7im3:sysfs-class-being-zero

Conversation

@N3xp7im3

Copy link
Copy Markdown

Since commit [1] an i2c bus gets ignored when no corresponding class file is found.

This causes platforms, where the i2c host controller is not connect via PCIe, to be ignored completely, even though the bus is still valid. This makes the ddcutil useless on those platforms.

The absence of such a file is not enough to tell whether a bus is valid or not. Partially revert commit [1], to avoid ignoring an i2c bus

[1] 3df4af0 ("add comments re invalid bus number in i2c_device_sysfs_class(), is_ignorable_i2c_device()")

Since commit [1] an i2c bus gets ignored when no corresponding class
file is found.

This causes platforms, where the i2c host controller is not connect via PCIe, to be ignored completely, even
though the bus is still valid. This makes the ddcutil useless on those
platforms.

The absence of such a file is not enough to tell whether a bus is valid or not.
Partially revert commit [1], to avoid ignoring an i2c bus

[1] 3df4af0 ("add comments re invalid bus number in i2c_device_sysfs_class(), is_ignorable_i2c_device()")

Signed-off-by: Fabian Pfitzner <f.pfitzner@pengutronix.de>
@sonarqubecloud

Copy link
Copy Markdown

@rockowitz

Copy link
Copy Markdown
Owner

What precisely is the hardware platform in question? Please run sudo ddcutil interrogate and submit the output as an attachment. I need to better understand what is going on before relaxing the check.

@N3xp7im3

Copy link
Copy Markdown
Author

I'm using a Skov I.MX8MP CPU board matching this Device Tree. I build a customized Yocto image based on scarthgap. The kernel I'm using is 6.14.11.

I think it is not usual on ARM/i.MX8 that the i2c controller has a PCIe parent that exposes this class file. This seems like the cause of my problem.

Here you find the output of ddcutil interrogate in two versions:
log_with_my_patch.txt
log_without_my_patch.txt

rockowitz added a commit that referenced this pull request Jul 25, 2026
…ot found on SOC system

- added sysfs_is_soc_system()
- safer version of pull request #619
@rockowitz

Copy link
Copy Markdown
Owner

Commit 1a4871e to branch 2.2.8-dev implements a more conservative version of your patch. If the device adapter class is not found (sysfs adapter class 0), the /dev/i2c device is not ignored on a SOC system.

Let me know if this resolves your problem.

@N3xp7im3

Copy link
Copy Markdown
Author

Thank you very much. This solves my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants