LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v1 2/2] mfd: da9052: Register ability of device to cause a wake-up interrupt
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 16:13 ` Adam Ward
2015-03-04 18:45 ` Lee Jones
1 sibling, 1 reply; 5+ messages in thread
From: Adam Ward @ 2015-03-04 16:13 UTC (permalink / raw)
To: Samuel Ortiz, Lee Jones; +Cc: Support Opensource, linux-kernel
Signed-off-by: Adam Ward <adam.ward.opensource@diasemi.com>
Tested-by: Adam Ward <adam.ward.opensource@diasemi.com>
---
drivers/mfd/da9052-irq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/da9052-irq.c b/drivers/mfd/da9052-irq.c
index 57ae784..e65ca19 100644
--- a/drivers/mfd/da9052-irq.c
+++ b/drivers/mfd/da9052-irq.c
@@ -262,6 +262,8 @@ int da9052_irq_init(struct da9052 *da9052)
goto regmap_err;
}
+ enable_irq_wake(da9052->chip_irq);
+
ret = da9052_request_irq(da9052, DA9052_IRQ_ADC_EOM, "adc-irq",
da9052_auxadc_irq, da9052);
--
end-of-patch for mfd: da9052: Fix SPI access and IRQ config
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 1/2] mfd: da9052: Fix register access via SPI
2015-03-04 17:31 [PATCH v1 0/2] mfd: da9052: Fix SPI access and IRQ config Adam Ward
@ 2015-03-04 16:13 ` Adam Ward
2015-03-04 18:44 ` Lee Jones
2015-03-04 16:13 ` [PATCH v1 2/2] mfd: da9052: Register ability of device to cause a wake-up interrupt Adam Ward
1 sibling, 1 reply; 5+ messages in thread
From: Adam Ward @ 2015-03-04 16:13 UTC (permalink / raw)
To: Samuel Ortiz, Lee Jones; +Cc: Support Opensource, linux-kernel
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>
---
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)) {
--
end-of-patch for mfd: da9052: Fix SPI access and IRQ config
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 0/2] mfd: da9052: Fix SPI access and IRQ config
@ 2015-03-04 17:31 Adam Ward
2015-03-04 16:13 ` [PATCH v1 1/2] mfd: da9052: Fix register access via SPI Adam Ward
2015-03-04 16:13 ` [PATCH v1 2/2] mfd: da9052: Register ability of device to cause a wake-up interrupt Adam Ward
0 siblings, 2 replies; 5+ messages in thread
From: Adam Ward @ 2015-03-04 17:31 UTC (permalink / raw)
To: Samuel Ortiz, Lee Jones; +Cc: Support Opensource, linux-kernel
Hi,
This patch set is based on mainline v4.0-rc2.
It corrects the SPI configuration to support both the basic hardware
requirements and the defined OTP settings the device will be delivered with,
to customers using an SPI configuration.
It also configures the IRQ so the RTC component can perform wake-from-suspend,
which is established in a separate patch set for that subsystem, to follow.
Best regards,
Adam
Adam Ward (2):
mfd: da9052: Fix register access via SPI
mfd: da9052: Register ability of device to cause a wake-up interrupt
drivers/mfd/da9052-irq.c | 2 ++
drivers/mfd/da9052-spi.c | 6 +++++-
2 files changed, 7 insertions(+), 1 deletion(-)
--
end-of-patch for mfd: da9052: Fix SPI access and IRQ config
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/2] mfd: da9052: Fix register access via SPI
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
0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2015-03-04 18:44 UTC (permalink / raw)
To: Adam Ward; +Cc: Samuel Ortiz, Support Opensource, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/2] mfd: da9052: Register ability of device to cause a wake-up interrupt
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
0 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2015-03-04 18:45 UTC (permalink / raw)
To: Adam Ward; +Cc: Samuel Ortiz, Support Opensource, linux-kernel
On Wed, 04 Mar 2015, Adam Ward wrote:
> Signed-off-by: Adam Ward <adam.ward.opensource@diasemi.com>
> Tested-by: Adam Ward <adam.ward.opensource@diasemi.com>
> ---
> drivers/mfd/da9052-irq.c | 2 ++
> 1 file changed, 2 insertions(+)
Applied, thanks.
> diff --git a/drivers/mfd/da9052-irq.c b/drivers/mfd/da9052-irq.c
> index 57ae784..e65ca19 100644
> --- a/drivers/mfd/da9052-irq.c
> +++ b/drivers/mfd/da9052-irq.c
> @@ -262,6 +262,8 @@ int da9052_irq_init(struct da9052 *da9052)
> goto regmap_err;
> }
>
> + enable_irq_wake(da9052->chip_irq);
> +
> ret = da9052_request_irq(da9052, DA9052_IRQ_ADC_EOM, "adc-irq",
> da9052_auxadc_irq, da9052);
>
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-04 18:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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).