Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/dev/i2c



On Tue, 29 Aug 2017, Manuel Bouyer wrote:

I'd like to have a way to disable this (a compile-time option would be OK
for me).

On evaluation boards (like cubieboard, or olimex lime2), you may have
a power button on the board itself but you don't have a way to add an external
power button (e.g. if you put the board in a case), so once powered off
you have to power-cycle it.

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..

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. 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.

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.

Cheers,
Jared


Home | Main Index | Thread Index | Old Index