Skip to content

usb: skip usb_i2c_restore_irqs on models where i2c is not present#508

Merged
jannau merged 1 commit intoAsahiLinux:mainfrom
yuyuyureka:t8132-usb-i2c
Oct 25, 2025
Merged

usb: skip usb_i2c_restore_irqs on models where i2c is not present#508
jannau merged 1 commit intoAsahiLinux:mainfrom
yuyuyureka:t8132-usb-i2c

Conversation

@yuyuyureka
Copy link
Contributor

This prevents a crash while chainloading

@yuyuyureka yuyuyureka changed the title Use i2c2 for J773gAP usb usb: skip usb_i2c_restore_irqs on models where i2c is not present Oct 22, 2025
Signed-off-by: Yureka <yureka@cyberchaos.dev>
Copy link
Member

@jannau jannau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are random thoughts while looking at the change, no need to change anything.


/*
* M3 models do not use i2c, but instead SPMI with a new controller.
* M3/M4 models do not use i2c, but instead SPMI with a new controller.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: M5 as well

* Do not try to restore irqs on M3/M4 which don't use i2c
*/
if (adt_path_offset(adt, "/arm-io/nub-spmi-a0/hpm0") > 0)
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This starts growing to a level where we probably should start thinking of adding some sort of device abstraction like Sven did with CPU initialization and I started for display initialization.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be possible to iterate the i2c and spmi nodes in the ADT and find the ones which have the usbc,manager, and initialize those without adding specialized code for each series/model?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that would be a possibility as well

@jannau jannau merged commit e321738 into AsahiLinux:main Oct 25, 2025
7 checks passed
@yuyuyureka yuyuyureka deleted the t8132-usb-i2c branch October 25, 2025 11:25
mildsunrise added a commit to mildsunrise/m1n1 that referenced this pull request Nov 28, 2025
revert AsahiLinux#365 (+ part of AsahiLinux#508) and instead use the appropriate transport as necessary
mildsunrise added a commit to mildsunrise/m1n1 that referenced this pull request Nov 30, 2025
revert AsahiLinux#365 (+ part of AsahiLinux#508) and instead use the appropriate transport as necessary
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.

3 participants