#
✕ nick:yuka
#asahi-dev · 2026-07-07 06:30
yukareturning -EPROBE_DEFER also works from init
#asahi-dev · 2026-07-07 06:29
yukajannau: init is for global structures of the driver/module, probe is for per-device initialization? and the ports are per pcie controller
#asahi-dev · 2026-07-07 05:42
yukaright?
#asahi-dev · 2026-07-07 05:37
yukaI don't think apple_pcie_setup_port should run in init, it should run in probe?
#asahi-dev · 2026-07-07 05:34
yukathere is so much wrong with the code as-is afaict
#asahi-dev · 2026-07-07 05:33
yukachaos_princess: or even just parts of it, or the devices on it
#asahi-dev · 2026-07-06 23:07
yukaAlso suspend support would be nice
#asahi-dev · 2026-07-06 23:05
yukaBut that's an exisiting issue
#asahi-dev · 2026-07-06 23:05
yukaUnloading and loading the driver also crashes hard
#asahi-dev · 2026-07-06 23:05
yukaProbably not :D
#asahi-dev · 2026-07-06 22:51
yukaafter rubberducking with flokli, the remaining pci-pwrctrl questions answered themselves, and I no longer see anything wrong with this approach, so I sent it
#asahi-dev · 2026-07-06 20:03
yukaActually, I think I found a somewhat elegant solution for pwren
#asahi-dev · 2026-07-06 18:58
yukaso one pwren gpio per port
#asahi-dev · 2026-07-06 18:58
yukaso different ports
#asahi-dev · 2026-07-06 18:57
yukabut they are on different pcie-bridges?
#asahi-dev · 2026-07-06 18:53
yukawhich mac device/model?
#asahi-dev · 2026-07-06 18:52
yukais there any case of two pwren-gpios for the same slot?
#asahi-dev · 2026-07-06 18:52
yukawifi and bluetooth have the same pwren-gpio
#asahi-dev · 2026-07-06 18:52
yukain our case they don't?
#asahi-dev · 2026-07-06 18:51
yukaI think I'll need to ask the pci people about some things anyways, so I'm preparing a minimal RFC with something that works but I know isn't good (and then some questions regarding how to make it good)
#asahi-dev · 2026-07-06 17:27
yukaokay, so people back then weren't sure if the regulator should go into the pcie bridge node or in the device node beneath it
#asahi-dev · 2026-07-06 17:15
yukagoes to read old mailing list threads
#asahi-dev · 2026-07-06 17:04
yukabesides powering it on and then off again
#asahi-dev · 2026-07-06 17:03
yukaI'm not sure there is an equivalent to this in the pci-pwrctrl api :(
#asahi-dev · 2026-07-06 17:02
yukadownstream we avoid this: "check whether the GPPIO pin exists but leave it as is" before we even start initializing anything else
#asahi-dev · 2026-07-06 17:00
yukathe other pcie drivers which support pci-pwrctrl don't have special handling for this, so they start initializing, fail and get retried
#asahi-dev · 2026-07-06 16:59
yukaalso console spam
#asahi-dev · 2026-07-06 16:57
yukathat might cause problems if the resources are not fully cleaned up each time
#asahi-dev · 2026-07-06 16:57
yukaHuh, it seems the power on fails with -EPROBE_DEFER multiple times, and because I pass through the error code our entire probe gets called again at a later point?
#asahi-dev · 2026-07-06 16:42
yukait works!
#asahi-dev · 2026-07-06 15:57
yukaYes, I found a good summary here: https://lwn.net/Articles/1052333/
#asahi-dev · 2026-07-06 15:49
yukaOr it needs changes to pcie-apple?
#asahi-dev · 2026-07-06 15:47
yukaOr maybe I misunderstood that pci-pwrctrl-generic could be used for this
#asahi-dev · 2026-07-06 15:36
yukabut could not yet make pci-pwrctrl-generic actually enable the gpios through the regulator
#asahi-dev · 2026-07-06 15:35
yukaI can make it "work" by adding a regulator which is always-on and enables those gpios
#asahi-dev · 2026-07-06 15:34
yukaI wanted to give the pci-pwrctrl-generic a try for the pcie pwren gpios
#asahi-dev · 2026-07-05 14:23
yukaokay, noted
#asahi-dev · 2026-07-05 14:15
yukaI see
#asahi-dev · 2026-07-05 14:14
yukasven: how would we do it if there were actual driver changes?
#asahi-dev · 2026-07-05 13:59
yukaI can prepare the same dt-bindings changes and minimal device trees for t6030/t6031/t6034 based on the downstream ones, or are you already on that?
#asahi-dev · 2026-07-05 13:58
yukasure
#asahi-dev · 2026-07-05 12:27
yukaI think I'll suggest apple,donan-e and apple,donan-p
#asahi-dev · 2026-07-05 12:27
yukaI forgot about those
#asahi-dev · 2026-07-05 12:27
yukaHmm, cpu compatibles will also be fun
#asahi-dev · 2026-07-05 11:35
yukathat will have to wait until tomorrow, locked myself out of the M5
#asahi-dev · 2026-07-05 11:34
yukafair
#asahi-dev · 2026-07-05 11:34
yukaI'm preparing a patch series for M4 right now, I have the device tree in mostly the same state as M3, except for keyboard backlight (I don't have an M4 laptop).
#asahi-dev · 2026-07-05 11:33
yukaI don't know
#asahi-dev · 2026-07-05 11:32
yukaack
#asahi-dev · 2026-07-05 11:32
yukanot that I know of

plus ›