Explorar o código

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>
Alexander Shiyan %!s(int64=11) %!d(string=hai) anos
pai
achega
0cfe5c90c4
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      drivers/mfd/mc13xxx-spi.c

+ 2 - 0
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, &regmap_mc13xxx_bus,
 					   &spi->dev,
 					   &mc13xxx_regmap_spi_config);