Received: by 10.192.165.148 with SMTP id m20csp4166554imm; Mon, 30 Apr 2018 13:02:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZropppujReb/zLINTgMdQvkWc7r/eIgiyCV/8ZTAjoUtyKzDGSi/X81fgDJOESgNN0eg3kk X-Received: by 2002:a17:902:b7ca:: with SMTP id v10-v6mr13565579plz.275.1525118575319; Mon, 30 Apr 2018 13:02:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525118575; cv=none; d=google.com; s=arc-20160816; b=ey9/YzR//PXzpAGnTu+jh+D+Wm6OwiK7r8yEukiPzwxVqbVtMh1/DfS1H8fhqmBD8x MowDDLZoaX4kSRwiIZ4zQkid7JBPaxb1iWz/OJ76ATEBhSNJF1fJvYN+lI452gQeGUvY kEN1EPdsRT9gpmnJd9UBn/v3oCG6qIjI7S7eTF6tN/o5S9K4RLRzXSfjjuVvMwANksJd cklMr209xZZmKk57MZInlu+MGbUieTRyUI8y6+uTArwddM3Z8dkqh19Hm3RWmbGzpXpQ 3MHSbRpQgfKAPFWmIUXTicUCp4aSokF2Wdgg1ZUM9rIPdg+05fhoxhKk/8Y0poy/IR0I M4Pw== 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=51MbXB0UzuM/KmcB2653YpZa2aJcZ8V64YUJQ/dCV3w=; b=eeg5hsRQTD16HioyeD147QT8YPQwFEEscHX6rOx9lSwl/gOrpgK56olO3bodOfYwbC 7YjTYgtdfovyLE+Hns4jUfSg9/41zG8YFgsmSFF0vahNcSVvRYhJOGb5O6Ix9E9tJDh4 7F9UdmQJEe2GsbsP0xJH10oJo9cQ3cD3qdRrKxnieglEhfft1GmcT8tH+Bzb3Gt5I5ES nF4Fr5BWFUshy5DI+YQUQJi3VUw0jELM5cG4/RfvyNu67bmyt8oR9ysbl0ZccugHHUOt DOS1nF4PzmI8cFtadfPkb3iYJobdP5i34EmNphVk5yoYpc9Gwppo96sOt0wXesDe1afg Pfvw== 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 u15-v6si6652758pgc.383.2018.04.30.13.02.40; Mon, 30 Apr 2018 13:02:55 -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 S1756078AbeD3UCY (ORCPT + 99 others); Mon, 30 Apr 2018 16:02:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:34366 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756014AbeD3T1h (ORCPT ); Mon, 30 Apr 2018 15:27:37 -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 9EFD1235EE; Mon, 30 Apr 2018 19:27:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EFD1235EE 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.14 76/91] fpga-manager: altera-ps-spi: preserve nCONFIG state Date: Mon, 30 Apr 2018 12:24:58 -0700 Message-Id: <20180430184008.243601470@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184004.216234025@linuxfoundation.org> References: <20180430184004.216234025@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.14-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));