Question about bno055 mismatched reset gpio logical/physical state
Hi,
I just stumbled over a mismatch in bno055 where the wrong logical states for the reset gpio are set and I'm not sure how to deal with it.
Looking at:
static int bno055_system_reset(struct bno055_priv *priv)
{
int ret;
if (priv->reset_gpio) {
gpiod_set_value_cansleep(priv->reset_gpio, 0);
usleep_range(5000, 10000);
gpiod_set_value_cansleep(priv->reset_gpio, 1);
} else if (priv->sw_reset) {
ret = regmap_write(priv->regmap, BNO055_SYS_TRIGGER_REG,
BNO055_SYS_TRIGGER_RST_SYS);
if (ret)
return ret;
} else {
return 0;
}
regcache_drop_region(priv->regmap, 0x0, 0xff);
usleep_range(650000, 700000);
return 0;
}To reset the reset is first turned off and then turned on which makes no sense unless the gpio is configured active high for an active low pin. This happens also at another place in the code.
Question is: Does it make sense to provide a patch which will then potentially break dtsi files of many projects? Or should this better get a note in the binding documentation?
Regards
-Jochen