On Tue, Aug 29, 2017 at 02:59:58PM -0300, Jared McNeill wrote: > I'm not opposed to having a compile time option or sysctl -- but if we do I > think we should try to make it MI. In theory an ACPI capable x86 board could > have this problem as well..
Sure. The problem is more which poweroff callback to choose when there are several available. > > For axp specifically I think the right place to put it would be as a > properly for the PMIC node in the device tree to disable poweroff. Yes, I though about this too, and I agree. > This way > we can set it on a per-board basis. I didn't see one in the current binding > docs, so we'd want to coordinate with the linux-sunxi folks on that. sure. > > For a personnal project (for those curious, available at > > https://github.com/mbouyer/marine_chartplotter) I embeeded a olimex lime2 > > in a case, along with a power/interface board. I did develop a driver for > > the external power controller, and in such a case I don't want the > > power hook of the axp20x to be called. I don't think this use case is > > uncommon ... > > Looking at your driver: > > https://github.com/mbouyer/marine_chartplotter/blob/master/software/NetBSD/driver/picbmc.c#L137 > > By taking over cpu_powerdown_address this will bypass the FDT hooks, so you > should be ok here. But it depends on the order in which the devices are probed/attached, isn't it ? -- Manuel Bouyer <bou...@antioche.eu.org> NetBSD: 26 ans d'experience feront toujours la difference --