Linux IIO development
 help / color / mirror / Atom feed
From: Arnav Kapoor <kapoorarnav43@gmail.com>
To: Jochen Henneberg <jh@henneberg-systemdesign.com>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Maoyi Xie" <maoyixie.tju@gmail.com>,
	"Andrea Merello" <andrea.merello@iit.it>,
	linux-iio@vger.kernel.org
Subject: Re: [PATCH v2] iio: imu: bno055: Fix reset pin operation
Date: Fri,  4 Dec 2026 14:55:25 +0530	[thread overview]
Message-ID: <20261204092525.690676-1-kapoorarnav43@gmail.com> (raw)
In-Reply-To: <20261204084844.141321-1-jh@henneberg-systemdesign.com>

On Fri, Dec 04, 2026 at 09:48:43AM +0100, Jochen Henneberg wrote:
> The reset input is low-active and this is how the dt bindings example
> configures it. However, the driver code treats it as high-active
> because the gpio functions set the logical state not the physical
> state.
>
> Instead of using the gpio the driver now probes for a reset
> controller.

Thanks for the respin. The logic looks right to me now: reset-gpio
requests the line asserted, probe deasserts it after 5-10 ms, and
bno055_system_reset() asserts then deasserts. It applies to
iio/testing, and checkpatch --strict and a W=1 build are clean.

Some comments:

- The DT still describes the line as reset-gpios, so it now only works
  when CONFIG_RESET_GPIO is enabled (see my reply to your question on
  v1). Please say that in the commit message. It would also help to
  say why the driver switches to the reset API (Andy's request) rather
  than only flipping the values.

- Fixes: and stable. The reset-gpio driver only exists since v6.9
  (cee544a40e44), but the bno055 driver is in v6.1. If this goes to
  6.1 or 6.6 stable as is, the reset is silently lost there. One option
  is a 2-patch series: your v1 polarity fix with the Fixes: tag first,
  then the conversion to the reset API without it. Jonathan may prefer
  something else, though.

> +#include <linux/reset.h>
>  #include <linux/module.h>

Please keep the includes sorted: this goes after linux/regmap.h.

> +	else if (!priv->reset)
> +		dev_info(dev, "No reset controller, fallback to reset register\n");
> +	else
> +		dev_info(dev, "Using reset controller\n");

I'd drop these two messages (or make them dev_dbg()). The driver
already warns when there is no usable reset method at all, and
otherwise a successful probe shouldn't need to print anything.

Thanks,
Arnav

  reply	other threads:[~2026-12-04  9:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  8:48 [PATCH v2] iio: imu: bno055: Fix reset pin operation Jochen Henneberg
2026-12-04  9:25 ` Arnav Kapoor [this message]
2026-12-04 10:52   ` Jochen Henneberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204092525.690676-1-kapoorarnav43@gmail.com \
    --to=kapoorarnav43@gmail.com \
    --cc=andrea.merello@iit.it \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jh@henneberg-systemdesign.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=maoyixie.tju@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=p.zabel@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox