kernel: sys_clock: update weak pm control function

The weak implementation returns 0 for all operations without doing
anything, which incorrectly suggests that an operation like
device_get_power_state() returned an accurate description of the
system clock power state.  Return -ENOTSUP instead.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
Peter Bigot 2020-05-20 09:00:26 -05:00 committed by Carles Cufí
commit de9ed4e6a1

View file

@ -31,7 +31,7 @@ int __weak z_clock_driver_init(struct device *device)
int __weak z_clock_device_ctrl(struct device *device, u32_t ctrl_command,
void *context, device_pm_cb cb, void *arg)
{
return 0;
return -ENOTSUP;
}
void __weak z_clock_set_timeout(s32_t ticks, bool idle)