I have a BLE peripheral device using i2c, gpio. When the peripheral is not connected I want the lowest power consumption possible.
when i try to turn off gpio:
//sleep
int err = device_set_power_state(gpio_dev, DEVICE_PM_OFF_STATE, NULL, NULL);
if (err) {
printk("power down not successful %d\n", err);
}
An error is returned, 0x86. 0x86 is not listed in errno.h so I don't know what it means. I also tried setting gpio to DEVICE_PM_LOW_POWER_STATE, but I get the same error.
Is changing gpio not allowed because it's too crucial for the device?