Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753159AbcJJOUE (ORCPT ); Mon, 10 Oct 2016 10:20:04 -0400 Received: from mail-sn1nam01on0068.outbound.protection.outlook.com ([104.47.32.68]:51485 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752812AbcJJOTp (ORCPT ); Mon, 10 Oct 2016 10:19:45 -0400 Authentication-Results: spf=fail (sender IP is 66.35.236.227) smtp.mailfrom=opensource.altera.com; mseidel.net; dkim=fail (signature did not verify) header.d=altera.onmicrosoft.com;mseidel.net; dmarc=none action=none header.from=opensource.altera.com; Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=tthayer@opensource.altera.com; From: To: CC: , , , , , , , Subject: [PATCHv3 1/2] spi: Add Flag to Enable Slave Select with GPIO Chip Select. Date: Mon, 10 Oct 2016 09:25:24 -0500 Message-ID: <1476109525-21213-1-git-send-email-tthayer@opensource.altera.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: CY1PR14CA0038.namprd14.prod.outlook.com (10.163.13.176) To BN3PR03MB1400.namprd03.prod.outlook.com (10.163.34.19) X-MS-Office365-Filtering-Correlation-Id: 0fa16776-acf0-4e04-f06a-08d3f118730a X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1400;2:ImUE/Uw9VWhi6dMYQQzJ931ZgQvIEHPt0s+l6PwNBnX/JK1GUNQTLecGiQ4jVBCEi2wV7FJ6ZaOsbkqlT8lFGuuebpUtfN1IFXFoIYMHJZY1Eyk8NNVuHsTn3utfpq77Z7dgS7IIEYdxgC4Uo/tu5Wgw1MwJ91wD0BUBsg0EvDhz6HsbqY/WdSibsDpYd8w/q3B5AWFQdtayp//JpfoVVw==;3:Qh9tNTvo+bC1raZy2un/RLa6oyU77Xd9oad6kFlsRe2/LTDOa+b9Dg2Wy32nekZ9YT9MmuOgpQVvWVtvydqQbofPO8+r259zQpBHKE1TSVcmj8RrxIAmB+RN4vJ0yES98xgdIdGFDL+Qnvelu3MHwA== X-Microsoft-Antispam-Untrusted: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1400; X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1400;25:0ELyp/hWfWuuPhKZ/DioZVUQtR96LK5CUWM81g4e1N/HgrsYz5vKcW9IHzSj+ZqYZCcoQibapUjNaUKLhK+A4RWYfJyM4kEJoJT/30Ct9N0QrZcFP86+D3iROzJbz/e1eTYUJMag/FEm5rrj/VqH9SB6MRG1fkX8fYirK7i5Wof3rHtHqZjdRmtBd4e/q7Qt2sVA1PsyHAxlpyIAwbjndTAoY8qqeVZGCunKKyd52vUs0lTskJeRc+X7RBDwsdv6UXSzcYC5Yzn44ydJ1QmeOfAv+5NdNY9BZ+9pwkoZY2bHueokPV4Dnj7h8g9NWgujNoVdOFX1GDbBV7QCWT2o9G3XNPkDcWsZiumfRMfUyW4ac+I4VG5pnreo67RPZYDaNbDueocs5BMvWf4dNicxJTAL3k310iS0xxOT1CHe4S8BERDSyyWgx7pWdFRyV1npNhrY9mVxPbH6wEw3KObs1r7VkdsqlqE6zPPM0hEVgl/+KP99zcW4Ug+TkSt7y9NwgdiQc0R6F8cNZJJOPf3CzEBrgDzKF4yFDX8aGjxpStwL9YtRA5CrMK1F9OnitlixAAK5Jw1Zk6rNR5Ul0cz4srMI4sClo8bI4RxvtOMVIunfxSO1pKBIwDWRSSKw6+hz42r8YalQwQvM1VF2T7h7LXLbKE7WPxcvBzhsEmrK/ppCZeFrsH0a8qdO5lAWwbMZh4kO72RrgD4BmqQzd92+OCz1sJievNai5Lf/bCkGbA8= X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1400;31:bQ+bCRerXCfo3Tc2YANDVNGeSTGG5JK7gAUhXd9z5N3EO8iLCwsvVz1MrW7DkFShuk3HkLltnBHwueQFHbQKlSeCoKHZ4YBWa4XEQr+rcWA9SEBuyK3VSd4zUcyl8LKYZh/DFhiKgq0R+yR16PyXpebrU+tOB9SDIJZ9zR2TIFl6Isr3qmjEXBXVahWW+Mtxz7cLa4hz4xoHf4jybULzoyCNhCBdNANU58/HIj+WCYM2J9De0RoF/laodf/3cuogTmyqV4IvAyWf5s75GZvvZA==;20:ZkOpJ3SaloapdTWMCtzw4j8ALRrEs1gx1BozkS6UIMBHXwgpqVAhNtmN6MA0yE/+TgHgfQfRnrGD6Kh/qF2NQy6RBTCytTfPGgi5WwueTfbUfkhCukWAInDZYLFypH9nyDnrYDj4WzuMkvjZm0bo48q2YT5stJsykEDO1m/2sVk=;4:zlgLpK0BsjkPnZ3N7T3+WSWo8pcRrMwC18L1SCkHKpO2GMqVjdr7Cj+e/zM9247uhU+VmJzjSjb9G6Iakk+qSQeCUxIk7CqHPpeNQqwuHr24DV33aoqsGnuRyThh3HzGXXsjwgfMvhM9/DZspv2fKEBEQ1Bm5h48e9TXTZozzBEVupg6k77PI3I0ULmB88UXGU3hw6gkpm6yZY5VRKxAB2Wl4VHTW9ZqOmjW5zms4ErR9/MzmioMh+Dsvh6a0M6iXDuGrGa5mqCdOn5SrYELI3gv7X5U9DG3PXHi5ODQdxh0SzAq3lD8Y77o801lwXgB6lnjnlBLGhiBay9MljxbewPXSFvXs5WkgL/m58P4yV07Gu2NnxuL19026jq9G+5j72jgXQxevfXX/mTLnC9tmB+Qe9rH4q+iemPQpzFSVxSThCEucm7t++ySmcqhMdeDDAcPphYg2yCBIx9CQUC6wA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(80048183373757);UriScan:(80048183373757); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026);SRVR:BN3PR03MB1400;BCL:0;PCL:0;RULEID:;SRVR:BN3PR03MB1400;BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(13017025)(13023025)(13024025)(13015025)(13018025)(8121501046)(5005006)(3002001)(10201501046)(6055026);SRVR:CY1PR0301MB1276;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0301MB1276; X-Forefront-PRVS: 0091C8F1EB X-Forefront-Antispam-Report-Untrusted: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(189002)(199003)(97736004)(105586002)(8676002)(19580395003)(33646002)(81166006)(2351001)(229853001)(106356001)(81156014)(2361001)(85782001)(92566002)(5003940100001)(107886002)(3846002)(42186005)(6116002)(2906002)(19580405001)(47776003)(189998001)(101416001)(5660300001)(110136003)(68736007)(86362001)(50466002)(6916009)(50986999)(305945005)(66066001)(7846002)(48376002)(586003)(4001430100002)(42882006)(7736002)(4720700003)(50226002)(77096005)(85772001);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR03MB1400;H:tthayer-HP-Z620-Ubuntu.137.57.187.33;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics-untrusted: =?us-ascii?Q?1;BN3PR03MB1400;23:rN7KIITNP2gchk8rXv5fWwF14ZZBTgCYMdt3DJWC4?= =?us-ascii?Q?a/7Fx5S90GvvKA6ejGqaZxzrezS5CiJ8NbZdxSDW1EWz36Q+Vph+hbZhDlSU?= =?us-ascii?Q?oUyoyTrNprByjRnpx6zdkToAsMhPE8ibVceOeLWBrMrwY5ZCx3LnfwPnJ7OS?= =?us-ascii?Q?MLep8MmzhwXLgOvZzfikgPt0kV/GvXbOIEydrD/OGk8EuF88/fIc4FBZkNzk?= =?us-ascii?Q?64G9pCv/HwCXYVl2smk40EAxgKofUcA8orI4xhbh2n5mk6JUJRiNFEr0TlIb?= =?us-ascii?Q?UiM3ElqihZpdwvNNa9HEjVZy+hhu64aLQc7iJkYVRWehefmzzCtRaeC+4Gtx?= =?us-ascii?Q?cvLHBrhZnW/g7UUlKKMsn/RX44ByyRMkneuZoWqytm5byml5S0MBQwtBp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BgyYJx1tLFTBUPlftGrdTCr9+huM9YSAB44nAChj2+1CmlYw+Arb3HuuKALqzrJIlInv40ceyuK7EgsnFga9MT60OBifeJdRJhO0PCSw6R49f0s+Tnx2hy8v446jK21wWBnfnsbHEiV8n2cgIpP1wjWBgF5MpZykhUTGGSqa2H5maTR+uSDBXO06gwyYV9hD8ahXl+JPI43yJ1JxvEKzq4tuRF4pKkEfa00q1Z/1sXIdSOcwnCPfyroOqDWNWtY3FOn7W9BvoZhtHHKw5ipPIxlZnxEUgZDAdu/jE6bv/9qTtCK5Aas=;5:hD+UVp1Sb5h9S64shUAPpzCltAyl5goGMqpbDDn4Bd0tQ9xdKNkgUIxjri2PnQMcTuvEKhUz2ZEZ598bn9LPAxGqYdGgA922pU/ibw9fnEYt5fXMH47Jyb2qKhhq+AclDFyTJEfcz16RK8PT74znXA==;24:JYHRrlA80Ivy1RfvEteiWEMiHtjSOq8Z3H4Q1o6ZUfng/0i45nnj+8g/Ee2QyvjapQjXyHiQiIpw65vRH50kJHQHJJ+GKkWLkj97Pn7Y/dc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics-untrusted: 1;BN3PR03MB1400;7:XRH5nw6xBksCtOOKu/hx4bCowQDQMO7qRkIs807i4MsKjIrOCfd23s6EfhmLarcHRBo07uu/Naj0jnV4ImxZnvNBFT7X4azOKBCURvnM3rcGzUqiX4WP1054+4FejJtn/GL5+euVvdZjJhhbb5emTZPWliumrP08Z3CmHrJHQ2vhPQrcgfRc8W9NcqOknxloXERk5NV3u32PP6J8pJaEUb2UjTab9yM1uGGgddIcwffxxSAZUtpYcSQXJRtw8pgUQhS54eGzUPs4xhI7iBInM8GtQq/t8FtuGmdXrzDWsDN57pPr74MZD25nEU15bIuReolWoV90P14VCuNWuYwi9cAYnghdrStJCKRZuU+3vBs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR03MB1400 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:66.35.236.227;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(189002)(199003)(7846002)(110136003)(4001430100002)(7736002)(48376002)(6916009)(42882006)(50466002)(66066001)(5003940100001)(956001)(68736007)(47776003)(50986999)(81156014)(336002)(3720700001)(81166006)(189998001)(97736004)(107886002)(6070500001)(5660300001)(305945005)(92566002)(33646002)(8936002)(356003)(77096005)(2351001)(229853001)(105606002)(50226002)(106466001)(6116002)(3846002)(8676002)(86362001)(19580395003)(19580405001)(586003)(86152002)(4720700003)(87936001)(626004)(85426001)(2876002)(4326007)(2906002)(7099028);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0301MB1276;H:sj-itexedge03.altera.priv.altera.com;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:0;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11OLC006;1:i1kDuZX15HXjOL0z01uTqbnPgsTg4m+rAFKnoPfq/OjdzBiP1vuGUNcNFmdziwBjkyaKtCUBOYoGYRuH4APeESCYaimbadJVsnvDycWAcnN0gCv5zN6MwzQu2GgA0CAtmsn8Qq7my6gUrjQ89gDqhZ0DDOBy0FnwesywJHPx4EEWpr0xOV5oLZYCjLRPvEhgA+gxYnFXA2hvVDxK/DHBIHkbbtlA7YbnAcxaHuf5ft/s76epClBtHXtYYwuD2bLO+dIf6FVAG2muzDD9YiuWKvS+4FttQ5Mvc39Uu3lollRQYieBuudXuHkYeju2ekTs6XDWEvdD9QDxh4nb1WnD1/llB5XJqffIS8/OLBB874xJZVCu45+qD/E3Jy1NbKElYI0Oi0oxOJoBJqVnJvwubZ9/HaYzbx+ZQFH2JOxzzQW+94e0FNFLHQD5fhTdLzweYbb1xkNmvq1HH0dywgUCgXpxlWpoyVCGhyAIkZ43VnFAN+fPTi8jGx/1xlEQ3+ryKBNUg0dHFHiT6oIhkiU+Ye55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UDmYYm/4WM10NTGQFYZg7GmOflj38AgFVtettOzxMybjnad8ZJHlI+NtXWV X-DkimResult-Test: Failed X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(3002016);SRVR:CY1PR0301MB1276; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1276;31:jiYoH0CLmJ2OUXydTLrTF+WUy2FwjZwt8Pf62Rw8zUokJmKGYqx5y0QQpXqoj0NKfz2rlkAct3rkTKJdE9xK5/vb/hEHtN5B3ZG47UiWTRNUJqIdM7M6dbeA8WSIlM840rQNls7e0ha4Pr19WNHbaDscLoeXgoONTS3ZxwOMfwayNzyq62T9ONw0jNV6tcHxa2WnbbaC1HYTd+5lEtc0UEd2bG003XMO6E3F3lImOWCCWO4Od/U3SWhFUDKyaob5KzU+0LsfdwKTvDbmAKPPuQ==;20:fPaMayND3mA11cKPvF1c6/NDnbkGwZ6jVUKRxqpK9L/vJRUakAOe3SEYi8BHFBHJleHfli79MFdfCVq1vk5JY18PQux2tFhM+dHdl1UnUq7WVbnkgoQrVQrsPmEFYwAZoXm2ETQljct7tpGTUGiO3JXtvb95n14xLZfrjodb/CE= X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1276;4:QEYxN+ytgGUGLOhU/168hC2BZdhLtXNIObm2kfFCXae5+aR6zjbjGa4U0Qz9DrnIkluTVbt3LHkCFMwNS0DaUnMKpxQqH/ydt9SWCWESuZL/iC2oqqUdww8ZiEfgJOGN1YAQwMPRUd8tLUWXvKYESC6ymd/FWU7IHDuVACPMQGRfobWxJFlRKTpBDEk+rBRbB4VtPNt0WtFLeeAFjtVZlN5uT8ZxStqFfX6U7+iZ/urafehBUhloxwr50bqHjKx/Jtr/pYB/RZsNEvTcjASWuCnnsxcn1JX5WJdoeRqxyS8JMOGSVX54CZk8DpgFHHM30KdV+2Cra3hWFiyOfA4/L6TxMPmW1qmyZzI7fys8T9c4eD4wFdPeQRCxUxuFU/DS/RpP2ehqXq44oFtnbJn42nUeenBu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HrTYv3IWCKIppWcSVTD+21e+OZXGZpLhZqVv8tVuUJFqu9OajxSWk6db+mSIrX4NGk8LRpVF13ILnvMGBOUAsREwuI5y38Wnc60l6c9q37zedHIZL8F0E0tyOcka5Q1X5DpvNq618HbyD9vlrNZeA50bxDI7FJl5jiKhwYEcD0Ypc2IsGjYlU=;5:/doH2ee4QfoAVXWIeV338Rg7eSmKXCczrqupbqAMVWGYe30F8DZp9dMT/tqvCHfkg+Wg5tcg59I4W+d2F89GBfwLZzMIq65yHyLxnDzSazjdvvYloWy9T4lLiwnjrgibJkBHiX0IU023lEVWzAmmNX3hwxACg5+NnlbOb4hCIJ8=;24:JO+iZs623BOGyGLMsmZ8PP2GbTnqq7CNxzz6sOnAl8EPDsGxMEBZmIWlGFfUFGXuu0UJyJqQv4Uq9gL+v+LAS1Ohc3ZVYRHh7cd30TFoAUo= X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB1276;7:C/t0DpwlOTCJ6VureZ0Lv/WP0fnPKhB7CMeGV5rxOTWYLBwZNz8gBjT5akXdL8JpaAcZq30j73bE+vGwd9idg5QX+rFRTEThOiBDfgvxG3+1YOWimcs9DrwpqxmI/hn8VjW+rwkia6Ros0fZETQSeHRZqWnBHYJ0lBU5ygrbGUqNvVP0eQgBPBLfbS7i7nCqgxvTGHfLUbO2FQvv235kkc3OuHkWwNEF5mOTjPL0r1BTsmNarbiP1hR3Orwq0e89QZ1aJKMk1KDxj5nc1hk5g1MMFdFo01jrfElPQBNrAv57Fc/r84AOlHZDOXKVy5DK/DfT6Ue0Rn3uyOsEkwiNMg== X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2016 14:19:29.4893 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a;Ip=[66.35.236.227];Helo=[sj-itexedge03.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0301MB1276 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2135 Lines: 61 From: Thor Thayer Some SPI masters require slave selection before the transfer can begin [1]. The SPI framework currently selects the chip using either 1) the internal CS mechanism or 2) the GPIO CS, but not both. This patch adds a new master->flags define to indicate both the GPIO CS and the internal chip select mechanism should be used. Tested On: Altera CycloneV development kit Compile tested for build errors on x86_64 (allyesconfigs) [1] DesignWare dw_apb_ssi Databook, Version 3.20a (page 39) Signed-off-by: Thor Thayer --- v2 Move changes to SPI framework based on maintainer comments Add a new SPI master boolean variable. v3 Change boolean variable to master->flags based on comments --- drivers/spi/spi.c | 9 +++++++-- include/linux/spi/spi.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 5787b72..cbe15ab 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -697,10 +697,15 @@ static void spi_set_cs(struct spi_device *spi, bool enable) if (spi->mode & SPI_CS_HIGH) enable = !enable; - if (gpio_is_valid(spi->cs_gpio)) + if (gpio_is_valid(spi->cs_gpio)) { gpio_set_value(spi->cs_gpio, !enable); - else if (spi->master->set_cs) + /* Some SPI masters need both GPIO CS & slave_select */ + if ((spi->master->flags & SPI_MASTER_GPIO_SS) && + spi->master->set_cs) + spi->master->set_cs(spi, !enable); + } else if (spi->master->set_cs) { spi->master->set_cs(spi, !enable); + } } #ifdef CONFIG_HAS_DMA diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index 4b743ac..75c6bd0 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h @@ -442,6 +442,7 @@ struct spi_master { #define SPI_MASTER_NO_TX BIT(2) /* can't do buffer write */ #define SPI_MASTER_MUST_RX BIT(3) /* requires rx */ #define SPI_MASTER_MUST_TX BIT(4) /* requires tx */ +#define SPI_MASTER_GPIO_SS BIT(5) /* GPIO CS must select slave */ /* * on some hardware transfer / message size may be constrained -- 1.7.9.5