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 86422C433EF for ; Tue, 11 Jan 2022 17:16:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344282AbiAKRQ0 (ORCPT ); Tue, 11 Jan 2022 12:16:26 -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 S243073AbiAKRPm (ORCPT ); Tue, 11 Jan 2022 12:15:42 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AUY9xrpez9GoiURrNAGwXpX101BbI7suMwZ99em1BEsFFa77Py8d66Mv+cp2Nh+KAgph69j/SPQBTfJraBM3cUC2QeW6DPiNA2DVXZGqDPAQ4TatxCV75+HLOHDRPdUoOA+OdJyYhiN1Fwm1jJiz6zVhL6FtthU1GC0ucbRq1chS0taHE2UtSrjxfEPc7CwvchmsC2sggp1Uku+lkpmz1i0cUJ2nwRb3eSnQJD8geP/AwzCllt737FzQ4gfesC53Q8k/LnAYj84ZIkUVj/aVfYOBTU4nt6dQJtEkSly8eE1AJmQxcFlPS5BwoetjxPvjTFiv8hGFFhuIgfG6iYt+hA== 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=FKR/RqIimPfbxVdFm9QPX0JtwSB1m5A+/5JMbv21Loo=; b=VklzYCANVlkMvH73yLVqg2rDbT1LFEaf38TXjWbg9l9VlgXe617TkExT0QDYaoGerkuMdWkp0IY427X5cJIhAHi/FPYuYYnARP1OPYTbYqm9dYF1G1p4qqBlO8mfoXs79twNh0IR5gsQ4aCanJakO8u0T8WMezXwoV6RpPV+uD5QTQsiu0ALiB+k27/duVGPJwGsP+gDNs/vtELqGS2wA2f/o+/IAztKBsosDwlym1WZaGtNGsfOpwkLfSqTEe+G+0skYkZt+2THK+fB/jm2h7aRoT6s2qjLNv1Sb6N9zPRyBHdPChegOHqV6ffmjZc2vqiTbupWIHZ9PBl9O2vHGA== 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=FKR/RqIimPfbxVdFm9QPX0JtwSB1m5A+/5JMbv21Loo=; b=DBCXl8G48uIPRPXN0vE03BdB+PQqKySttV6nOoyAf0i/V3pm1CVRpdwuMBUwzm6eA5eFTYD//3z240KLGyf8K0labdIWGrImlokfz2aZ2jAnTZf8V6TqlaYFGTc4mLHozpuFpZ1RWwyVGg0Mf8r3M00FdzSCQ4wxqulL2SlQSoI= 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:07 +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:07 +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 08/24] wfx: add bus_sdio.c Date: Tue, 11 Jan 2022 18:14:08 +0100 Message-Id: <20220111171424.862764-9-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: 36914231-a93f-42f4-55a8-08d9d525ea1e X-MS-TrafficTypeDiagnostic: PH0PR11MB5595:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2512; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WPs0kDfrgTZ9NsOp7KGNnEsXzwWb0DQSMWplmVeidHXCQ8uYl7NixdvgLbCE0QuNTDnKHggdlVGfGf85fYb+NvC2NM7HT8iGGY/0wkz4culmyPURcyivL8gjih+IYJgL9fUmXjw0Bumb43nGfZHyB943MLfZ4uZwwmtGt5Zb5odx7HiHoS8H7bOINiEh475Y+tMuwa6xOCaLCXSc8AJmrK/EnKapE8MT65FfCuukANKNCDFxtV5cFp9E6MPPGZcpKCdmkl2Po64g/7fqRTEVG6tc00rKomxb//0POd+H71OOZZ2QgP6dvQTXR2CM9x+p0zP1OmkMl84VjHFeW5PqM+gGeIiQ8hjt0AJ1wvS141Kl7+Ts02lysWI9ScIdO27a0knshY6QrfCKs8rwqiIX6oS2NGBVtlXzyJ6UVx/gFuzkUkfJ0OzjUmKq1q7Xj2oORe0nMWmQwn4W5gGvw/malRUD+XSBF6UmgZsIjZRV9K9Mnsmyu/s1wCVWJpwPK/BPqY3278xiV9KLeBXa7VmTNUOCJHsUABlGFXyp7YUO3slMDwIqgxye7gO022ADsFRIevcF7+gfXK3v+TL5TMoi6OywOyx7a6ipy642d980JR5B0ZZIYelpL17LPXgOk+65VBVmGKl88iFXc0Ka6AsbDA== 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?THBkYTNJc0I1anM1aThYdnVHd0x0ZytMK0pBVThnODB3d01CTVpoVEY3cXVD?= =?utf-8?B?aXA2ZU04a1VCVXpDQ2pZZ0NXc0ppT2lYZ0Qvd3RxQmxwUDZCdlZTVmVlZ01s?= =?utf-8?B?enc2V1NqUXcvZ2diNGhQRlJSYisrcHd6Q0FlRUdzNlg2SVgrdnFGVGJXZWQw?= =?utf-8?B?K1VUL0JrSGxzbzZGUUhKajVkbDFzNEkyaGNMOGlISW1zTkl1Vm9KNVRQQVBi?= =?utf-8?B?TkVqWC9zQ3BLRm85NjQzaytUNlFKNFlVL1dkbm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?= =?utf-8?B?Z0RYT05BZjZJZFgzYTlpTmR4VC85WVllU01BSlg4d3d2NXZ2bTc2ZkNMNWFT?= =?utf-8?B?R09peGtQb05jRHdUQktRcytIWkZYZE9RdGkxNlFDZ3RFS1pxTUxiUnpDV056?= =?utf-8?B?QWlucEk3WDFSQ2hiTFFGZ1dnYXNPUkowZFMzWjV4RzY5d1htTHdvMDdBTzFC?= =?utf-8?Q?I+aK+oZS44zRqRloaXX+in0SL+/K4Xy1HvXv0rBdUk=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36914231-a93f-42f4-55a8-08d9d525ea1e 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:07.0019 (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: he71OrWnXT8CX8vtILnX1ZPJJztt8+WvEpyMverHSt6fQqr7QCNkCkCewjypc+YSZEzNsQKGx8skAPp3Bmjz6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5595 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29tPgoKU2ln bmVkLW9mZi1ieTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29t PgotLS0KIGRyaXZlcnMvbmV0L3dpcmVsZXNzL3NpbGFicy93ZngvYnVzX3NkaW8uYyB8IDI4MyAr KysrKysrKysrKysrKysrKysrKysKIDEgZmlsZSBjaGFuZ2VkLCAyODMgaW5zZXJ0aW9ucygrKQog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