Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754549AbdIHPyQ (ORCPT ); Fri, 8 Sep 2017 11:54:16 -0400 Received: from mail-db5eur01on0125.outbound.protection.outlook.com ([104.47.2.125]:23830 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751166AbdIHPyN (ORCPT ); Fri, 8 Sep 2017 11:54:13 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; Subject: Re: [PATCH 1/2] mux: add mux_control_get_optional() API To: Hans de Goede Cc: Stephen Boyd , MyungJoo Ham , Chanwoo Choi , Guenter Roeck , Heikki Krogerus , Darren Hart , Andy Shevchenko , Mathias Nyman , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, devel@driverdev.osuosl.org, Kuppuswamy Sathyanarayanan , Sathyanarayanan Kuppuswamy Natarajan , Greg Kroah-Hartman , linux-usb@vger.kernel.org References: <20170905164221.11266-6-hdegoede@redhat.com> <20170908154514.4463-1-peda@axentia.se> <20170908154514.4463-2-peda@axentia.se> From: Peter Rosin Organization: Axentia Technologies AB Message-ID: <64cd3a6d-cf3e-89ed-0c26-65b395d18008@axentia.se> Date: Fri, 8 Sep 2017 17:54:03 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170908154514.4463-2-peda@axentia.se> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [81.224.168.30] X-ClientProxiedBy: AM5PR04CA0031.eurprd04.prod.outlook.com (2603:10a6:206:1::44) To VI1PR0202MB2558.eurprd02.prod.outlook.com (2603:10a6:801:6::9) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f7fe23db-ebb4-46b0-b0ad-08d4f6d1d811 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(2017082002075)(300000503095)(300135400095)(201703131423075)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:VI1PR0202MB2558; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0202MB2558;3:aaJmSvxz/1YwgEDBQuHeqz9aprYAd5wwVwBJ/oQr31ktgYhWwJjqjrU5FqO+3dlMb96UQqKMMzgOHRKo9UjEdyAqHcJyYr08/Gtk7z31tsnEWERfjF7WmtKQ62+6eadBWgyrjSl80rElPx9GnKOr+H/x7HS2M4iDofjoPgdL7xtICzRZoCLRUmBP311eV9BvpZqqPfDP3Nyy1fq3tUjO9p5G4nwJNoxwNIRHWw6HW+gkdkMJ9HStzIbMN8p3MKdk;25:ED6WDMUG486bza7My4RYjyB2LhBEJrYqh6cWhA8q4tA55j5XJThR3zGud7vRzFHiduKz3EpIX653g37tBoDyVmLvwyySZKTrraIfm/uo6DMBlenwWeCKop6pDECWE74whqjR5cQWKzJk4WKMZwpT0kzDqI3OIjJ4jFqooLynsj7XoZs9b+1uy5UI8ot8+MaZHV1YjbFXY9A4clRZoh+WxU/brw1p4JIF5NmsUI45cZAsSO8ZQo8Y531itz6YIbKY87Fc+V9TL7yHzv5YtlrhGZ22Tlqo2lhbIVHodOvky3XgT/K2c6yttD7z+s1Jf1YtTkUIudi6gLO0Iu4iHHWZ/w==;31:hVU94eaCt+XxpANt4XMCUftAQVAZHFg8/v+0tFaev53npqERcg5S3eeFcUJ9jJgKPvI6RapQ/pcacHpNDBiD0AT6OXsQnL2i4a4YOsQ3iXtVxIBlqlzOOt04VdcHafDyOKsx2xWqUYz9pPH81tDLmrX6b75RuQutI1M79mUeLbCqYoGhM8Ke+/E4X/wrWo3EodINvC87+RpOoluPjYQAsZsrYBtrHqyyft2a22nqCWk= X-MS-TrafficTypeDiagnostic: VI1PR0202MB2558: X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3002001)(6041248)(20161123555025)(20161123564025)(20161123560025)(2016111802025)(201703131423075)(201703061421075)(20161123562025)(20161123558100)(6072148)(6042181)(6043046)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:VI1PR0202MB2558;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:VI1PR0202MB2558; X-Microsoft-Exchange-Diagnostics: 1;VI1PR0202MB2558;4:40gDurzDMEghRh1ipUNuJIm/r+zRit+F7m9t/y0Ib1sp8rVUYsInXwv328wr/Lh1bPw3KhVtpU2xWbkj0gnpXBjvw7qnc4IM3RavAog7NCFkzbGUVNSgv2V56w4u5D7w7Zz0MM66dNmB8MNIsDeLzYjchH6CwJ9BgdS48IH5mj+uHfMrqf9+KJCfmLN2oMguiErG20d8Tdd+mFH3aWW6GF+Q9cyOcK8r+tga5Gx0pgwkLv42fE0pc4TpU5TDL9GO X-Forefront-PRVS: 04244E0DC5 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(7370300001)(6049001)(6009001)(189002)(377424004)(24454002)(199003)(31696002)(8676002)(76176999)(966005)(6916009)(3260700006)(65826007)(6666003)(7416002)(25786009)(101416001)(33646002)(4326008)(54356999)(50986999)(81166006)(64126003)(117156002)(36756003)(5660300001)(86362001)(50466002)(81156014)(2950100002)(508600001)(65956001)(53936002)(66066001)(47776003)(110136004)(2906002)(6246003)(4001350100001)(31686004)(97736004)(74482002)(7350300001)(23676002)(42186005)(65806001)(53546010)(68736007)(305945005)(105586002)(106356001)(54906002)(6306002)(6486002)(189998001)(77096006)(7736002)(6116002)(3846002)(83506001)(229853002)(230700001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR0202MB2558;H:[192.168.13.3];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtWSTFQUjAyMDJNQjI1NTg7MjM6OU5DRUhBTWkrYkFPWE83bmVpekdQR0xO?= =?utf-8?B?QksrczQ2SVIwcllyNmpwYjAvZHpjZiswcWUvY1RkbEtBRlZBN1VWYnJuRndE?= =?utf-8?B?MXlsaFNnMFhieDRRSzRGZ0NuTVpUWEdBZDF2aHp6bUc4NVhZNXBGV3UxUlRw?= =?utf-8?B?dWJVQzBPZk8zZE1hSmlYN05JT0dFSkFUUGVuMmRwWkwzTnEvakRCOHZRcE45?= =?utf-8?B?cnJZWFdWcGVNYnl3Um4zNTlnV09aanFpY0lJSWxLNmh1YjFYWVpuVkVGdVdW?= =?utf-8?B?OTBzTGZsVXVRRnNuS0dZSzZBZmZoR2V6ZVF6UGU2ZnRJb3pudFBjRUw2dGxv?= =?utf-8?B?SEpKZEdZU1hjT3RGQlA2MUpiekNHeU93N2lnRWdMbnN0UlpKTUxwL3EwdzJH?= =?utf-8?B?RTNNTlAyYkU2YUtZcE9Fd09iWGYxTzVadGhIS09LbUNodWdCaS9EUHJaOTRU?= =?utf-8?B?R1J4bmlDaUxlUWZjSjk5eStFOFpIUDVOcjNaWEdkZkVhWTBiakt2dCtuVmgr?= =?utf-8?B?bHNPeHdyYkt4WktMRWZRRHpvUzBORmMwWU9EWWQ3QkpmRUNwR0pCYWdzZlpN?= =?utf-8?B?RFRBZnNrSUJQMGFsWXhna0VGTlNpTWhDVk11UGNLaUZSbXpTa0NLZmVFTnVM?= =?utf-8?B?cExrQmlnQnJHbGY0SXc3c3BiRlhIbE4yV2ordlV6VmtHb2dTcWg5bTZXSERr?= =?utf-8?B?RWVjS3oreDdVTDFIclErZ3F6SlR0bmZHTEFVMFpCU3o4MGFyaVp4VWphVXVC?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mH89aqsOB6WxI/PDdraUjvTAA3MHEbHKDdkueH3q6urZc9F5WzFGjST29GvondK/4=;7:K5HO3ZXJjvDdwoLUPq0u2AXamoOa/XF8XgxSVM1QA1XQWbd5hglFpHdDfKgwePMtarGQCAJV68EjYZDVkqOUHQtlRMcWTQsUXTDQeE/K5BwhD4UNbhO2IZROw1fe/mrDjAHiAu8qwC/m/SWbcvCFql+btbqoNvZWRgILKBfAd8dsKoizNL5oGS+iSMDgicflblraii3qlQZqRU83Gea0G2F9Qyk6MumWkr8VdH+li6w= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2017 15:54:08.1905 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0202MB2558 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1175 Lines: 28 On 2017-09-08 17:45, Peter Rosin wrote: > From: Stephen Boyd > > Sometimes drivers only use muxes under certain scenarios. For > example, the chipidea usb controller may be connected to a usb > switch on some platforms, and connected directly to a usb port on > others. The driver won't know one way or the other though, so add > a mux_control_get_optional() API that allows the driver to > differentiate errors getting the mux from there not being a mux > for the driver to use at all. > --- > Documentation/driver-model/devres.txt | 1 + > drivers/mux/core.c | 104 +++++++++++++++++++++++++++------- > include/linux/mux/consumer.h | 4 ++ > 3 files changed, 89 insertions(+), 20 deletions(-) > > I haven't tested this patch, and hence I have not signed it and I also > removed the sign-off from Stephen... Huh, I definitely intended to mention that this patch is based on [1] from Stephen, but that I've made changes according to the comments in that thread (and more). And those changes are what made me remove the sign-off from Stephen... Sorry for the noise, Peter [1] https://lkml.org/lkml/2017/7/14/655