Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756644AbcCBAS7 (ORCPT ); Tue, 1 Mar 2016 19:18:59 -0500 Received: from mail177-1.suw61.mandrillapp.com ([198.2.177.1]:21464 "EHLO mail177-1.suw61.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932378AbcCAX6A (ORCPT ); Tue, 1 Mar 2016 18:58:00 -0500 From: Greg Kroah-Hartman Subject: [PATCH 4.4 284/342] spi: atmel: fix gpio chip-select in case of non-DT platform X-Mailer: git-send-email 2.7.2 To: Cc: Greg Kroah-Hartman , , Mans Rullgard , Cyrille Pitchen , Nicolas Ferre , Mark Brown Message-Id: <20160301234537.079801311@linuxfoundation.org> In-Reply-To: <20160301234527.990448862@linuxfoundation.org> References: <20160301234527.990448862@linuxfoundation.org> X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=30481620.8af72c954c314791a066466c55042441 X-Mandrill-User: md_30481620 Date: Tue, 01 Mar 2016 23:55:18 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1269 Lines: 35 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Cyrille Pitchen commit 70f340df24518d36eeaefb6652d492f250115c19 upstream. The non-DT platform that uses this driver (actually the AVR32) was taking a bad branch for determining if the IP would use gpio for CS. Adding the presence of DT as a condition fixes this issue. Fixes: 4820303480a1 ("spi: atmel: add support for the internal chip-select of the spi controller") Reported-by: Mans Rullgard Signed-off-by: Cyrille Pitchen [nicolas.ferre@atmel.com: extract from ml discussion] Signed-off-by: Nicolas Ferre Tested-by: Mans Rullgard Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-atmel.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1571,6 +1571,7 @@ static int atmel_spi_probe(struct platfo as->use_cs_gpios = true; if (atmel_spi_is_v2(as) && + pdev->dev.of_node && !of_get_property(pdev->dev.of_node, "cs-gpios", NULL)) { as->use_cs_gpios = false; master->num_chipselect = 4;