On 16:39-20241012, Markus Schneider-Pargmann wrote: [...] > > The possible wakeup devices are found by checking which devices are > powered by the regulator supplying the "vddshv_canuart" line. These are > considered possible wakeup sources. Only wakeup sources that are > actually enabled by the user will be considered as a an active wakeup > source. If none of the wakeup sources are enabled the system will do a > normal poweroff. If at least one wakeup source is enabled it will > instead send a TI_SCI_MSG_PREPARE_SLEEP message from the sys_off > handler. Sending this message will result in an immediate shutdown of > the system. No execution is expected after this point. The code will > wait for 5s and do an emergency_restart afterwards if Partial-IO wasn't > entered at that point. > [...] > +static bool tisci_canuart_wakeup_enabled(struct ti_sci_info *info) > +{ > + static const char canuart_name[] = "vddshv_canuart"; > + struct device_node *wakeup_node = NULL; > + > + for (wakeup_node = of_find_node_with_property(NULL, "vio-supply"); > + wakeup_node; > + wakeup_node = of_find_node_with_property(wakeup_node, "vio-supply")) { > + struct device_node *supply_node; > + const char *supply_name; > + struct platform_device *pdev; > + int ret; > + > + supply_node = of_parse_phandle(wakeup_node, "vio-supply", 0); > + if (!supply_node) > + continue; > + > + ret = of_property_read_string(supply_node, "regulator-name", &supply_name); > + of_node_put(supply_node); > + if (ret) { > + dev_warn(info->dev, "Failed to parse vio-supply phandle at %pOF %d\n", > + wakeup_node, ret); > + continue; > + } > + > + if (strncmp(canuart_name, supply_name, strlen(canuart_name))) > + continue; > + > + pdev = of_find_device_by_node(wakeup_node); > + if (!pdev) > + continue; > + > + if (device_may_wakeup(&pdev->dev)) { > + dev_dbg(info->dev, "%pOF identified as wakeup source for Partial-IO\n", > + wakeup_node); > + put_device(&pdev->dev); > + of_node_put(wakeup_node); > + return true; > + } > + put_device(&pdev->dev); > + } > + > + return false; > +} > + What is the binding that supports this? I just do not think that scanning the entire tree for vio-supply implies you will get thr right property here. Just giving an example to illustrate this point: Documentation/devicetree/bindings/net/wireless/ti,wl1251.txt says it needs vio-supply -> so i have a node with the wireless supply as vio-supply -> Since we are scanning from NULL for vio-supply, we hit that, that is a bad choice for enabling io-retention. -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D