All of lore.kernel.org
 help / color / mirror / Atom feed
* Question about bno055 mismatched reset gpio logical/physical state
@ 2026-08-07  8:30 Jochen Henneberg
  0 siblings, 0 replies; only message in thread
From: Jochen Henneberg @ 2026-08-07  8:30 UTC (permalink / raw)
  To: linux-iio

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-07  8:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07  8:30 Question about bno055 mismatched reset gpio logical/physical state Jochen Henneberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.