Received: by 10.192.165.148 with SMTP id m20csp4145664imm; Mon, 30 Apr 2018 12:36:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoIMyW3pX+A8PPtoB/HtwaG6OuRq2VM3W2oCQvWMgZRW42j/2/OOC9FRhiIQJYnoYhoo+Ya X-Received: by 2002:a17:902:7c95:: with SMTP id y21-v6mr13537233pll.76.1525117009139; Mon, 30 Apr 2018 12:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525117009; cv=none; d=google.com; s=arc-20160816; b=BZ3P5fzFL2TZ6sjsus+ckSFYjpFnSIjNhVUdpx0/HURJM9eu49ez10+2hfgmdfpDiN DDB7qnd6lMVAXjKT1a8cSLh6RfjOIrNmevgIBsX2uWBw1xPwzhZgOckZYyhb/YOUMdjQ 3OTVlyeGAwsAO6QUOVMcJdyYFvIql8NYGKVixqlTu74Igtr9yvVv9Et2Xnm5dbYswt9U MbITv78Ttwvi+Iqylv/Cr4qKrK86nfkIBn89jZwrKWz3npGX3q5gCez5X/sJg88EoS+Q OZ7XaAi6Mh2NmngkApjnuwkM1WfK4bRSftHjb3Zl0J2jSlTuTDwUDzqwkSQXX+TYuKIn UcSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dmarc-filter :arc-authentication-results; bh=zYK2ksb5VB/7PofrsmmHJW1h2BnwjDQrRdxQpqsIvMU=; b=tvaJvO9MeEYIcQDO0LdJtNbAeXp/D/7T+55lVxP+0kWi3kj9yZ6IofYpdfepRoy304 SUaBpoXpJhOHeBumLfe4rX74bQjBcESC4iiEuZo9b2woOz3OrESKRZmm2dwthzDzGZ6H alRm73FCmJJupmd7ScoyzZDIwR1Xp7QJOWzr4kTNqaoJuYLAyGg/wiggxpXd0gDrmmMn FT5OLi5S6vgmsBakIa1LvS0JBVigMd9LDpBkJbY+40jk8FLVZimKp4g/DpxNi5a1YOWq Sqx7zCWxEZDWg1/l3BekI73fVJ8S5XmpS+Ang4WSAr1mtDJ72O0qvkXz6YaBvaGLCQnd EH8w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d65si8179925pfa.263.2018.04.30.12.36.34; Mon, 30 Apr 2018 12:36:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756563AbeD3Tf4 (ORCPT + 99 others); Mon, 30 Apr 2018 15:35:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:36824 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756420AbeD3T2p (ORCPT ); Mon, 30 Apr 2018 15:28:45 -0400 Received: from localhost (unknown [104.132.1.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D2C4822DBF; Mon, 30 Apr 2018 19:28:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2C4822DBF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anatolij Gustschin , Alan Tull , Moritz Fischer Subject: [PATCH 4.16 093/113] fpga-manager: altera-ps-spi: preserve nCONFIG state Date: Mon, 30 Apr 2018 12:25:04 -0700 Message-Id: <20180430184019.138135380@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184015.043892819@linuxfoundation.org> References: <20180430184015.043892819@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Anatolij Gustschin commit 881c93c0fb73328845898344208fa0bf0d62cac6 upstream. If the driver module is loaded when FPGA is configured, the FPGA is reset because nconfig is pulled low (low-active gpio inited with GPIOD_OUT_HIGH activates the signal which means setting its value to low). Init nconfig with GPIOD_OUT_LOW to prevent this. Signed-off-by: Anatolij Gustschin Acked-by: Alan Tull Signed-off-by: Moritz Fischer Cc: stable # 4.14+ Signed-off-by: Greg Kroah-Hartman --- drivers/fpga/altera-ps-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/fpga/altera-ps-spi.c +++ b/drivers/fpga/altera-ps-spi.c @@ -249,7 +249,7 @@ static int altera_ps_probe(struct spi_de conf->data = of_id->data; conf->spi = spi; - conf->config = devm_gpiod_get(&spi->dev, "nconfig", GPIOD_OUT_HIGH); + conf->config = devm_gpiod_get(&spi->dev, "nconfig", GPIOD_OUT_LOW); if (IS_ERR(conf->config)) { dev_err(&spi->dev, "Failed to get config gpio: %ld\n", PTR_ERR(conf->config));