Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753489AbdGJKHS (ORCPT ); Mon, 10 Jul 2017 06:07:18 -0400 Received: from mail-he1eur01on0128.outbound.protection.outlook.com ([104.47.0.128]:39264 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752509AbdGJKHQ (ORCPT ); Mon, 10 Jul 2017 06:07:16 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=axentia.se; Subject: Re: [PATCH v1 1/1] mux: Add new API to get mux_control ref by device name. To: "Kuppuswamy, Sathyanarayanan" , sathyanarayanan.kuppuswamy@linux.intel.com Cc: linux-kernel@vger.kernel.org References: <08b3c179-6e58-73c7-5221-4b9b12d7ea9c@axentia.se> <1e69f7d9-0973-71b7-86d3-534c046c5e0b@gmail.com> From: Peter Rosin Organization: Axentia Technologies AB Message-ID: <84f60a9d-c843-df7b-2c28-f5b9d17e776c@axentia.se> Date: Mon, 10 Jul 2017 12:07:08 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <1e69f7d9-0973-71b7-86d3-534c046c5e0b@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [81.224.168.30] X-ClientProxiedBy: HE1PR05CA0229.eurprd05.prod.outlook.com (2603:10a6:3:fa::29) To DB6PR0202MB2552.eurprd02.prod.outlook.com (2603:10a6:4:1b::10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ed4efdbd-535d-4329-4e55-08d4c77b6faf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DB6PR0202MB2552; X-Microsoft-Exchange-Diagnostics: 1;DB6PR0202MB2552;3:0HzeW11mYh/DrMFXLF65pCmr1rLZt099p3cWEUakL3j4i5n1P47gA2wn8VOJPrGXb2JOf74ekEW7p/6peXaoUHiuQAFRCKBGNFaZUg3BlVCobgIOir+5WRymdGcdwcvhkCHRmnIHMUnjdQqTz3p906RJMn+ulFrpbGQ/YPvPRRxR7PwvTYd0VJg7IoMw74aaZQkk+vTGkc484O465aM/X/nnoVEFWGTq2+HurD1zTivV8p3hdHXdZ4jFLEv5Kjm/px6Mi7AlTwLOPLvyRppBaXuRPQifmTt3DTgMZfUkRuRAslObWvMYVjgLrXTqgUf2BhfWbAmC7h9sPRQ6MMuDEwctYmjIjmdHOBTuRZX+xsZcFKCi+4EMPe2EW0NwG3Dsclzr719dOhVQec06hEghZ9w2YNB4igd1z5rk/DCQZhFQY5TCgH8xQhFN52qokRPKlbPAKBip7ynQlQLQtpVxTgye/wnJeovpHWO47UIEvHKwNKNB3WcsbpNEJbm3DZLz0ZLjlYrWmvBTiyGtYM/Pd0Lhmmco5xit0fuEhgNcUObYvBpT0cfPznhgsIdhI70tDsXSVbMF/TzdBxjlc00i8QsRMxBwyvhHiEuKpulkH/hjnXM/z4vn5bQHE7A2F5nVHgJ+jxUPpwrKf/s27X1dJfJirLL9Qlrv9H9b2W5/76FrGCx+gyN0511cvOoU75Q7zdkm4wuIvyis2I0mHqTyTw== X-MS-TrafficTypeDiagnostic: DB6PR0202MB2552: X-Microsoft-Exchange-Diagnostics: 1;DB6PR0202MB2552;25:1XSnY+IkH0HcgSluD/RP7EaR0uPQLVrqpU/p6BBXWWpeRwfkV337Uo+HubXHmt0uGNzJhKrDonUv34IuMo4wWfj6k7yPOoxffo7dIve9XFiBfxUZwLnTMdlMGi4YSze/xTX8CtVnCb60+aDHr8G2xzVH/bZKblbzjBEE7qTzJHNTKpdljnWaTj+/+Z9M+yCbvIYKKzYaWcOyYvFPz8jDb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dMw8qT1kuer692F42DcpZx41NkLm8NE1vrIXm7Wy3m1ERQwVxMbrMx9WnC6Nwp3N0cY3IxDtHcYZ9q6X+x5nrSysWgnY8+ZA4E4siFYP5BnD7naAxCUuOXBv+jnSKtmMjW9b3ZDgL9yOJ71ZTztKIfICh/P8wIL1cAEl+EV1TqSOggq97B91RFoBv3ZsHpnZRKk1F0sgym9wNGpcLDw0UpAmH32K0WUj3yatJ2dUrIVt7NUlew3cfCVsTZBKXqJk2m96aBTodp6CkgcLpZVJrMR9gzeXPTmNx4OeV4nfcXx3HOT8NTwEy9LYdyFqjoUzff+JKhhDpaOuGPZBOb8/0Yr4wbh3z8wjTAA8vdtfHuS7qFwhW6sZChLd/pcnNXiawhhHRj6CgNIg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(148574349560750)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6041248)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(2016111802025)(20161123560025)(20161123564025)(6072148)(6043046)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DB6PR0202MB2552;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DB6PR0202MB2552; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjAyMDJNQjI1NTI7NDp1M3ZLeDBiTmxVR2pQTE0xcEI3bkhPWnQ3?= =?utf-8?B?Y1hLQzJKaVpKUDlvU1kzNzhKZCtoTllSOWd2OGFOa1FZcm9DZU1KdVFQYnRz?= =?utf-8?B?NFVhdXRlVWFQbG1LVEVoSk9uaFphTjdQVk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cWxTakIzY3hnV2U0MDZ3eTY2S1d0MnBtNXBPN0daT2E4azVq?= =?utf-8?B?RERVc1hHNnY1UWoxOW9ndko5M3dCb0F3SjI0UzFNVzBzUjRNbGxMMzlmM2py?= =?utf-8?B?MmNsdm5JaXpFRDBKVDFBVllYNDU4dGlaU295Y0tTTXpJZjBqL1piMnlnVEs2?= =?utf-8?B?SzYvUmhtOU80T09JdDB3M0laVnRQZWErRXpJK21jYkpUNUN4L2NDbVd3WFNV?= =?utf-8?B?V1g0K3FKRDh6WTZRMExLNmd5bFJYM2lqaFhqVks3OFRHWUZYRkxSMG1PREU3?= =?utf-8?B?ZTFHazJoZy9qUStxTit5UVBDeTgrWWVNYk9XTVowQXZDMTdXRnRTdEdwM0Fi?= =?utf-8?B?Z1hoQll5SC8yOGcvaklXSWJKRFIrVGF0K1VwWjhYUXI5ME5mMjhFYWhRbFFN?= =?utf-8?B?akM0SThQN0RUVTV6cGRLdFVpTU5CSytOS3ExeDNSQWdnMVdqUEp4N0loZ2ZX?= =?utf-8?B?WFBNbDR2Vm43RUVRcU9RS21XenB1WWljZkpmWlJoby9FaWdrMEdRL3hDZERB?= =?utf-8?B?MHM2UU9QNHhnSUNqYVZ5WkVhN3hMdFZJOHpUTW4vZVpsT1hlcnl5ZmtmWThR?= =?utf-8?B?YkIrZmxwa1QwQkV2cFJWZkhYc3gzWUFYdEN4cEVMVDZhTkFGU3BDeEtubjEw?= =?utf-8?B?S3hXZFB3aU5SOUZlQ0g4dGk1cFltbGE0V2h4OU5YZzd1c3h0OUdLVHd6RC9q?= =?utf-8?B?SUVMRERTR010bWhMTXhvY0R0NDdGK2kvN2NGYjZ6N1gzbWRtak1yb3c5RVJk?= =?utf-8?Q?gxvto4kumkmNMQ?= X-Forefront-PRVS: 03648EFF89 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(7370300001)(4630300001)(6009001)(6049001)(39400400002)(39410400002)(39830400002)(39450400003)(377454003)(377424004)(24454002)(74482002)(31686004)(8676002)(81166006)(5660300001)(7736002)(2906002)(53546010)(189998001)(53936002)(7350300001)(42186005)(83506001)(23676002)(110136004)(38730400002)(305945005)(6306002)(31696002)(6246003)(65826007)(86362001)(50466002)(3846002)(6116002)(117156002)(47776003)(966005)(77096006)(230700001)(25786009)(50986999)(76176999)(54356999)(478600001)(4001350100001)(6666003)(229853002)(6486002)(36756003)(33646002)(65956001)(64126003)(65806001)(2950100002)(66066001)(4326008)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:DB6PR0202MB2552;H:[192.168.13.3];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjZQUjAyMDJNQjI1NTI7MjM6cCt3ZE9Sck9sUE5uNmxqeXdNU09wbjFL?= =?utf-8?B?azZaWjhlQjVvQ0VTcW04RERWclRKRzFYUUVmK1ZLZTlQdkZud3gyR2JjVWhK?= =?utf-8?B?MUNTLzBNSWg2RzlybHJmYUc4R3NzVVNlVzcreHpybzgydWdtQlRURU9zTkla?= =?utf-8?B?UnNlSGZYUjRSUHVwbkVvbzR5U09oTVZlbmZzQXEyRUtqa3dVZ2Z1bnQxTXJI?= =?utf-8?B?MDhmWk1neVNaVGUxL2FuODFlNnNpSXh0SkgwcVYzdmIwcDhzS3RlMFo3b2lJ?= =?utf-8?B?SE1oY3ArS3M4dGVwakMrYVpwYzEvSEo5Q2ZEM1h2aGVRSjgzM2MwVGR6VVBv?= =?utf-8?B?SzlIMnExeTROMzZidDhHSzVlRW1UbGV3akdNaUJTQzc1cXFyamZaQTduTEhT?= =?utf-8?B?aUpqNHhaWjkwTTVGZ2k3ZExwRGhuWWFpYXcyVG5OcFBWMllWZ1E4Z25uUUVF?= =?utf-8?B?dE9NRW5nMGhHWlpyVXh4ODVFY0dleEtHQW1vVGJseDVDRVRXaUh2RGhmMVdQ?= =?utf-8?B?ZjN2TExRcHp6ZHgzeTFEM2xxT2lEamVDWHVQRXQzYTBDd2xxM0lnbVRsYmc3?= =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dnUzM2tzemNLMlZzVTNvbk4vSDE1TUFt?= =?utf-8?Q?YwZWqkz4scX0BwHwHTr3kKbxGGFePHXC8=3D?= X-Microsoft-Exchange-Diagnostics: 1;DB6PR0202MB2552;5:BGSca9NNOg06dioo4gxnd1wJKWFmr3CIHXG763cTwS5VpH8tIr0YXkNyg2dBP9dpIn82gtcud28eChEVAENuVcfuB5shRRjDCqzeUQ0utlyZ887w24ZgMU++0kqwZiTyVljwy8OmtT5kR1V52Y0JfdTPG+wveR7hV3aqxe4cd/CnOdi/qRZhMZ7X3LS6algqalInzZBR60YlIky068ChnR00/6VzRCmORUnmxE8hUNetAGJST/eWDsGbpkK3A4XYiUT+bkPfrniGFmEoxrPGsLugHJlgnN7WI2SyVjGWj2/2nkDLvNLX5Qrj5qwqilrogjnqRmbCHVgQs3Bj43nU2vewlheIKaO8nylnRfVPUEUBOFewwj7np2vzWu/hhLhadkUyNJuup2jOwsXHa3y4wwPROq6sV96iOQgKWFZbIyJQmYUIEdB5VMAMHqdaKlsTx+buA1ML89Ie7D8x9Nqi5RNhX1ZfscbleBcSn0krVBkfeF2Wsnrzutkhqf8F5y2o;24:lAPL4zbd6qYbeU1sCHJ+cjcD+MQY7uPFcCT7h/Wa2vgARBqweXgqaOgFZ9zTACP76cAp1/xdWmw0ncNHvm0KugRgj/J9gA7oxNik960PA5U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DB6PR0202MB2552;7:Ffh6QGNvPxdEUkF0Ly08JszQMm7XwJjYD08TLjHIkUGM4lWVKYrbCqqtQ55m3HM8aIYVBSsOEp/s3xuAchcKJvTwGdYFFQa0J7tUCoagCZZW7Gnf/XLcO4mcubqWIfEQ58HhjZ0sC6Wwpo+ulNE4hzg+DkckH5Mnezo+Cdhw115sqZHqDtrLJTT9CbRgo6nnaZ3KpKwT5hSy8Fl7lpCrFmyOGdI1uWnG4E2QJ2pRQoC/nPzrjTpMIgDEGKm9sn1L4hcx0k8kHH6X+l03lntWVqTjs6qCN0iBA4hxnBOp+DYn5A4r5O5UTjQVO+ucBk7JSyRiExraqHieyebe020Tv3pvo5ixvIZ+qOooFH3INyCvbEuhhfDwgMwZSsqc+dmgZ+t2CrpZ2FG8Qygy4dx1RvEMl5dljF1GfICyvDdaV8XkBkau/8wQ2pJyWVFiJO8+Vtb8O4rED60/huP34oVT7bxddfrsYbn43UjHf2gm30ZDI/0CfPpf7OCD/0nPvwrajYH9sMhLRsFzqemXUT+o9Uh4Bdjdf/4DMQUDVYjeNWrwKjFanIvNo0yzO7nLKQmM3cOjzbhUeXFg15HfjSR6l5qhIc3KPhzHQSfyXAMUKsvomjhlyK2f+Sntd1PKxcZkzR/+I1DdysTI7Ug+QhuLzjOVtRThsU8abhY7vPR4M8wKyTULtya0fLjPQNccpsY4BY1G+zaX2ntgWkHRAW6FNAVkTswxX2848yP3m0+kzQMNE419zWDPwDXZGJcrORd2rXzHdgcCDB03DMe/lnliljE1loKzXD+vr5ggr0D86zY= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2017 10:07:12.6290 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0202MB2552 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4232 Lines: 113 On 2017-07-09 01:24, Kuppuswamy, Sathyanarayanan wrote: > Hi Peter, > > On 7/8/2017 2:12 PM, Peter Rosin wrote: >> On 2017-07-08 00:03, sathyanarayanan.kuppuswamy@linux.intel.com wrote: >>> From: Kuppuswamy Sathyanarayanan >>> >>> Currently this driver only provides a single API, mux_control_get() to >>> get mux_control reference based on mux_name, and also this API has tight >>> dependency on device tree node. For devices, that does not use device >>> tree, it makes it difficult to use this API. This patch adds new >>> API to access mux_control reference based on device name, chip index and >>> controller index value. >> I assume this is for the Intel USB Multiplexer that you sent a driver for >> a month or so ago? If so, you still have not answered these questions: > I am not planning to merge the Intel USB MUX driver any more. I agree > with Hans comments > and decided not to proceed further on this approach. > > But I created these helper functions to get my driver working with MUX > framework. Since these > helper functions can be useful for any non-dt drivers who wants to use > MUX framework, I thought > to submit these changes for review. >> >> Is any other consumer in the charts at all? Can this existing consumer >> ever make use of some other mux? If the answer to both those questions >> are 'no', then I do not see much point in involving the mux subsystem at >> all. The Broxton USB PHY driver could just as well write to the register >> all by itself, no? >> >> that I asked in https://lkml.org/lkml/2017/5/31/58 >> >> What is the point of that driver? >> >>> Signed-off-by: Kuppuswamy Sathyanarayanan >>> --- >>> drivers/mux/mux-core.c | 114 +++++++++++++++++++++++++++++++++++++++++++ >>> include/linux/mux/consumer.h | 6 ++- >>> 2 files changed, 119 insertions(+), 1 deletion(-) >>> >>> diff --git a/drivers/mux/mux-core.c b/drivers/mux/mux-core.c >>> index 90b8995..f8796b9 100644 >>> --- a/drivers/mux/mux-core.c >>> +++ b/drivers/mux/mux-core.c >>> @@ -422,6 +422,87 @@ static struct mux_chip *of_find_mux_chip_by_node(struct device_node *np) >>> return dev ? to_mux_chip(dev) : NULL; >>> } >>> >>> +static int dev_parent_name_match(struct device *dev, const void *data) >>> +{ >>> + const char *devname = dev_name(dev->parent); >>> + unsigned int i; >>> + >>> + if (!devname || !data) >>> + return 0; >>> + >>> + for (i = 0; i < strlen(devname); i++) { >>> + if (devname[i] == '.') >>> + break; >>> + } >>> + >>> + return !strncmp(devname, data, i-1); >> Ouch, strlen as a termination test is wasteful, you want to remove the loop >> and do something like this >> >> return !strncmp(devname, data, strcspn(devname, ".")); > will fix it in next version. >> >>> +} >>> + >>> +/** >>> + * mux_chip_get_by_index() - Get the mux-chip associated with give device. >>> + * @devname: Name of the device which registered the mux-chip. >>> + * @index: Index of the mux chip. >>> + * >>> + * Return: A pointer to the mux-chip, or an ERR_PTR with a negative errno. >>> + */ >>> +static struct mux_chip *mux_chip_get_by_index(const char *devname, int index) >>> +{ >>> + struct device *dev; >>> + int found = -1; >>> + >>> + if (!devname) >>> + return ERR_PTR(-EINVAL); >>> + >>> + do { >>> + dev = class_find_device(&mux_class, NULL, devname, >>> + dev_parent_name_match); >>> + >>> + if (dev != NULL) >>> + found++; >>> + >>> + if (found >= index) >>> + break; >>> + } while (dev != NULL); >> This loop is broken. class_find_device will always return the same device. > Good catch. I did not test the case with multiple chips. So I failed to > notice this. >> >> Also, if you fix the loop, why is the ordering stable and something to rely >> on? You failed to comment on this very important point. Sorry for not putting more emphasis on it. So, before you waste more time on the indexed approach, have a look at e.g. the pwm core with its pwm_get (which takes a name) and its *deprecated* pwm_request (which takes an index). I think having a lookup table (like pwm) is closer to what the mux core should do. Or something like that. Cheers, peda