From: Lee Jones <lee.jones@linaro.org>
To: Adam Ward <adam.ward.opensource@diasemi.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>,
Support Opensource <support.opensource@diasemi.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] mfd: da9052: Fix register access via SPI
Date: Wed, 4 Mar 2015 18:44:58 +0000 [thread overview]
Message-ID: <20150304184458.GN32624@x1> (raw)
In-Reply-To: <856964c7285656c88f23d0bcd5dae8519c2a1227.1425490309.git.adam.ward.opensource@diasemi.com>
On Wed, 04 Mar 2015, Adam Ward wrote:
> The range of registers used by this driver exceeds that available
> via SPI with no paging (127), so we have to override the values
> from the default config which is set-up for I2C access.
> Also change SPI settings to match device's recommended OTP values.
>
> Signed-off-by: Adam Ward <adam.ward.opensource@diasemi.com>
> Tested-by: Adam Ward <adam.ward.opensource@diasemi.com>
I'd be worried if you hadn't tested it.
In future, Signed-off-by is sufficient.
Patch applied, thanks.
> ---
> drivers/mfd/da9052-spi.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/da9052-spi.c b/drivers/mfd/da9052-spi.c
> index 45ae0b7..b5de8a6 100644
> --- a/drivers/mfd/da9052-spi.c
> +++ b/drivers/mfd/da9052-spi.c
> @@ -32,7 +32,7 @@ static int da9052_spi_probe(struct spi_device *spi)
> if (!da9052)
> return -ENOMEM;
>
> - spi->mode = SPI_MODE_0 | SPI_CPOL;
> + spi->mode = SPI_MODE_0;
> spi->bits_per_word = 8;
> spi_setup(spi);
>
> @@ -43,6 +43,10 @@ static int da9052_spi_probe(struct spi_device *spi)
>
> config = da9052_regmap_config;
> config.read_flag_mask = 1;
> + config.reg_bits = 7;
> + config.pad_bits = 1;
> + config.val_bits = 8;
> + config.use_single_rw = 1;
>
> da9052->regmap = devm_regmap_init_spi(spi, &config);
> if (IS_ERR(da9052->regmap)) {
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
next prev parent reply other threads:[~2015-03-04 18:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 17:31 [PATCH v1 0/2] mfd: da9052: Fix SPI access and IRQ config Adam Ward
2015-03-04 16:13 ` [PATCH v1 1/2] mfd: da9052: Fix register access via SPI Adam Ward
2015-03-04 18:44 ` Lee Jones [this message]
2015-03-04 16:13 ` [PATCH v1 2/2] mfd: da9052: Register ability of device to cause a wake-up interrupt Adam Ward
2015-03-04 18:45 ` Lee Jones
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=20150304184458.GN32624@x1 \
--to=lee.jones@linaro.org \
--cc=adam.ward.opensource@diasemi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=support.opensource@diasemi.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