diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2014-03-02 02:44:33 -0500 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-03-19 04:58:35 -0400 |
commit | 0cfe5c90c45c53f9d28d166d2b13bb54852742ba (patch) | |
tree | fbeb7e0bb44e07874dc6330f3b0a8fe347afdf2d /drivers/mfd | |
parent | 471212d943f839c94aefd416feaeca6e26a6e1f6 (diff) |
mfd: mc13xxx: Limit maximum SPI speed
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>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/mc13xxx-spi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mfd/mc13xxx-spi.c b/drivers/mfd/mc13xxx-spi.c index 38ab67829791..ee81a67207de 100644 --- a/drivers/mfd/mc13xxx-spi.c +++ b/drivers/mfd/mc13xxx-spi.c | |||
@@ -140,6 +140,8 @@ static int mc13xxx_spi_probe(struct spi_device *spi) | |||
140 | 140 | ||
141 | mc13xxx->irq = spi->irq; | 141 | mc13xxx->irq = spi->irq; |
142 | 142 | ||
143 | spi->max_speed_hz = spi->max_speed_hz ? : 26000000; | ||
144 | |||
143 | mc13xxx->regmap = devm_regmap_init(&spi->dev, ®map_mc13xxx_bus, | 145 | mc13xxx->regmap = devm_regmap_init(&spi->dev, ®map_mc13xxx_bus, |
144 | &spi->dev, | 146 | &spi->dev, |
145 | &mc13xxx_regmap_spi_config); | 147 | &mc13xxx_regmap_spi_config); |