From: Angel Iglesias <ang.iglesiasg@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-iio@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Nikita Yushchenko <nikita.yoush@cogentembedded.com>,
Paul Cercueil <paul@crapouillou.net>,
Ulf Hansson <ulf.hansson@linaro.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Andreas Klinger <ak@it-klinger.de>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/5] iio: pressure: bmp280: Add preinit callback
Date: Sun, 01 Jan 2023 12:06:08 +0100 [thread overview]
Message-ID: <a46de52484ee62e073c80d0f2ddeebdcf8308c07.camel@gmail.com> (raw)
In-Reply-To: <Y6tmcRlHCZTgT9jS@smile.fi.intel.com>
On Tue, 2022-12-27 at 23:41 +0200, Andy Shevchenko wrote:
> On Mon, Dec 26, 2022 at 03:29:21PM +0100, Angel Iglesias wrote:
> > Adds preinit callback to execute operations on probe before applying
> > initial configuration.
>
> ...
>
> > @@ -935,6 +936,7 @@ static const struct bmp280_chip_info bmp280_chip_info =
> > {
> > .read_temp = bmp280_read_temp,
> > .read_press = bmp280_read_press,
> > .read_calib = bmp280_read_calib,
> > + .preinit = NULL,
> > };
> >
> > static int bme280_chip_config(struct bmp280_data *data)
> > @@ -979,6 +981,7 @@ static const struct bmp280_chip_info bme280_chip_info =
> > {
> > .read_press = bmp280_read_press,
> > .read_humid = bmp280_read_humid,
> > .read_calib = bme280_read_calib,
> > + .preinit = NULL,
> > };
>
> Useless changes.
>
> ...
>
> > @@ -1604,6 +1614,7 @@ static const struct bmp280_chip_info bmp180_chip_info
> > = {
> > .read_temp = bmp180_read_temp,
> > .read_press = bmp180_read_press,
> > .read_calib = bmp180_read_calib,
> > + .preinit = NULL,
> > };
>
> Ditto.
>
> ...
>
> > + /*
> > + * Some chips like the BMP3xx have preinit tasks to run
> > + * before applying the initial configuration.
> > + */
> > + if (data->chip_info->preinit) {
> > + ret = data->chip_info->preinit(data);
>
> > + dev_err(dev, "error running preinit tasks");
>
> Huh?! I guess you wanted
The dangers of copying paste and rushing things etc. Sorry for this brain fart!
Thanks for your time,
Angel
> > if (ret < 0)
> > return ret;
>
> if (ret < 0)
> return dev_err_probe(...);
>
> > }
>
next prev parent reply other threads:[~2023-01-01 11:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-26 14:29 [PATCH v2 0/5] Add support for pressure sensor Bosch BMP580 Angel Iglesias
2022-12-26 14:29 ` [PATCH v2 1/5] iio: pressure: bmp280: Add enumeration to handle chip variants Angel Iglesias
2022-12-27 21:37 ` Andy Shevchenko
2023-01-01 11:04 ` Angel Iglesias
2023-01-08 12:41 ` Jonathan Cameron
2022-12-30 18:14 ` Jonathan Cameron
2023-01-01 10:56 ` Angel Iglesias
2022-12-26 14:29 ` [PATCH v2 2/5] iio: pressure: bmp280: Add preinit callback Angel Iglesias
2022-12-27 21:41 ` Andy Shevchenko
2023-01-01 11:06 ` Angel Iglesias [this message]
2022-12-30 18:18 ` Jonathan Cameron
2023-01-01 11:09 ` Angel Iglesias
2022-12-26 14:29 ` [PATCH v2 3/5] iio: pressure: bmp280: Add support for new sensor BMP580 Angel Iglesias
2022-12-29 17:35 ` Christophe JAILLET
2022-12-29 18:23 ` Angel Iglesias
2022-12-30 18:22 ` Jonathan Cameron
2023-01-01 11:16 ` Angel Iglesias
2023-01-08 12:35 ` Jonathan Cameron
2023-01-12 10:38 ` Contact Bosch-Sensortec (BST/SA)
2022-12-30 18:45 ` Jonathan Cameron
2023-01-01 11:46 ` Angel Iglesias
2023-01-08 12:38 ` Jonathan Cameron
2022-12-26 14:29 ` [PATCH v2 4/5] dt-bindings: iio: pressure: bmp085: Add BMP580 compatible string Angel Iglesias
2022-12-27 8:11 ` Krzysztof Kozlowski
2022-12-26 14:29 ` [PATCH v2 5/5] iio: pressure: bmp280: Add nvmem operations for BMP580 Angel Iglesias
2022-12-30 18:49 ` Jonathan Cameron
2023-01-01 11:48 ` Angel Iglesias
2022-12-26 22:05 ` [PATCH v2 4/5] dt-bindings: iio: pressure: bmp085: Add BMP580 compatible string Rob Herring
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=a46de52484ee62e073c80d0f2ddeebdcf8308c07.camel@gmail.com \
--to=ang.iglesiasg@gmail.com \
--cc=ak@it-klinger.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikita.yoush@cogentembedded.com \
--cc=paul@crapouillou.net \
--cc=rafael.j.wysocki@intel.com \
--cc=robh+dt@kernel.org \
--cc=ulf.hansson@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).