All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jochen Henneberg <jh@henneberg-systemdesign.com>
To: Arnav Kapoor <kapoorarnav43@gmail.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, 04 Dec 2026 11:52:46 +0100	[thread overview]
Message-ID: <87se0ds4g1.fsf@henneberg-systemdesign.com> (raw)
In-Reply-To: <20261204092525.690676-1-kapoorarnav43@gmail.com>

Thanks for the quick feedback,

> 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.

Would it make sense to also leave a note in the bindings description
that the gpio is used by a reset controller? Because then it's obvious
that a reference to a reset controller would also work. Or maybe add
such an example to the bindings?

>
> - 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.

Will wait for further feedback then.

>
>> +#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.

I prepared the requested changes for the next version. I dropped the
messages, I wanted to remove them anyway, just used them to get an
explicit feedback during testing.

Regards
-Jochen

      reply	other threads:[~2026-12-04 10:53 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
2026-12-04 10:52   ` Jochen Henneberg [this message]

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=87se0ds4g1.fsf@henneberg-systemdesign.com \
    --to=jh@henneberg-systemdesign.com \
    --cc=andrea.merello@iit.it \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=kapoorarnav43@gmail.com \
    --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 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.