#asahi-dev · 2026-04-13 18:58
chaos_princessto your Makefile#asahi-dev · 2026-04-13 18:56
chaos_princessrustc is being called wrong by something#asahi-dev · 2026-04-13 18:55
chaos_princessyou should not be adding no_std, something went very wrong when compiling your thing#asahi-dev · 2026-04-13 18:38
chaos_princessyou are having two modules under the same one#asahi-dev · 2026-04-13 18:38
chaos_princessget your own config symbol#asahi-dev · 2026-04-13 18:37
chaos_princesscan you also show the Makefile segment for it?#asahi-dev · 2026-04-13 18:33
chaos_princesswhat is your file name#asahi-dev · 2026-04-12 19:54
chaos_princessso the child driver can get it#asahi-dev · 2026-04-12 19:53
chaos_princessand the parent driver puts a reference to itself into it's driver data#asahi-dev · 2026-04-12 19:49
chaos_princesshttps://github.com/AsahiLinux/linux/blob/asahi/sound/soc/apple/aop_audio.rs#L676-L679 - you do something like this in probe, store the trait object, and then just call methods on it#asahi-dev · 2026-04-12 19:46
chaos_princessit is based on a real thing that exists in aop firmware, but my point is that you can just make stuff up#asahi-dev · 2026-04-12 19:44
chaos_princessEPIC exists for like 2 devices, aop and dcp, nothing else has it, so for all intents and purposes, it is just a thing 2 drivers use to communicate#asahi-dev · 2026-04-12 19:43
chaos_princessyou can put whatever you want there#asahi-dev · 2026-04-12 19:43
chaos_princessso what#asahi-dev · 2026-04-12 19:41
chaos_princessthat is the driver, and the shared trait is here https://github.com/AsahiLinux/linux/blob/asahi/rust/kernel/soc/apple/aop.rs#L24#asahi-dev · 2026-04-12 19:38
chaos_princessand there is a trait under rust/kernel that defines what calls are there#asahi-dev · 2026-04-12 19:38
chaos_princessif you look at aop_audio's initialization, there is a step that pulls out a reference to aop, and then just calls methods on it.#asahi-dev · 2026-04-12 19:34
chaos_princessotherwise - you have to do it yourself#asahi-dev · 2026-04-12 19:34
chaos_princessif you do separate device for each entry, you get the power sequencing for free. #asahi-dev · 2026-04-12 19:33
chaos_princesshttps://github.com/AsahiLinux/linux/blob/asahi-wip/arch/arm64/boot/dts/apple/t600x-die0.dtsi#L76 - this#asahi-dev · 2026-04-12 19:32
chaos_princessyou have to do it manually from the driver instead of getting linux core to do it for you#asahi-dev · 2026-04-12 19:30
chaos_princessmaybe? the reason i split the reporting entries into separate devices is so i get the power ordering "for free" via genpd. if you look at the device trees for pmp v2, the entries themselves have power-domains entries that ensure the order of pmgr -> pmp -> device itself#asahi-dev · 2026-04-12 19:28
chaos_princessso everything is one big driver?#asahi-dev · 2026-04-12 16:47
chaos_princessrun `make rustavailable`#asahi-dev · 2026-04-12 14:37
chaos_princessadd the headers you need here and rebuild https://github.com/AsahiLinux/linux/blob/asahi-wip/rust/bindings/bindings_helper.h#asahi-dev · 2026-04-12 14:33
chaos_princesscorrect. you make an abstraction that uses bindings::, put that in rust/kernel, then use that one from the driver#asahi-dev · 2026-04-12 14:32
chaos_princessthe bulk of the code should be in init i think#asahi-dev · 2026-04-12 14:32
chaos_princessi am suggesting to just make genpd bindings yourself and do that part in rust too#asahi-dev · 2026-04-12 14:30
chaos_princessi am confused now#asahi-dev · 2026-04-12 14:29
chaos_princesswait, but you said that you got the genpd binding?#asahi-dev · 2026-04-12 14:28
chaos_princessso, what is missing?#asahi-dev · 2026-04-12 14:28
chaos_princessthat would work. But making your own for genpd shouldn't be hard#asahi-dev · 2026-04-12 14:26
chaos_princessimo, stick with either c or rust. i got away with it since in my case the sides basically do not interact, but i don't think it will work for v1#asahi-dev · 2026-04-12 14:21
chaos_princesstryhard[m]: no, aop is an example of how to make two rust drivers talk#asahi-dev · 2026-04-12 12:03
chaos_princessdoesn't it auto-boot after a few seconds?#asahi-dev · 2026-04-12 12:01
chaos_princessyes, it is in the installed fedora #asahi-dev · 2026-04-12 11:56
chaos_princessit is under /boot, next to vmlinuz files#asahi-dev · 2026-04-12 11:50
chaos_princessis the fedora one not working?#asahi-dev · 2026-04-11 21:46
chaos_princesslook at what aop and aop_audio do#asahi-dev · 2026-04-11 21:46
chaos_princessno.#asahi-dev · 2026-04-11 21:45
chaos_princessyour two drivers?#asahi-dev · 2026-04-11 21:29
chaos_princessit is in rust/kernel/soc/apple/rtkit.rs#asahi-dev · 2026-04-11 21:29
chaos_princessno?#asahi-dev · 2026-04-11 21:28
chaos_princessyou can use bindings:: from that one#asahi-dev · 2026-04-11 21:28
chaos_princessthat part is in the kernel crate, no in the drivers crate#asahi-dev · 2026-04-11 21:26
chaos_princessthats because we have rtkit abstractions#asahi-dev · 2026-04-11 21:26
chaos_princessbasically, you aren't supposed to use anything under bindings:: from drivers directly, if you do that, it is not upstreamable#asahi-dev · 2026-04-11 21:25
chaos_princessi mean full abstractions.#asahi-dev · 2026-04-11 21:23
chaos_princessthough genpd bindings don't look that hard to make#asahi-dev · 2026-04-11 21:22
chaos_princessyea, kinda why i have the c/rust split :P