Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8D0DC433F5 for ; Tue, 11 Jan 2022 17:15:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344148AbiAKRPt (ORCPT ); Tue, 11 Jan 2022 12:15:49 -0500 Received: from mail-mw2nam12on2061.outbound.protection.outlook.com ([40.107.244.61]:39649 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1343977AbiAKRPP (ORCPT ); Tue, 11 Jan 2022 12:15:15 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=McLO15sInIbLw5tbgnx1fGmDfAd481N95qwkIcJCxlmmyArPDPpNC7hY6UNRkeiZz+TpsjBGVCPN7Ij+o9a5iXKm8tRapVAtTUFEUX1YDmSInHtfIbopnBDm1zrCwYRv7X5O34BSWbPo/WttE+K1s4fh4gUqGNB5TWryWv8bzk/IL4MTlzgdaWyt5Do895SxX3p16FBGKEFkK8hWQLb38cDLGRPK98vDjOASr2YkHBK7mRDwbWgm2/tQdBOu90NrrL32Cyg8m+RnKb7j1xUvEr3OVAjeUgD3uhukfAARXyPeDA0I5hAwhN5rPvEgDPJiO1KOOqVQ7YIcJYRJXPVZiw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=d8LEXyL5xb1rEtqXTwZntz1tUdFOXbdlqgqU2/wWu+s=; b=INzUY/xnoJBD4sfajT6Ex19Ik2Odm+4STrdibC8ioFkxcXMn/83mBfOe1yD6qHN532p0rPofuU7dGS/nGV7lHqDyIeT44Eclj0jNgimscmS7bjkKvwozNfguSxDzR63kRa2oT3Uasd3B2yw3IsmfAjsA9zVHr+5Aod6vVKIM3+/Lvam71lH/CJDFd9i22JUI0myAzmW9Q7WsszmJh5rr/8ACNYSmHsy4I+08F77FN3aZPGUH6PABf1UsGHak5w/Acyj/JG/Na3LExtFoRn5IhnKTzF+qQX7lP53RJXgmP8+RDpWWH8ckQ3hDY7xnhCa3UrucWXtVWGADKv4FUH3kqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d8LEXyL5xb1rEtqXTwZntz1tUdFOXbdlqgqU2/wWu+s=; b=LdqD7XazfNcfO/WYo3M8RfDnRuaLNMyt2PjVh6h+WOEtsPU4WQtWs1N/NeqEV4p1/e30V8/xFhMpbXMlcpegON8PNRLSBt5yJlEOdkKKhdS9xSjzofWY5b3BdMcG32HPtBs+20HDtRrMnl+FrLmzdU05prXcIJhbk0VJ5FP3/t0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by PH0PR11MB5595.namprd11.prod.outlook.com (2603:10b6:510:e5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.7; Tue, 11 Jan 2022 17:15:04 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%6]) with mapi id 15.20.4867.012; Tue, 11 Jan 2022 17:15:04 +0000 From: Jerome Pouiller To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "David S . Miller" , devicetree@vger.kernel.org, Rob Herring , linux-mmc@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Ulf Hansson , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [PATCH v9 07/24] wfx: add bus_spi.c Date: Tue, 11 Jan 2022 18:14:07 +0100 Message-Id: <20220111171424.862764-8-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220111171424.862764-1-Jerome.Pouiller@silabs.com> References: <20220111171424.862764-1-Jerome.Pouiller@silabs.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-ClientProxiedBy: SN1PR12CA0099.namprd12.prod.outlook.com (2603:10b6:802:21::34) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 64ad4d96-ccd0-4b54-5cb0-08d9d525e899 X-MS-TrafficTypeDiagnostic: PH0PR11MB5595:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NLTjy/LOAAKXhKDoHIk/Id2ageizBADKuqyhvyACJ5j1oC9gXNN0U5xMIXDedbPd5UOKJeRmaaliMMu5/dhTPhqEvG8xfQxNJVk7naI6jERW3yDVjFF6t9E3nHR4UVvsCeJmImHVPGaHNB20Py6IoQnxfOIieiIJ4PQ6lihKOPgwp3DXNLhaev/X5jO/vYDAEGKi345HwHKsSHsAq+soZRnZFac+GHEh6dITdj1TvQ11/3bxCAMxf3MQ84NZgPLViOrPUiDMZ7PI0+fkV3EDTZNMg7j8QpcmIBb2vD5FzvKC4BdoutbpWsIEyM60FJUDh2VO+74dttX8/0MPEeBRA5Q+NY4Zc8JgSLOB0HzVgDrcB4a1WNYPVYRBk2Ma2N2SnKDJpcVjjGSnlQYmskkjfX33yTQ+WlqIYOTJIuoEzIfPYBuCmOqbTJdnN1WZ5IYqU/vWF+erwlsWEpaWjb61LGFIG8aUumcV07/R/PdRychnK3qcIuQJBRZ4wFq9SqIvaprhUzwYVvUHI3lKES+sBKoBjibex2rvJO3Iim2tbxykoU4VLn3jRgW2q7AHScfhY6BGj76qt236E7W9WhmKvkSCpovm89QH+SnO+Gxlp6dXIfmJGuqB28cd+MZb80/utBTMMaVqvwRGAJPd/3nn0g== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5657.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(36756003)(66946007)(6512007)(2906002)(107886003)(66574015)(8936002)(2616005)(7416002)(38100700002)(6506007)(4326008)(66476007)(8676002)(54906003)(6916009)(316002)(66556008)(83380400001)(52116002)(86362001)(186003)(5660300002)(6486002)(508600001)(1076003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?K3FwT0VkdTVWNXhOQlQ1bkdwSDZuM1VrdUhvNStrSWtON3Y5QWVGMGNERTNE?= =?utf-8?B?cmhLQTQ1TEFrZWg2Um9xOFlmT242K1gwNkFJY0M1Tk5tUnRhWlE2eERFanpT?= =?utf-8?B?ck9JNDhpYlUrT0U1czcvM3AwUHhkbkxTMEU1NzhGdHFqZVB2UDAzVjk5T2Jp?= =?utf-8?B?eWtWWDc5anVaRnJzSVoxOHJJZTZxYkFMTkhBclZnejZ4SmtuK3ExeS8xNnU5?= =?utf-8?B?YXVJa0xpN1JQTTB1S3pRZXE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283WGRY?= =?utf-8?B?enZJSUhTMDRhZHRMc1dsMDBLL2ZPVTJxT3ZrelhIdzBmcDAxZlBNaGJxUDVT?= =?utf-8?B?WUhpSURXVEFtT1JVb1NuR2VOSVZreWpWYWhNNmFuRUViNVBzVDBiUno1RWRr?= =?utf-8?B?Zm1HaSthKzk2UUZZckY1SnBaWjhHemQ4QjhkVjRGZ1I2RERlRmhIQ3BzaVhX?= =?utf-8?Q?F8+wVYO7l5CDYXS6PPKIVtLVBThHRSfiWXcrunXCR4=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64ad4d96-ccd0-4b54-5cb0-08d9d525e899 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2022 17:15:04.4381 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 395U7OsM9RiKEKS8QiCuVQZi7m5oOi2WY8gGgiLQ0ALb0ByK+NgWsMHuitdGLxkltSbcxzQTp7yc0X+dF6Kshg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5595 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29tPgoKU2ln bmVkLW9mZi1ieTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29t PgotLS0KIGRyaXZlcnMvbmV0L3dpcmVsZXNzL3NpbGFicy93ZngvYnVzX3NwaS5jIHwgMjk3ICsr KysrKysrKysrKysrKysrKysrKysKIDEgZmlsZSBjaGFuZ2VkLCAyOTcg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