From patchwork Wed Apr 20 15:17:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 8892101 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8CED2BF29F for ; Wed, 20 Apr 2016 15:35:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8066A2024F for ; Wed, 20 Apr 2016 15:35:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3B23E20145 for ; Wed, 20 Apr 2016 15:35:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751964AbcDTPfh (ORCPT ); Wed, 20 Apr 2016 11:35:37 -0400 Received: from mail-db3on0108.outbound.protection.outlook.com ([157.55.234.108]:57216 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751811AbcDTPfc (ORCPT ); Wed, 20 Apr 2016 11:35:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axentiatech.onmicrosoft.com; s=selector1-axentia-se; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=yFGVNRwfCiHZwNklJj+kJsli4Nb5AnYn6YAs6xEEScY=; b=rdfsWiMq6dsM8aspT3yAY32Jf9jqBDnttRjGeYBQh16xpiim15NaQMQLt0deX8WlJQw5Fn4/Yg33WgR4XZxrd/LIe0u70LNisBnHn4Seg4dk3g+0F1sNWSZ++cbnHZhRZ3iini5/W4RHqr735mY2l3bI08SxEuwBZsIV5IYnnj8= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=axentia.se; Received: from localhost.localdomain (217.210.101.82) by VI1PR02MB1312.eurprd02.prod.outlook.com (10.165.231.154) with Microsoft SMTP Server (TLS) id 15.1.466.19; Wed, 20 Apr 2016 15:20:12 +0000 From: Peter Rosin To: CC: Peter Rosin , Wolfram Sang , "Jonathan Corbet" , Peter Korsgaard , "Guenter Roeck" , Jonathan Cameron , "Hartmut Knaack" , Lars-Peter Clausen , "Peter Meerwald" , Antti Palosaari , "Mauro Carvalho Chehab" , Rob Herring , "Frank Rowand" , Grant Likely , Andrew Morton , "David S. Miller" , Greg Kroah-Hartman , "Kalle Valo" , Jiri Slaby , Daniel Baluta , Lucas De Marchi , Adriana Reus , Matt Ranostay , Krzysztof Kozlowski , Hans Verkuil , Terry Heo , "Arnd Bergmann" , Tommi Rantala , "Crestez Dan Leonard" , , , , , , Peter Rosin Subject: [PATCH v7 15/24] i2c-mux: drop old unused i2c-mux api Date: Wed, 20 Apr 2016 17:17:55 +0200 Message-ID: <1461165484-2314-16-git-send-email-peda@axentia.se> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1461165484-2314-1-git-send-email-peda@axentia.se> References: <1461165484-2314-1-git-send-email-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [217.210.101.82] X-ClientProxiedBy: DB3PR01CA0069.eurprd01.prod.exchangelabs.com (10.242.133.172) To VI1PR02MB1312.eurprd02.prod.outlook.com (10.165.231.154) X-MS-Office365-Filtering-Correlation-Id: 488c74ab-f70c-4341-55fe-08d3692f47d2 X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB1312; 2:GWXkokT2QqNk0fD9MbYBnWxBgpv5ClBG3QVwm0OfWiwJS33KAn49UeV77D6DX1VyEzx4Ng/crfpb5ARHy5siMz7J2gWvEpU7w3XoCa5KZGIrTGefSJwYSYG8HxgdE6mx8tZNGZgdhDRYzmIOd0f/Au8xkxX85kqJaHr/k8xXCPR1qsOxEES+uBe/EoILQD1e; 3:SROpKa4VoNjONfv9l2EOlvtbaId9zWB450ivARDVgfpkB6goFQXFYSmVqHtvhkj12OGGeUCT8Oh55ZJCrNBlXbXNIuWPtUiXOYOFNaxEnwoT/p1WF+NnHzwEV19QUx/Z; 25:WzI3zywJuRMqiJIt6jQj1Fo0ZK8AuMRTmhf016WI8XrOg0S4zDGa7m0oFXLvzOgW9g1hwImN6JMXYM4FqHWAnkpCaG1BWe6bzV9jpiEmYhSk1Qet3T3yM7TCN10p5QBU4is2e64WCx4xSM3Hzpa5KzMKMQMHWAH6mYiA1nEnZRFSOLjj6W8fohl/y4htpJX8NTd+dPVyGr7lSH4QcIh3U7OzluVU/9ETLyXA6/CbgEANtfe5IxHMf2hzupAvETcUyEkRauQmJBhYifEprvC1De8gFbQO+RxumrU4GLZo0YCzO+C4/XaDypATa9svY+runCAwvkOe3aw6Q7UAakPsdA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB1312; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(9101521026)(6040130)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6041046)(6043046); SRVR:VI1PR02MB1312; BCL:0; PCL:0; RULEID:; SRVR:VI1PR02MB1312; X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB1312; 4:Gv/AQGcBBPraHQ0Pi5peJiobfobKxu1wLcmoDaPnGrNe3BzYCFouT9pPyr7wrEe9PidYGX8r7wJUC335N6WrxxjCygPkeThBnm46ItWf8MJgxxsGOHAqwzP1WkZziNe8pIZKQxMCQ9NLVFL+ceePrxJL78L/DyAyqbp/2PCNRYZb9gPGxjU1CZ+wSzBc+ZMaL94Ftko+jP4X8MjpCXTppqzE+ZeR0caQvJGDI7H9g/6Xs3LE+DnegoXhIaHOzdaeetxQpFEB5SZnx3N9O0uXWd29iRXE2z/J2CgAc5C/zviThMSnJr4vJKQTaqCFzwbMpj44WetyJPMbjQZHFpRyShA9iGQWopbjv9iaBi/RJo5x1uzrWedhFWyskxrrSHi9uB2L/JIQVepn24IvAsDt13MwAnyUFnSeQSo+optE/U3GGNo6agoyaBBqHGMascKVxPoyWo/XWl3y2aKfU+4E7g== X-Forefront-PRVS: 0918748D70 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(66066001)(2906002)(19580395003)(19580405001)(110136002)(92566002)(189998001)(5008740100001)(47776003)(42186005)(33646002)(6116002)(3846002)(5003940100001)(586003)(81166005)(48376002)(2950100001)(4326007)(50466002)(76176999)(1096002)(50226001)(77096005)(50986999)(36756003)(575784001)(86362001)(2351001)(229853001)(74482002)(5004730100002)(7059030)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR02MB1312; H:localhost.localdomain; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR02MB1312; 23:V72mvYpmguJi+3cVQgoODw6wSoPlX2p6kOeXHkXSB?= =?us-ascii?Q?GTmgQNw5moRR2GboR4zLxnMW1r0ZlHiTRXwDuP9FxsUaTZT1bOy+h03AwhUS?= =?us-ascii?Q?LjSoQ/jl8ruYzn1PcREPz3s/3iTKCXQaS82My9VtE3ScQVZjZiv7+oJ0P6pE?= =?us-ascii?Q?GAw3JXsLHNnfcAWLDF17+3Rty8EI6MxFP7xSleigc6PzSRVdOGYK1GPuBGsJ?= =?us-ascii?Q?7oPEZRC9m2w8z8h+o5d31GGcI01JOUTFOKQo8x8r+ZuKFbgjTF1+XSvS9RSD?= =?us-ascii?Q?ecfcIczRBW3KFA9l0v7eWbztOYPH+r7F4ZN0iH9W4yFZDaFhPLaT9CV5Vtec?= =?us-ascii?Q?hc/viDcbh/+yEMU2Rz/60gzfGjNrxjtYol2IGD+OdZ0pZdBhojWMofzOk3Fo?= =?us-ascii?Q?XsUbca5wbzesLtVDmS+/j4SEnsuO3HyCdRQ41JB7UUJ87ekfATyDoBwdDhE6?= =?us-ascii?Q?W8usnBhSkkUvmfGWGsPL5BKTO+Q9A/unPCLCLUL3KT6afyVddguMDLWyUxPJ?= =?us-ascii?Q?Wz2ojJPJ7v+vu3VJmYiqGXhFNd4wFw732N+i8UIDxqyjp56Eh4kKlUdG0u3h?= =?us-ascii?Q?WU8lbjslA037ruJfAGhE8TJkej5zbdg/p7wLEzLcCsN8S9RTXn+ejapSQ3fh?= =?us-ascii?Q?Ors0VEbPbHNthT0673r5Xv8c3Zht3MejatFB3wQTojOu49j1wR1zHBXI9sT3?= =?us-ascii?Q?1es+3AVJf0GbduogyKqk5S17HtFeGNcQ6nZvERUOxNeopkK9IZp96Ni4OzBr?= =?us-ascii?Q?YLmw5i7l3nAE48edVKKDW/KHengJg1t3U6ljNV0pAKfQUM5W2x9F01kC2fYW?= =?us-ascii?Q?44O80iPX1DBmo+uWlzX/xvtkDMXGpe3g+cSrXRppC/v8oo2084wqjBcil9RN?= =?us-ascii?Q?hCbhGyqWkNjwAZsM5B8nDF09D9q481jRbG3L9mgxF6GdNyqzX0CIdIdKovCe?= =?us-ascii?Q?J0PAtGwz21c6UID1Cej3bDWvJDhiAZsssTYkJrjByEwSFb73+afnJaSAyH6M?= =?us-ascii?Q?Hs=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR02MB1312; 5:glpADR5fSNR5qjuxaBfGf8PXgeVRmsZlufQzSGC+vyEf2Jq2axJtTSA+HoRM7uOKbn/ZPyF+6DwzfzPnp9SyTE1w55FqBvZ17qGTaOoijNYgwINQTdMY6lVJ7IHRttUilyeUw79m2QX4C2szLj1iHNwGdvNq+zmTLEnj8N4He7Nn8Bks7/zCBVZasqirjFgR; 24:0Hq6kDURnJFj62M+fj6OTwZb54+kvGWAj7fBql6xek+U798uVAV3C8MNw4t1YFETRvZMhNPy/kltnAxxUkdLgl8iLs0cbN3ym/pX45wODmU=; 7:rm29t7Ik1inera8IXJUVsbMXVMGRfdfy6uhm+pyjcOPw0nHJhEb1rSSRsDjKDLtPc63jcRCuN89aO1I5gEuS7Emz5fnkL7htrzRvfzJB3pso5K7fpLdXTkXY6z333cJOv2fsoGenbZ8eqqPDbnqMHjP13ZLfYguRBkgH1Bcd/+jP7OgVlqs2kw1TDvGkDQBkKGH5i7ma59jk9+lyRM7xdgwHgboenqpdc4cdOp5r6O0= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Apr 2016 15:20:12.9654 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB1312 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All i2c mux users are using an explicit i2c mux core, drop support for implicit i2c mux cores. Signed-off-by: Peter Rosin --- drivers/i2c/i2c-mux.c | 63 ------------------------------------------------- include/linux/i2c-mux.h | 15 ------------ 2 files changed, 78 deletions(-) diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index 5ce1b0704cb5..25e9336b0e6e 100644 --- a/drivers/i2c/i2c-mux.c +++ b/drivers/i2c/i2c-mux.c @@ -28,12 +28,6 @@ #include /* multiplexer per channel data */ -struct i2c_mux_priv_old { - void *mux_priv; - int (*select)(struct i2c_adapter *, void *mux_priv, u32 chan_id); - int (*deselect)(struct i2c_adapter *, void *mux_priv, u32 chan_id); -}; - struct i2c_mux_priv { struct i2c_adapter adap; struct i2c_algorithm algo; @@ -104,53 +98,6 @@ static unsigned int i2c_mux_parent_classes(struct i2c_adapter *parent) return class; } -static int i2c_mux_select(struct i2c_mux_core *muxc, u32 chan) -{ - struct i2c_mux_priv_old *priv = i2c_mux_priv(muxc); - - return priv->select(muxc->parent, priv->mux_priv, chan); -} - -static int i2c_mux_deselect(struct i2c_mux_core *muxc, u32 chan) -{ - struct i2c_mux_priv_old *priv = i2c_mux_priv(muxc); - - return priv->deselect(muxc->parent, priv->mux_priv, chan); -} - -struct i2c_adapter *i2c_add_mux_adapter(struct i2c_adapter *parent, - struct device *mux_dev, - void *mux_priv, u32 force_nr, u32 chan_id, - unsigned int class, - int (*select) (struct i2c_adapter *, - void *, u32), - int (*deselect) (struct i2c_adapter *, - void *, u32)) -{ - struct i2c_mux_core *muxc; - struct i2c_mux_priv_old *priv; - int ret; - - muxc = i2c_mux_alloc(parent, mux_dev, 1, sizeof(*priv), 0, - i2c_mux_select, i2c_mux_deselect); - if (!muxc) - return NULL; - - priv = i2c_mux_priv(muxc); - priv->select = select; - priv->deselect = deselect; - priv->mux_priv = mux_priv; - - ret = i2c_mux_add_adapter(muxc, force_nr, chan_id, class); - if (ret) { - devm_kfree(mux_dev, muxc); - return NULL; - } - - return muxc->adapter[0]; -} -EXPORT_SYMBOL_GPL(i2c_add_mux_adapter); - struct i2c_mux_core *i2c_mux_alloc(struct i2c_adapter *parent, struct device *dev, int max_adapters, int sizeof_priv, u32 flags, @@ -305,16 +252,6 @@ void i2c_mux_del_adapters(struct i2c_mux_core *muxc) } EXPORT_SYMBOL_GPL(i2c_mux_del_adapters); -void i2c_del_mux_adapter(struct i2c_adapter *adap) -{ - struct i2c_mux_priv *priv = adap->algo_data; - struct i2c_mux_core *muxc = priv->muxc; - - i2c_mux_del_adapters(muxc); - devm_kfree(muxc->dev, muxc); -} -EXPORT_SYMBOL_GPL(i2c_del_mux_adapter); - MODULE_AUTHOR("Rodolfo Giometti "); MODULE_DESCRIPTION("I2C driver for multiplexed I2C busses"); MODULE_LICENSE("GPL v2"); diff --git a/include/linux/i2c-mux.h b/include/linux/i2c-mux.h index 71ac1b3f4f68..2fa93fe1345e 100644 --- a/include/linux/i2c-mux.h +++ b/include/linux/i2c-mux.h @@ -53,20 +53,6 @@ static inline void *i2c_mux_priv(struct i2c_mux_core *muxc) } /* - * Called to create a i2c bus on a multiplexed bus segment. - * The mux_dev and chan_id parameters are passed to the select - * and deselect callback functions to perform hardware-specific - * mux control. - */ -struct i2c_adapter *i2c_add_mux_adapter(struct i2c_adapter *parent, - struct device *mux_dev, - void *mux_priv, u32 force_nr, u32 chan_id, - unsigned int class, - int (*select) (struct i2c_adapter *, - void *mux_dev, u32 chan_id), - int (*deselect) (struct i2c_adapter *, - void *mux_dev, u32 chan_id)); -/* * Called to create an i2c bus on a multiplexed bus segment. * The chan_id parameter is passed to the select and deselect * callback functions to perform hardware-specific mux control. @@ -75,7 +61,6 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, u32 force_nr, u32 chan_id, unsigned int class); -void i2c_del_mux_adapter(struct i2c_adapter *adap); void i2c_mux_del_adapters(struct i2c_mux_core *muxc); #endif /* __KERNEL__ */