Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752913AbcKSNZT (ORCPT ); Sat, 19 Nov 2016 08:25:19 -0500 Received: from mail-db5eur01on0106.outbound.protection.outlook.com ([104.47.2.106]:60225 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752690AbcKSNZP (ORCPT ); Sat, 19 Nov 2016 08:25:15 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=peda@axentia.se; From: Peter Rosin To: CC: Alex Hemme , Wolfram Sang , "Wolfram Sang" , MakeB , , , Ziyang Wu , Peter Rosin Subject: [PATCH] i2c: i2c-mux-pca954x: fix deselect enabling for device-tree Date: Sat, 19 Nov 2016 10:48:38 +0100 Message-ID: <1479548918-21006-1-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [217.210.101.82] X-ClientProxiedBy: HE1PR05CA0039.eurprd05.prod.outlook.com (10.162.181.49) To HE1PR0201MB2313.eurprd02.prod.outlook.com (10.168.145.148) X-Microsoft-Exchange-Diagnostics: 1;HE1PR0201MB2313;2:2uW32nlojwPBKXjPbACn+7OVInxtrcyFSDR3aYz+yLq0wbQTdg6989vEiK5NfhheoQhYp0hB6AaGC6Z9M8NoKI0b6qHzqtJfpP5WMP+w6NZjxSr+f6AcXovJj8UgfSzExQGBATz4x2OsZs/4VZZ3rE+ROB13wG52Kf+6fmK820I=;3:nQdQX9IO8GbgQKoibUhrminIvycmPcng5PUcChwdKGYyLmjPiDwK93A7PagWZMH8/FCkU0PyF7YW8X39TaIpmyKpUJnJ9VSLPl70/n4XVZM1ffxLxvOECt97yQ6qTF/iFQDNTSBtNMq1giCSbQkZAKk4R/PhDlv42rcqWseT3ao= X-MS-Office365-Filtering-Correlation-Id: 69e35dcc-9906-49d0-d9ea-08d41061737b X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(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+cmF99ejyBkKWuKS6b41DEDL/J9GVyB2wn0B19eKHlul8WehB7Ze6/tlvH6WnmVXY9Qj5qAvggn5PGJRN7KKIpd1JKq9Rdyf9ft2aokVlaIRD020=;4:ZDMXepzXnYlqX3BYlrinzxL80/AkDzttLLgmyI2uoNfZEKMBQ4GNfyxBoi665cDHIHT6+FiJsDNwPoVHHUCOJrDnsa2xS2TWbRCSVAWSvVnhWcWCWvDzYFlHTObro5KTpeZIM/NOltA/Zoq6mk3HGcWllE88lYMhBP6gCbYA/J6ONFexdDZqEK0FmBLOu0cjwOCvQWSdFjkt9Wd9P3jGIUfPTRNmCFo7XhOeNe9y3X/PakkATaN/C/Li1Dmcx/jSsOwgMrLAZSzXAAZwcNuCr/jfOmUL68z/8zr0c/r/9mcB9bFwLVcYOtrJ/ULBEyrZl/vVCu42wNbq5ppXHH1iNjMniWGzIW813nIFo4ar6STP/eAW8c2Zd0H7/5BTv+eW0jfdpeA4NJTryuSmB3W697xH51d//tfuh3LRRpMC5g3ouIHpKc28fZ0k98muQi4/M0yumzKo4zWpHVashhcRdD4GzvlIyuwdv4nuyWV0uS5Cp/uWbSto35A5aHUIpyvboTyfPR5eue6zMcwI5NDIjd6sQbH9DTmJjkJ/VNu5MYsJZdqSKTutCEb5IhxnXgLfTC/rGE8PllYAhwpgbN6ZZkWIOp6YVszE1YiJKyVVDac= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(95692535739014); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6060326)(6040307)(6045199)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041248)(6061324)(2016111802025)(6043046);SRVR:HE1PR0201MB2313;BCL:0;PCL:0;RULEID:;SRVR:HE1PR0201MB2313; X-Forefront-PRVS: 0131D22242 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(6069001)(7916002)(199003)(189002)(6116002)(189998001)(66066001)(86362001)(4001430100002)(3846002)(107886002)(77096005)(305945005)(7846002)(42186005)(7736002)(2351001)(97736004)(50466002)(48376002)(47776003)(105586002)(92566002)(8676002)(81166006)(81156014)(2906002)(36756003)(101416001)(5003940100001)(5660300001)(33646002)(68736007)(6666003)(230783001)(110136003)(50986999)(50226002)(6916009)(74482002)(38730400001)(106356001)(4326007)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR0201MB2313;H:localhost.localdomain;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;HE1PR0201MB2313;23:k+OQZKtNHKOh6KVWqrHOUaGiXFW3okK/IEjlzHj?= =?us-ascii?Q?tTUMIkiuJc+SBCMy46FJh0c3mi50XNmylYePxDXn3iKfHGRJOI22nNdztFYV?= =?us-ascii?Q?B8oznzs6Pk4VuOuojhxK+iogzfqVvTySkY2PZx81bEm7815f/eZfV5AK92kA?= =?us-ascii?Q?V2rRmVmxWpZSBx8kNG+1MKl6dE++p4KMGQg3hfcpJ7Kovf3Dl+RcRyM2HItN?= =?us-ascii?Q?5XFXm7DucYefew28sli88Eqyu1WXCYxYrpVw1txLSXHVlko+Y2l5y/rK/zWy?= =?us-ascii?Q?rYFvQt40AjyhgWtCnsoXO07SFCOmfJDU0KmFF77DmuGrkcKAd21uXB1yhHu+?= =?us-ascii?Q?w5lLpCAzrDCqdpuPQEKEZ9oUoRVPqbugBsWxcFN0YRY4N9ajrsQiSxWPPaoA?= =?us-ascii?Q?FlHY6V4D0Z6p4oHRzfsdutaruUIclSvVi6bKYdQJQsgUG5eaALlqkx01ude2?= =?us-ascii?Q?uuv9F6zn7kWhizBAYCWPQa0WxlCReAaHIOSNgbRtGwP9kNEt+8byiSkmGFBX?= =?us-ascii?Q?1t2Z2Td7qh8ZVAEQl26uz/4ygevBgz5z9mottNWDQGGHxbr6vb1eFmGyqyd+?= =?us-ascii?Q?tcVybT3LaEBfPkSWOOKOYr6ohnyrOHdZ02cv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:KzlYEhSk419rdEWkGXkLFWyyVKHGPx4T3V/EoU9x0wPMXn6Fx4dVpaih0XZ/8Ox6LZ1DBEBcLAhVmk2GNE0u2zdxBjS89kp3SsVvuOGtxnZXGr+u2rii+C8yYHVMwreBDGAW53lj6i8A6KLX/pwm2w==;24:vTNDbOoB15hxkwRSRzHNnWnSfBmwr/aA+ldoBkSJuAhxU934ZiY+XmlhLt9lklCn3sueRzDtenCbO30MkICm9rh9BYZtgNdSQ2jTk3hWIxI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;HE1PR0201MB2313;7:PTw9A0NzPrZjIE0OIL2Nki7B3c5kBuuLoEUhn/RJlKZq15Q8aVH5Ee5QgtFNp80yaFS1awJryrEpYD3an8/aM3SacjiOmk3agFqMAnVWg6IqpTroxBtPe5MOoxVvYZmSkVfh19wQp/Ckmzn4su2fgtpWS7AJ0xcWPxf3EMZdMz33l0Mr1Fw3t70S8E+33kdij1mv1llskN/9VKpLnDTGdo+IXaY3KQ3XdOVSgvNl6WIyUAivZtsG0QSIW2NzqcIJHcQ8Gb6iHJ8aXPVOUDqH3S8SvcarBcygHeEzkqzU3XJTEJ2iWtX0I2ImI43Cj8M7p2ZJYulDP7/yE5f/Wzw9VdNI2aN2zUkH7C6xa3dQc8M= X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2016 09:50:09.3684 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0201MB2313 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1544 Lines: 46 From: Alex Hemme Deselect functionality can be ignored for device-trees with "i2c-mux-idle-disconnect" entries if no platform_data is available. By enabling the deselect functionality outside the platform_data block the logic works as it did in previous kernels. Fixes: 7fcac9807175 ("i2c: i2c-mux-pca954x: convert to use an explicit i2c mux core") Cc: # v4.7+ Signed-off-by: Alex Hemme Signed-off-by: Ziyang Wu [touched up a few minor issues /peda] Signed-off-by: Peter Rosin --- drivers/i2c/muxes/i2c-mux-pca954x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Hi! I got this regression report and patch off-list, and am now feeding it on to the appropriate places. I would like to thank Alex (and team?) for finding the bug and providing a fix for the bug that I introduced. Cheers, Peter diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 1091346f2480..8bc3d36d2837 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -268,9 +268,9 @@ static int pca954x_probe(struct i2c_client *client, /* discard unconfigured channels */ break; idle_disconnect_pd = pdata->modes[num].deselect_on_exit; - data->deselect |= (idle_disconnect_pd - || idle_disconnect_dt) << num; } + data->deselect |= (idle_disconnect_pd || + idle_disconnect_dt) << num; ret = i2c_mux_add_adapter(muxc, force, num, class); -- 2.1.4