Description
When the argument to machine.lightsleep() or machine.deepsleep() is negative, the ports behave different. Even if that is an unreasonable value, the behavior should be consistent and well behaving.
stm32: return shortly after the call. The time seems not to depend on the value.
renesas-ra: treat negative numbers like 4 ms.
rp2: wait in a call to mp_hal_delay_ms() until the numbers match.
mimxrt: behave as if being called without an argument. Get woken by an interrupt at the WAKEUP pin.
samd: behave as if being called without an argument. Wake up if a Pin irq happens.
esp32: Ignore the value and return immediately
esp8266; Ignore the value and return immediately
So the best options are either a) raising an error or b ) silent immediate return. I can make a PR for any of them, and I prefer b).