diff mbox

[2/4] mfd: mc13xxx: Limit maximum SPI speed

Message ID 1393746275-9253-2-git-send-email-shc_work@mail.ru (mailing list archive)
State New, archived
Headers show

Commit Message

Alexander Shiyan March 2, 2014, 7:44 a.m. UTC
The patch adds the maximum speed limit in accordance with the
PMIC datasheet if other value is not given in the devicetree
description or board data.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/mfd/mc13xxx-spi.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Lee Jones March 3, 2014, 7:36 a.m. UTC | #1
> The patch adds the maximum speed limit in accordance with the
> PMIC datasheet if other value is not given in the devicetree
> description or board data.
> 
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> ---
>  drivers/mfd/mc13xxx-spi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c
> index f88087f..cd27c32 100644
> --- a/drivers/mfd/mc13xxx-spi.c
> +++ b/drivers/mfd/mc13xxx-spi.c
> @@ -138,6 +138,8 @@ static int mc13xxx_spi_probe(struct spi_device *spi)
>  
>  	mc13xxx->irq = spi->irq;
>  
> +	spi->max_speed_hz = spi->max_speed_hz ? : 26000000;
> +
>  	mc13xxx->regmap = devm_regmap_init(&spi->dev, &regmap_mc13xxx_bus,
>  					   &spi->dev,
>  					   &mc13xxx_regmap_spi_config);

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c
index f88087f..cd27c32 100644
--- a/drivers/mfd/mc13xxx-spi.c
+++ b/drivers/mfd/mc13xxx-spi.c
@@ -138,6 +138,8 @@  static int mc13xxx_spi_probe(struct spi_device *spi)
 
 	mc13xxx->irq = spi->irq;
 
+	spi->max_speed_hz = spi->max_speed_hz ? : 26000000;
+
 	mc13xxx->regmap = devm_regmap_init(&spi->dev, &regmap_mc13xxx_bus,
 					   &spi->dev,
 					   &mc13xxx_regmap_spi_config);