]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mfd: mc13xxx: Limit maximum SPI speed
authorAlexander Shiyan <shc_work@mail.ru>
Sun, 2 Mar 2014 07:44:33 +0000 (11:44 +0400)
committerLee Jones <lee.jones@linaro.org>
Wed, 19 Mar 2014 08:58:35 +0000 (08:58 +0000)
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>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/mc13xxx-spi.c

index 38ab67829791b1b8d7b5c2d33d24ac66999f2a3f..ee81a67207dea56e77a43a373c3068261b8fed73 100644 (file)
@@ -140,6 +140,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);