From patchwork Tue Sep 4 12:41:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 145926 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3615987ljw; Tue, 4 Sep 2018 05:41:34 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdb+TaamLQGSt5H4i/ldT4QBZm+LYHNHxMj6ntz6OnX0ZNwaF4aJJ2PaNRCBSV/2bngCOx0/ X-Received: by 2002:a62:e813:: with SMTP id c19-v6mr34802940pfi.124.1536064894051; Tue, 04 Sep 2018 05:41:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536064894; cv=none; d=google.com; s=arc-20160816; b=AolbSZtkDaW0nWpTlz19Un1nSQrs11nrwnagtHqY2g/tEgzq5eE6A0HDw19h095ktj fjbnQxwr41wSAvtgq6vgjaBp5rOZUHBJY5U3j75K2ht/d/9jMY55qIadEM5so+LFHt2v D+BraYVpdXda/s3s3XBitkXivuOnbcwlWj7GCC4oqUGY+PL+jvaydog9y2koJeNUsH3y jRXM4QHmHqdVA/cepwiM9wSN+tYUCE1jkcnjO77WAu9UpgxsrTDuvpXWclkmZV+QjwBS 82RI8VmFv496nDz8wYhpN1PDaspUUvPHQD2nQh0xi9mb3yvdBOnVgJDfOdN6EZxc85oT IPPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=0R2o2oDVigWmkgDco1YurZOejFFyofsCuVIFyagOqYY=; b=gEuVbkOGlQpIHn4/2o/ypjp3uo+y0j27UygX6XJPCB/lJEM87ldyE85bsMH7GmHP75 H6IY/DFhK5QyEh0/Uz5j5u2M7y4SRYYAVfhHM3440gYyXVUEK28doSRny0jfKydb2/u0 wXeK65PodNfTkgzgRt/jH5oVaD8xpPGUpTCxJSzEaseF2xhm9DpMuNjE4zPFNEF2lAMd JKimsCmK5LklGYGHLusm6ZSledyme4Xh9Vwl8uRFqr4sU14qX83srigujPeA3eVNebXA vyqNvQwFlt/dG//GTXMtpUXeLwP4UQ1dVVqxOekbN1cqrV6m91iXbgaj8+jTj7YvpOUd aM8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZZFMIhmX; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w15-v6si23525891plk.508.2018.09.04.05.41.33; Tue, 04 Sep 2018 05:41:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZZFMIhmX; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726203AbeIDRGb (ORCPT + 1 other); Tue, 4 Sep 2018 13:06:31 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:46281 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726108AbeIDRGb (ORCPT ); Tue, 4 Sep 2018 13:06:31 -0400 Received: by mail-lf1-f67.google.com with SMTP id e23-v6so2784352lfc.13 for ; Tue, 04 Sep 2018 05:41:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=0R2o2oDVigWmkgDco1YurZOejFFyofsCuVIFyagOqYY=; b=ZZFMIhmXahPghBp+VjfDATz6eDjTXhCU5u3Wsly2+jWJSz/rWHn8q7E7NOgyxpvB1D 0GMpqm+38QHP73fPvCzE+iEO91zrQi7heGvQUwsIIBbAdrQIctgU9s/FR6KTvnTOj3MD g51NdKpytripdhxuCkjGhk1zr8JCCmIkhCujw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0R2o2oDVigWmkgDco1YurZOejFFyofsCuVIFyagOqYY=; b=Vi4XPo5hF/vSvxVonhwQGBr//MFEHLMQPZZI4eEIsp1yzLplsXh/ViXmG9eyLpwlK/ ukX2zgyEnSq0G1YVBs4cWJ8nrFEyD93V9MXCm1PY5/GG6T2/aSqInPWS833sAU+rmSfD v6Wm1vPl/84ZRHgKuZ4eufmHmsPBVlx1xA591XUtiPy7YRrSVlBOx2oud4RFgxiQ8srx yvZVfBBcQNe0FCzOth2aZO4DB6v4mG38yz7nh3aNQKKY/lRDvrRv4ACC8k24V7pdYMxM R4gks7vt3P6lMVpf27Csdx1WjYqtQ0tM2pUfMzJ94vVTs0OQCzDWytp9989gwIdojWhe 3MFA== X-Gm-Message-State: APzg51AC0f2/BcbymJDQw8k7+oBlbiucZv47DOWAE4huYU5Z/H9wnpun QrrYzcK2g8ykRtYch+mdBJicmg== X-Received: by 2002:a19:cb93:: with SMTP id b141-v6mr19809691lfg.119.1536064891506; Tue, 04 Sep 2018 05:41:31 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id k4-v6sm4016152ljc.6.2018.09.04.05.41.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Sep 2018 05:41:30 -0700 (PDT) From: Linus Walleij To: Mark Brown , linux-spi@vger.kernel.org Cc: linux-gpio@vger.kernel.org, Linus Walleij , Sekhar Nori , Kevin Hilman , Michele Dionisio , Frode Isaksen Subject: [PATCH] spi: davinci: Remove chip select GPIO pdata Date: Tue, 4 Sep 2018 14:41:28 +0200 Message-Id: <20180904124128.14826-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org The DaVinci SPI can use either: - Internal chip selects (inside the SPI host) - External chip selects (using GPIO) - External chip selects passed in pdata The last way of passing external chip selects through platform data is not used in the kernel. Delete it to make the code simpler when refactoring GPIO. Cc: Sekhar Nori Cc: Kevin Hilman Cc: Michele Dionisio Cc: Frode Isaksen Signed-off-by: Linus Walleij --- drivers/spi/spi-davinci.c | 7 ------- include/linux/platform_data/spi-davinci.h | 4 ---- 2 files changed, 11 deletions(-) -- 2.17.1 diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index a02099c90c5c..76a87a674b87 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -434,13 +434,6 @@ static int davinci_spi_setup(struct spi_device *spi) retval = gpio_direction_output( spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); internal_cs = false; - } else if (pdata->chip_sel && - spi->chip_select < pdata->num_chipselect && - pdata->chip_sel[spi->chip_select] != SPI_INTERN_CS) { - spi->cs_gpio = pdata->chip_sel[spi->chip_select]; - retval = gpio_direction_output( - spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); - internal_cs = false; } if (retval) { diff --git a/include/linux/platform_data/spi-davinci.h b/include/linux/platform_data/spi-davinci.h index f4edcb03c40c..0638fb6353bc 100644 --- a/include/linux/platform_data/spi-davinci.h +++ b/include/linux/platform_data/spi-davinci.h @@ -36,9 +36,6 @@ enum { * @num_chipselect: number of chipselects supported by this SPI master * @intr_line: interrupt line used to connect the SPI IP to the ARM interrupt * controller withn the SoC. Possible values are 0 and 1. - * @chip_sel: list of GPIOs which can act as chip-selects for the SPI. - * SPI_INTERN_CS denotes internal SPI chip-select. Not necessary - * to populate if all chip-selects are internal. * @cshold_bug: set this to true if the SPI controller on your chip requires * a write to CSHOLD bit in between transfers (like in DM355). * @dma_event_q: DMA event queue to use if SPI_IO_TYPE_DMA is used for any @@ -48,7 +45,6 @@ struct davinci_spi_platform_data { u8 version; u8 num_chipselect; u8 intr_line; - u8 *chip_sel; u8 prescaler_limit; bool cshold_bug; enum dma_event_q dma_event_q;