From: Jonathan Cameron <jic23@kernel.org>
To: Sean Nyekjaer <sean@geanix.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: accel: fxls8962af: add padding to regmap for SPI
Date: Sat, 22 Jan 2022 18:13:36 +0000 [thread overview]
Message-ID: <20220122181336.61bed571@jic23-huawei> (raw)
In-Reply-To: <20220117074600.gmfonh35ptx6kqbs@skn-laptop.hadsten>
On Mon, 17 Jan 2022 08:46:00 +0100
Sean Nyekjaer <sean@geanix.com> wrote:
> On Mon, Dec 20, 2021 at 01:51:43PM +0100, Sean Nyekjaer wrote:
> > Add missing don't care padding between address and
> > data for SPI transfers
> >
> > Fixes: a3e0b51884ee ("iio: accel: add support for FXLS8962AF/FXLS8964AF accelerometers")
> > Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> > ---
> > drivers/iio/accel/fxls8962af-core.c | 12 ++++++++++--
> > drivers/iio/accel/fxls8962af-i2c.c | 2 +-
> > drivers/iio/accel/fxls8962af-spi.c | 2 +-
> > drivers/iio/accel/fxls8962af.h | 3 ++-
> > 4 files changed, 14 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c
> > index 32989d91b982..f7fd9e046588 100644
> > --- a/drivers/iio/accel/fxls8962af-core.c
> > +++ b/drivers/iio/accel/fxls8962af-core.c
> > @@ -173,12 +173,20 @@ struct fxls8962af_data {
> > u16 upper_thres;
> > };
> >
> > -const struct regmap_config fxls8962af_regmap_conf = {
> > +const struct regmap_config fxls8962af_i2c_regmap_conf = {
> > .reg_bits = 8,
> > .val_bits = 8,
> > .max_register = FXLS8962AF_MAX_REG,
> > };
> > -EXPORT_SYMBOL_GPL(fxls8962af_regmap_conf);
> > +EXPORT_SYMBOL_GPL(fxls8962af_i2c_regmap_conf);
> > +
> > +const struct regmap_config fxls8962af_spi_regmap_conf = {
> > + .reg_bits = 8,
> > + .pad_bits = 8,
> > + .val_bits = 8,
> > + .max_register = FXLS8962AF_MAX_REG,
> > +};
> > +EXPORT_SYMBOL_GPL(fxls8962af_spi_regmap_conf);
> >
> > enum {
> > fxls8962af_idx_x,
> > diff --git a/drivers/iio/accel/fxls8962af-i2c.c b/drivers/iio/accel/fxls8962af-i2c.c
> > index cfb004b20455..6bde9891effb 100644
> > --- a/drivers/iio/accel/fxls8962af-i2c.c
> > +++ b/drivers/iio/accel/fxls8962af-i2c.c
> > @@ -18,7 +18,7 @@ static int fxls8962af_probe(struct i2c_client *client)
> > {
> > struct regmap *regmap;
> >
> > - regmap = devm_regmap_init_i2c(client, &fxls8962af_regmap_conf);
> > + regmap = devm_regmap_init_i2c(client, &fxls8962af_i2c_regmap_conf);
> > if (IS_ERR(regmap)) {
> > dev_err(&client->dev, "Failed to initialize i2c regmap\n");
> > return PTR_ERR(regmap);
> > diff --git a/drivers/iio/accel/fxls8962af-spi.c b/drivers/iio/accel/fxls8962af-spi.c
> > index 57108d3d480b..6f4dff3238d3 100644
> > --- a/drivers/iio/accel/fxls8962af-spi.c
> > +++ b/drivers/iio/accel/fxls8962af-spi.c
> > @@ -18,7 +18,7 @@ static int fxls8962af_probe(struct spi_device *spi)
> > {
> > struct regmap *regmap;
> >
> > - regmap = devm_regmap_init_spi(spi, &fxls8962af_regmap_conf);
> > + regmap = devm_regmap_init_spi(spi, &fxls8962af_spi_regmap_conf);
> > if (IS_ERR(regmap)) {
> > dev_err(&spi->dev, "Failed to initialize spi regmap\n");
> > return PTR_ERR(regmap);
> > diff --git a/drivers/iio/accel/fxls8962af.h b/drivers/iio/accel/fxls8962af.h
> > index b67572c3ef06..9cbe98c3ba9a 100644
> > --- a/drivers/iio/accel/fxls8962af.h
> > +++ b/drivers/iio/accel/fxls8962af.h
> > @@ -17,6 +17,7 @@ int fxls8962af_core_probe(struct device *dev, struct regmap *regmap, int irq);
> > int fxls8962af_core_remove(struct device *dev);
> >
> > extern const struct dev_pm_ops fxls8962af_pm_ops;
> > -extern const struct regmap_config fxls8962af_regmap_conf;
> > +extern const struct regmap_config fxls8962af_i2c_regmap_conf;
> > +extern const struct regmap_config fxls8962af_spi_regmap_conf;
> >
> > #endif /* _FXLS8962AF_H_ */
> > --
> > 2.34.1
> >
>
> Hi Jonathan,
>
> Did you have time to look at this?
Sorry, saw it go by but bad timing wrt to opening of merge window
so it was still in my 'to apply' queue.
Anyhow, now done so and it is in the fixes-togreg branch of iio.git +
marked for stable.
Note I'll probably rebase that tree after rc1 though as we have a few
other fixes I'd like in the same pull request for stuff that only
went in this cycle.
Thanks,
Jonathan
>
> /Sean
prev parent reply other threads:[~2022-01-22 18:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-20 12:51 [PATCH] iio: accel: fxls8962af: add padding to regmap for SPI Sean Nyekjaer
2022-01-17 7:46 ` Sean Nyekjaer
2022-01-22 18:13 ` Jonathan Cameron [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=20220122181336.61bed571@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sean@geanix.com \
/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