From 0cfe5c90c45c53f9d28d166d2b13bb54852742ba Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Sun, 2 Mar 2014 11:44:33 +0400 Subject: 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 Signed-off-by: Lee Jones --- 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 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) mc13xxx->irq = spi->irq; + spi->max_speed_hz = spi->max_speed_hz ? : 26000000; + mc13xxx->regmap = devm_regmap_init(&spi->dev, ®map_mc13xxx_bus, &spi->dev, &mc13xxx_regmap_spi_config); -- cgit v1.2.3