From patchwork Tue Aug 24 09:25:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matija Glavinic Pecotic X-Patchwork-Id: 502092 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEAE5C432BE for ; Tue, 24 Aug 2021 09:26:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C3D3060F92 for ; Tue, 24 Aug 2021 09:26:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235535AbhHXJ04 (ORCPT ); Tue, 24 Aug 2021 05:26:56 -0400 Received: from mail-vi1eur05on2112.outbound.protection.outlook.com ([40.107.21.112]:52705 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S233910AbhHXJ0y (ORCPT ); Tue, 24 Aug 2021 05:26:54 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m078NwnQUDBj+72x7+DQDSYPYJa2QrfwejFJjgxTZuY5nKX08PAS3G9aF525G6ldeJgm/xjV/i7/dJQE8Z/j0IZGPQJOgZLaE2D3jMVu0ZayrEECoPqLI/ROGfTksBrkhvlFuP7y9ac/m4zyXSdrVuKt9+SXhvwobQ4n4NRqtCKCsOB9m/soBH/qSVp7JXrYtHkjF8byjGUk6IKYfUiaDGpxDrRhHlqNp4NFFM72NDbdv3UtGQ0fRAO/ZhGcNBIRg0aVjtS+ags8TQTvYN+iON5oitSZQXj3JuOUgVwjDPY5t8tumv5wF63dtWXmxegzVm9sPvRm9QgPadB8xqCmww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vIcH8kCXn6OOuFVQ4ouNXgeDtmFoon5Bp9AMDcARwoA=; b=LaUrIxTV7UJq38Ule36P3q9gcceqJOyoCn8vaViZ+Icg3drU402p3yBbXzr6WWYnpCwcFTyCvTxaBO44XTaoM3EOHF91BUv1EYxRFF/72ZoLzN62wAuBFMjdHVTzp0tsjE4sH3VkorNJxY1zKvlV+MzHVpEs3cPJyi33YxVFZNiQWNKP1UG3x4evrnfDq5124DyyW2m6gLK/O8zFc/buma7xL0rU3OxqqK7/xRYj74u6bbfp/UiUXcTNin2jPEHBWp+yhKEtU9hKnKX9Hngku9rBvTHrngffKxcj1r5oLtikRBg4xG3UbMM7Vf3WxSC9tSoY4xwbO+pWZQgIjfZDSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nokia.com; dmarc=pass action=none header.from=nokia.com; dkim=pass header.d=nokia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vIcH8kCXn6OOuFVQ4ouNXgeDtmFoon5Bp9AMDcARwoA=; b=nC2mmleWDMKKN2E3gau6qeXiw5nb0UIxd1te8o26o02oloQrAs6f1ZKN1e03mGhbKJ/U0rYUx35pt9GC1lafeF0Wo9ObuYc5CLOyi6qcVguNwXiBSWkgm9mFmJ+QNjtEVBqJrjGlEpQTI9bbLxkfRn4sjv+H9G9mvXOU2iiews0= Authentication-Results: nokia.com; dkim=none (message not signed) header.d=none; nokia.com; dmarc=none action=none header.from=nokia.com; Received: from VI1PR0701MB3005.eurprd07.prod.outlook.com (2603:10a6:800:87::19) by VI1PR07MB4047.eurprd07.prod.outlook.com (2603:10a6:803:29::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4436.11; Tue, 24 Aug 2021 09:26:04 +0000 Received: from VI1PR0701MB3005.eurprd07.prod.outlook.com ([fe80::25ec:1b41:d4d5:93fa]) by VI1PR0701MB3005.eurprd07.prod.outlook.com ([fe80::25ec:1b41:d4d5:93fa%11]) with mapi id 15.20.4457.017; Tue, 24 Aug 2021 09:26:03 +0000 To: "Glavinic-Pecotic, Matija (EXT-Other - DE/Ulm)" , broonie@kernel.org, linux-spi@vger.kernel.org Cc: "Sverdlin, Alexander (Nokia - DE/Ulm)" From: Matija Glavinic Pecotic Subject: [PATCH] spi: davinci: invoke chipselect callback Message-ID: <735fb7b0-82aa-5b9b-85e4-53f0c348cc0e@nokia.com> Date: Tue, 24 Aug 2021 11:25:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 X-ClientProxiedBy: CH0PR04CA0012.namprd04.prod.outlook.com (2603:10b6:610:76::17) To VI1PR0701MB3005.eurprd07.prod.outlook.com (2603:10a6:800:87::19) MIME-Version: 1.0 Received: from [172.30.9.6] (131.228.32.166) by CH0PR04CA0012.namprd04.prod.outlook.com (2603:10b6:610:76::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4457.17 via Frontend Transport; Tue, 24 Aug 2021 09:26:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 331e8db6-02cf-4ed7-144a-08d966e13199 X-MS-TrafficTypeDiagnostic: VI1PR07MB4047: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7TA0ZVzSVKo7hJXPC5GFmUTj7NbZjs29JSSlR9ljDjhTISoXDrvSlyJJMQNwiopIfN0TzgvXRNiPQ9ZT0qztZy0vvcj+hxzAFizAaVzTEhn1EuSfo4S3tTBneRyfxB4gxX1zb8AgnCSHINOYgv+BT8vmvzZ5SdD89rmIXONtBa6hAaEMijZe8SD5SAkX0PheWRsXfTiSBhe1ndz7L57vBuyNaWX0C/ZmS8nFx5D18Zj1qE4pzAXMZpUe+6ptO9tm9jq8HoplaBILVbpOD2oox0KezbWKvK2g/Gl/yb6+E46fnsSV+6K8869+ki/mlUAgpJ5l+P8SNu2M9d/BBu8r8CtUDzxsdAFkTCmoX7bIGXKA15O2YCitFa7wNBXVimi8UtU7kZNTKFG7ZuEDkpT4X5ZCHslwXDdVDtw+ic2uD+oj30izkXpaegAXfvqf3UpMjRjb3ldVIWIsdTzfVw9NX0Te27LgJTRb08Ph4CUoSvIaYKgqOxRanL/cXEJ4fSqZl/nnv9C0Q3Kq23WUcSBK7Nb3tnDQSzfSIO/f9AXyGjddN8AE6ZRw8UJigt8I7qnfOVcS3Nf/R/2dh8vJyENbha7P/VjAZRSfkw4lUlI3t9MxWdMh0R3wZ44Q3EzlTiDQsVjPZQFaIkZtfNsI0wq+UFoM7B9RZTr5wXYs/cqUWl45yis6+Y55F+C8tVupz1LApg4BEKgqmMUSil9rDWNfHA+TffizEcxdRu7BZdoa0vy5G72sfS41XbIqabN04LfKRESKbdcV3MV8cnrvyYmN8g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0701MB3005.eurprd07.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(66556008)(6486002)(31686004)(16576012)(86362001)(66476007)(316002)(2616005)(107886003)(2906002)(8676002)(4326008)(31696002)(956004)(8936002)(6666004)(5660300002)(186003)(508600001)(26005)(38350700002)(52116002)(38100700002)(36756003)(66946007)(83380400001)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?I6FDxS+0LSQV2DMsuM+DtypPy?= =?utf-8?q?v9zjhbcD+rVEJgtV3Wn5ICr+GL93xNn6f23Xfe0x1q/GjzurNNjzOd1g?= =?utf-8?q?U6adxV0E4aY5pKPFNxmsydLLTZR+CVnpdk1nx4BMHtMiiNsjRPjB4YdG?= =?utf-8?q?pTjUD4ubTHpcyEQgqfX/iWoRF8PAHAfuQww4BoDWhZ2cQTvP2wRoIPMm?= =?utf-8?q?6Kbh49aXRr+jCXRw1Ub2kh9XquPZRpAhrs45tD0HFwLXtcrE2m/smT0G?= =?utf-8?q?wfAb///Uxab+gKPn5sduD9I9vTthks8jk+zP6+dauP6Ichufwc9+eqei?= =?utf-8?q?TXEooJRmqYaQxbsV7N62LZ2ILsi0r1wmXQONLAjrO/RSOnMdvL8j8kyS?= =?utf-8?q?GklBHmrwdT82/JVxeinITT5r45ZQ1qw2IdTo+OjEO1nUJlWmFsSJcM4N?= =?utf-8?q?mJ9YQhqEb7sZWEsXhgNUTn7C4PtAgMbeaIQ7ch2n92I11k5MyMgjqrxm?= =?utf-8?q?Nu44n7T9hgalfZq2cctL2d4BPAG8E92DB1CbOws7zDvC8BbOUoqEa+9k?= =?utf-8?q?SN2VzfudC5hCPubHsSOnI9bM/Up6rIEYp9Fg9ObxEot4BVCBPSDV8683?= =?utf-8?q?9sIboE05isR5f5YfpngGhYou0Ly4Qtk4ILov5gAzhneRsUpNn0poXX1s?= =?utf-8?q?trgqjrKSBilNluHROkJd5fKL0/GoKDEoByemhcJHuso8Dbj4M62yQQLq?= =?utf-8?q?pbfNW36UQZ1SnSj6GQx8b9QcoWcMh0SP/Hv0WsMKDBchfAf2MOO1uFnq?= =?utf-8?q?mOe1S0y96tpWbgumZtFh3/86mQvyDxO+wfc847j0+jqEXMjz/foT2Moz?= =?utf-8?q?5o3MnBDDKwEjxK2pjvsVHJI5MT7bRKPIvs2qnoKAAkg15lmcGiNsdLWm?= =?utf-8?q?9jhIzQR0PPg8Ls487at+6aZIAFpTn8pr6J3yZXaix6CXTQ89ejVNxMZN?= =?utf-8?q?JV/kLsFv9+W/j08aYw31iq5rZqNToeDxpoEStVVoYT9FEMcxStyqPpCK?= =?utf-8?q?hiPXqWXVRWqtLfVRbp1WAUV7DtKhQwwLLy7LMAPtUumC0ILRDVkdqaxP?= =?utf-8?q?zo5LxX4W4lkQ2hSvYBRFGuVAo8YSG8XRCA2k415VWDhxWGNE4KCivhO8?= =?utf-8?q?afCoC+0TT1I/SQIJvuf8WEwKS/P+7WLQFY6Ow/s0dTNWu/EAVt1TWrzd?= =?utf-8?q?hwID3mwqUnxBEpZ724CxbEBb65fcOTmzCJ9smCbKibxBeSlpcoWkZdFv?= =?utf-8?q?SY0TFU7I53qMjaTwb6yCgcF44ot1QuVen7B+zP+wpSGZ++MZq3K1l7kC?= =?utf-8?q?kOPZ/YAmUpwZEgHyBV+OB9WxNnYGq0zBIqT0rdtwFImef9XmHqbO8t3O?= =?utf-8?q?lM7jO7AZCyvEidk4Ha0F1BT22STM0D8?= X-OriginatorOrg: nokia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 331e8db6-02cf-4ed7-144a-08d966e13199 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0701MB3005.eurprd07.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2021 09:26:03.7095 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 3+/xL6sZ62pPjQ8M9scK/N46b5hsrvX2+tsuwPLd46eGH+Xb+QcHGrEPZlwVf+E9ze4V7ygedZX+xjM4fm0/UHUIFlmXVz+ylYR9YAgqOZECBbo3RxZ8UVulCWfjtipI X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR07MB4047 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Davinci needs to configure chipselect on transfer. Fixes: 4a07b8bcd503 ("spi: bitbang: Make chipselect callback optional") Signed-off-by: Matija Glavinic Pecotic --- drivers/spi/spi-davinci.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index f71c497393a6..c3974d996cb8 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c @@ -213,12 +213,6 @@ static void davinci_spi_chipselect(struct spi_device *spi, int value) * line for the controller */ if (spi->cs_gpiod) { - /* - * FIXME: is this code ever executed? This host does not - * set SPI_MASTER_GPIO_SS so this chipselect callback should - * not get called from the SPI core when we are using - * GPIOs for chip select. - */ if (value == BITBANG_CS_ACTIVE) gpiod_set_value(spi->cs_gpiod, 1); else @@ -950,7 +944,7 @@ static int davinci_spi_probe(struct platform_device *pdev) master->bus_num = pdev->id; master->num_chipselect = pdata->num_chipselect; master->bits_per_word_mask = SPI_BPW_RANGE_MASK(2, 16); - master->flags = SPI_MASTER_MUST_RX; + master->flags = SPI_MASTER_MUST_RX | SPI_MASTER_GPIO_SS; master->setup = davinci_spi_setup; master->cleanup = davinci_spi_cleanup; master->can_dma = davinci_spi_can_dma;