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 5DD1EC4332F for ; Tue, 11 Jan 2022 17:15:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344033AbiAKRPX (ORCPT ); Tue, 11 Jan 2022 12:15:23 -0500 Received: from mail-dm3nam07on2065.outbound.protection.outlook.com ([40.107.95.65]:38465 "EHLO NAM02-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1343955AbiAKRPC (ORCPT ); Tue, 11 Jan 2022 12:15:02 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NX4SyPaTueeXnU1UCW4kFM7ZWEAn79tHot7xC8L/KU4BkhYlYLub2FfoDSEzQIzvKAhir4x58DQtUnL29P1QDloKfWLjysHOjqGcXcBmWsNKhLtWoVXt36djA9IfTPjL8jQTqGJuMvkzew8TUZ+ZgBCuMZ2SR/GnDXbJQ3LpAWfw9v02yxEXQMPFAhPKtxtmJb9aDFZC4kn7zGF0p1r6JcIORggxq/ARaempydWIHkPch4nze4ODWkYKV2Nz15b0i/zcoxuqFrKQkT3m7hJwGx34ZKWocPyXESyyI+EHNbYCpiUjdheHsRT21q3daBaXW+dEiblb5FuTwmC/GMKxrA== 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=MiTeny0u/cbsH682FeE+dHMx44CGaIV/DCmCDqEFrpo=; b=laceNOlVLhjJff3OKbf57atUkFO4jo9YBOPakUeLkAJ/T9TxdNv1Wdqr6yMSQ1+8o1oDQ/RbB4NoO+XbdErdqVxm4E+E0ID85qmnjDb77ck0rXJ/Kr6WvjFOC0OzuQToVsLT1KBQTH9NprjQnYyKE6OBt1AV2nl7VXftaBEDtFENmvsm/m6PszaMp7YzE0mXc417X3BL1RSpSIu0fWGLZtJA9WKRByU/FLsBMe9nv5y5jMmCKghUPLfhXh1eJVKXwrNXswFJFEaVQnZjDGDZOVK4+AE8g/o7rju3ZrBdqEdSNUlBfLpWQX7StMTIQihghSNMTom7W73HPmKt96yg5g== 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=MiTeny0u/cbsH682FeE+dHMx44CGaIV/DCmCDqEFrpo=; b=UFTWhZpQqk+zHBEqMf6OjWUwP0MYW7FqQwKFBxfX8NryzaneI/gltSHTknXrIh2hw9GtVPaMQVLxiSKqZihb0yc0FiKOipWRJXhbBiDKHDScTyt8o/z5SGpveSip0snBPilXE06NfKaKSmX52UdjBsc3cncHQVRAmzn4vEaM7Fo= 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 PH0PR11MB5674.namprd11.prod.outlook.com (2603:10b6:510:ec::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4867.11; Tue, 11 Jan 2022 17:14:59 +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:14:59 +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 05/24] wfx: add main.c/main.h Date: Tue, 11 Jan 2022 18:14:05 +0100 Message-Id: <20220111171424.862764-6-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: a272a7d3-96e2-4f89-f1de-08d9d525e558 X-MS-TrafficTypeDiagnostic: PH0PR11MB5674:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:189; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /xZvEDbT8Dw5oyta6oIwOGxWX6ajH21cCQORF7cyByoLoeoTXAw894Ma8grvnBGtca3RjuCQ6yzQH9GMCNJfY/mITAn0l1lY/UNdHoqD4fOlJWxVfKj0f3Q1u9mJJEoIpfr7l1nPIch5TMI9r7raTFrnDVlmxAkJGX2IKMrCytjpaT/LEqqzHM4HPJozb5Chc8Fp0eJG5dJuGxfk9UdPolHE+MdfYfYgbbztvmaCxzqQXW7qxVFn2YAlaBS8oDuqPZFBVCIBIdFJGti55P0hujjBVWeTPv2q6OhfHKXDkbM6clCj6biuEgzLZ95LBKZTGb8LR595syrGl5jO5r+OOJegiqOju8TF6py/JsnyCtTjr/IFve96RNQYXt+ura1eQMH0WIHBqGW4Xd8FLncXgoK9L0pD5CGkxeQ3bzZd3b/LmGB8XEtWBCZ8IeEb/vhAq5Fhb3uZYGu+reQPcenaVrQpitqPjsObmU/c3SvkqnL1pgWtH9ppi4Q6/lS2zjkhjsWauqwrnZ764Re9z/mMJkkaFVhblKYz0EjvG4hMAX/GH2gPjMYZh74XwWuoAWtVRmt0hs3KujUnXDokawLKHoJXR7HNJ1TbbMp7iX4lumNw0AnRndmBcWl8o/DlQ4JQKSVZTiWx8ZU0rOg7nwfEZz8seZX+2YerxbcdhBp1LTcT023F+ytCZEMp1UXZxYGMgaDR48xtpc8q2J5O8nDk5iUFCd7zJ3vgEKaeavkXui0= 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)(6506007)(66946007)(66574015)(8936002)(107886003)(4326008)(66476007)(508600001)(36756003)(84970400001)(7416002)(8676002)(86362001)(6916009)(83380400001)(52116002)(316002)(6512007)(2906002)(6666004)(30864003)(6486002)(1076003)(186003)(66556008)(54906003)(38100700002)(2616005)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Q3E4Z3dWMi9KWTdLRHVUbzlMTERrbXo1Ujh3UkRyUnJaeUhMSjlvakdqSmxy?= =?utf-8?B?YzdQbEFVdm53MkhrWFo2RzZNYlZpcmJsd3o5Yy9OTVp1NFYzaGt5aGJ2aEhX?= =?utf-8?B?MkVkekM3OVAvMXpMQ1Y0M1RVZFMxTld6bkorcEVaTDJaaWV5TW9vakl1K01U?= =?utf-8?B?dzBl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M1FiRmVF?= =?utf-8?B?SWdWRGhvZkxWRXJFWFVweHBQczE4aFNObHowdm1JMSt5L3pEK0FNMnhTODUr?= =?utf-8?B?b3luTnlQRHRnWnNpbTc2UWQ5YXlsblBvVkp6eW53cFlja2ZXSFI3ejQvNWN1?= =?utf-8?B?dUVGUm1xSFI2bWVrRG1OU3RkR1Y3NmpjbVlvak5xMHRuVTBnN1NUc2U3amlM?= =?utf-8?B?S0VRd1dZUkFuTzV6QlNRMFFqYnllU21EQm00WHRwQ1QwSkliYUNGaDVOODY0?= =?utf-8?Q?fP3AOA6m11z1lYBu3Hn0h3MoEnW5mhcPSm7wZp4hmw=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: a272a7d3-96e2-4f89-f1de-08d9d525e558 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:14:59.1234 (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: bzo4GycsnADactlG7Dng8z0zDbc3pGhiCOdc332dyi4hEieTk0Z1D6FXECIAqvMtX3H4VI3p9cG76EPiWgunEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5674 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29tPgoKU2ln bmVkLW9mZi1ieTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29t PgotLS0KIGRyaXZlcnMvbmV0L3dpcmVsZXNzL3NpbGFicy93ZngvbWFpbi5jIHwgNDg1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nVj dCBpZWVlODAyMTFfb3BzIHdmeF9vcHMgPSB7CisJLnN0YXJ0ICAgICAgICAgICAgICAgICAgID0g d2Z4X3N0YXJ0LAorCS5zdG9wICAgICAgICAgICAgICAgICAgICA9IHdmeF9zdG9wLAorCS5hZGRf aW50ZXJmYWNlICAgICAgICAgICA9IHdmeF9hZGRfaW50ZXJmYWNlLAorCS5yZW1vdmVfaW50ZXJm YWNlICAgICAgICA9IHdmeF9yZW1vdmVfaW50ZXJmYWNlLAorCS5jb25maWcgICAgICAgICAgICAg ICAgICA9IHdmeF9jb25maWcsCisJLnR4ICAgICAgICAgICAgICAgICAgICAgID0gd2Z4X3R4LAor CS5qb2luX2lic3MgICAgICAgICAgICAgICA9IHdmeF9qb2luX2lic3MsCisJLmxlYXZlX2lic3Mg ICAgICAgICAgICAgID0gd2Z4X2xlYXZlX2lic3MsCisJLmNvbmZfdHggICAgICAgICAgICAgICAg ID0gd2Z4X2NvbmZfdHgsCisJLmh3X3NjYW4gICAgICAgICAgICAgICAgID0gd2Z4X2h3X3NjYW4s CisJLmNhbmNlbF9od19zY2FuICAgICAgICAgID0gd2Z4X2NhbmNlbF9od19zY2FuLAorCS5zdGFy dF9hcCAgICAgICAgICAgICAgICA9IHdmeF9zdGFydF9hcCwKKwkuc3RvcF9hcCAgICAgICAgICAg ICAgICAgPSB3Znhfc3RvcF9hcCwKKwkuc3RhX2FkZCAgICAgICAgICAgICAgICAgPSB3Znhfc3Rh X2FkZCwKKwkuc3RhX3JlbW92ZSAgICAgICAgICAgICAgPSB3Znhfc3RhX3JlbW92ZSwKKwkuc2V0 X3RpbSAgICAgICAgICAgICAgICAgPSB3Znhfc2V0X3RpbSwKKwkuc2V0X2tleSAgICAgICAgICAg ICAgICAgPSB3Znhfc2V0X2tleSwKKwkuc2V0X3J0c190aHJlc2hvbGQgICAgICAgPSB3Znhfc2V0 X3J0c190aHJlc2hvbGQsCisJLnNldF9kZWZhdWx0X3VuaWNhc3Rfa2V5ID0gd2Z4X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