From: Jakob Hauser <jahau@rocketmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Hans de Goede <hdegoede@redhat.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
phone-devel@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
Jakob Hauser <jahau@rocketmail.com>
Subject: [PATCH v2 2/7] iio: magnetometer: yas530: Change range of data in volatile register
Date: Mon, 13 Jun 2022 03:17:09 +0200 [thread overview]
Message-ID: <02ece5db210dcee7511a3c322ca81041c6ebf8d1.1655081082.git.jahau@rocketmail.com> (raw)
In-Reply-To: <cover.1655081082.git.jahau@rocketmail.com>
In function yas5xx_volatile_reg(), the range for measure data should end at
"YAS5XX_MEASURE_DATA + 7" instead of "+ 8" as we count from 0 to 7 here.
This change is of low importance as the "+ 8" register isn't called.
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jakob Hauser <jahau@rocketmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/iio/magnetometer/yamaha-yas530.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/magnetometer/yamaha-yas530.c b/drivers/iio/magnetometer/yamaha-yas530.c
index b58a9c51e9ff..2d71ae837bf5 100644
--- a/drivers/iio/magnetometer/yamaha-yas530.c
+++ b/drivers/iio/magnetometer/yamaha-yas530.c
@@ -527,7 +527,7 @@ static bool yas5xx_volatile_reg(struct device *dev, unsigned int reg)
{
return reg == YAS5XX_ACTUATE_INIT_COIL ||
reg == YAS5XX_MEASURE ||
- (reg >= YAS5XX_MEASURE_DATA && reg <= YAS5XX_MEASURE_DATA + 8);
+ (reg >= YAS5XX_MEASURE_DATA && reg <= YAS5XX_MEASURE_DATA + 7);
}
/* TODO: enable regmap cache, using mark dirty and sync at runtime resume */
--
2.35.1
next prev parent reply other threads:[~2022-06-13 1:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1655081082.git.jahau.ref@rocketmail.com>
2022-06-13 1:15 ` [PATCH v2 0/7] Add support for magnetometer Yamaha YAS537 Jakob Hauser
2022-06-13 1:17 ` [PATCH v2 1/7] iio: magnetometer: yas530: Change data type of hard_offsets to signed Jakob Hauser
2022-06-13 1:17 ` Jakob Hauser [this message]
2022-06-13 1:17 ` [PATCH v2 3/7] iio: magnetometer: yas530: Correct scaling of magnetic axes Jakob Hauser
2022-06-13 1:17 ` [PATCH v2 4/7] iio: magnetometer: yas530: Correct temperature handling Jakob Hauser
2022-06-13 15:01 ` Andy Shevchenko
2022-06-15 21:18 ` Jakob Hauser
2022-06-13 1:17 ` [PATCH v2 5/7] iio: magnetometer: yas530: Change data type of calibration coefficients Jakob Hauser
2022-06-13 1:17 ` [PATCH v2 6/7] iio: magnetometer: yas530: Rename functions and registers Jakob Hauser
2022-06-13 1:17 ` [PATCH v2 7/7] iio: magnetometer: yas530: Add YAS537 variant Jakob Hauser
2022-06-13 15:20 ` Andy Shevchenko
2022-06-13 15:22 ` Andy Shevchenko
2022-06-15 21:51 ` Jakob Hauser
2022-06-15 21:43 ` Jakob Hauser
2022-06-15 22:00 ` Jakob Hauser
2022-06-18 14:15 ` Jonathan Cameron
2022-06-13 15:23 ` [PATCH v2 0/7] Add support for magnetometer Yamaha YAS537 Andy Shevchenko
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=02ece5db210dcee7511a3c322ca81041c6ebf8d1.1655081082.git.jahau@rocketmail.com \
--to=jahau@rocketmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=hdegoede@redhat.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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.