From: Mark Brown Date: Mon, 12 Dec 2016 15:54:05 +0000 (+0000) Subject: Merge remote-tracking branches 'spi/topic/armada', 'spi/topic/ath79', 'spi/topic... X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=0afa0724dfb0ee94bc1c85eee9e90318413af463;p=linux-beck.git Merge remote-tracking branches 'spi/topic/armada', 'spi/topic/ath79', 'spi/topic/atmel' and 'spi/topic/axi' into spi-next --- 0afa0724dfb0ee94bc1c85eee9e90318413af463 diff --cc drivers/spi/spi-atmel.c index 9fb00ac3ac2e,8feac599e9ab,8feac599e9ab,3e537ed5cd75,8feac599e9ab..0e7712bac3b6 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@@@@@ -1491,39 -1499,6 -1499,6 -1429,39 -1499,6 +1430,39 @@@@@@ static void atmel_get_caps(struct atmel } /*-------------------------------------------------------------------------*/ ++ +static int atmel_spi_gpio_cs(struct platform_device *pdev) ++ +{ ++ + struct spi_master *master = platform_get_drvdata(pdev); ++ + struct atmel_spi *as = spi_master_get_devdata(master); ++ + struct device_node *np = master->dev.of_node; ++ + int i; ++ + int ret = 0; ++ + int nb = 0; ++ + ++ + if (!as->use_cs_gpios) ++ + return 0; ++ + ++ + if (!np) ++ + return 0; ++ + ++ + nb = of_gpio_named_count(np, "cs-gpios"); ++ + for (i = 0; i < nb; i++) { ++ + int cs_gpio = of_get_named_gpio(pdev->dev.of_node, ++ + "cs-gpios", i); ++ + - if (cs_gpio == -EPROBE_DEFER) - return cs_gpio; +++ + if (cs_gpio == -EPROBE_DEFER) +++ + return cs_gpio; ++ + - if (gpio_is_valid(cs_gpio)) { - ret = devm_gpio_request(&pdev->dev, cs_gpio, - dev_name(&pdev->dev)); - if (ret) - return ret; - } +++ + if (gpio_is_valid(cs_gpio)) { +++ + ret = devm_gpio_request(&pdev->dev, cs_gpio, +++ + dev_name(&pdev->dev)); +++ + if (ret) +++ + return ret; +++ + } ++ + } ++ + ++ + return 0; ++ +} static int atmel_spi_probe(struct platform_device *pdev) {