linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Rosin <peda@lysator.liu.se>
To: linux-kernel@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>, Wolfram Sang <wsa@the-dreams.de>,
	Peter Korsgaard <peter.korsgaard@barco.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Jonathan Cameron <jic23@kernel.org>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald <pmeerw@pmeerw.net>,
	Antti Palosaari <crope@iki.fi>,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>,
	Grant Likely <grant.likely@linaro.org>,
	Adriana Reus <adriana.reus@intel.com>,
	Viorel Suman <viorel.suman@intel.com>,
	Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Terry Heo <terryheo@google.com>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Tommi Rantala <tt.rantala@gmail.com>,
	linux-i2c@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH v4 15/18] i2c-mux: drop old unused i2c-mux api
Date: Thu,  3 Mar 2016 23:27:27 +0100	[thread overview]
Message-ID: <1457044050-15230-16-git-send-email-peda@lysator.liu.se> (raw)
In-Reply-To: <1457044050-15230-1-git-send-email-peda@lysator.liu.se>

From: Peter Rosin <peda@axentia.se>

All i2c mux users are using an explicit i2c mux core, drop support
for implicit i2c mux cores.

Signed-off-by: Peter Rosin <peda@axentia.se>
---
 drivers/i2c/i2c-mux.c   | 59 -------------------------------------------------
 include/linux/i2c-mux.h | 15 -------------
 2 files changed, 74 deletions(-)

diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
index 7df323a01661..e7ac7a4a7a83 100644
--- a/drivers/i2c/i2c-mux.c
+++ b/drivers/i2c/i2c-mux.c
@@ -28,12 +28,6 @@
 #include <linux/acpi.h>
 
 /* 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;
@@ -290,48 +284,6 @@ struct i2c_mux_core *i2c_mux_one_adapter(struct i2c_adapter *parent,
 }
 EXPORT_SYMBOL_GPL(i2c_mux_one_adapter);
 
-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;
-
-	muxc = i2c_mux_one_adapter(parent, mux_dev, sizeof(*priv), 0,
-				   force_nr, chan_id, class,
-				   i2c_mux_select,
-				   deselect ? i2c_mux_deselect : NULL);
-	if (IS_ERR(muxc))
-		return NULL;
-
-	priv = i2c_mux_priv(muxc);
-	priv->select = select;
-	priv->deselect = deselect;
-	priv->mux_priv = mux_priv;
-
-	return muxc->adapter[0];
-}
-EXPORT_SYMBOL_GPL(i2c_add_mux_adapter);
-
 void i2c_mux_del_adapters(struct i2c_mux_core *muxc)
 {
 	char symlink_name[20];
@@ -353,17 +305,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->adapter);
-	devm_kfree(muxc->dev, muxc);
-}
-EXPORT_SYMBOL_GPL(i2c_del_mux_adapter);
-
 MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>");
 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 0d97d7a3f03c..25c88ccf9c38 100644
--- a/include/linux/i2c-mux.h
+++ b/include/linux/i2c-mux.h
@@ -55,20 +55,6 @@ int i2c_mux_reserve_adapters(struct i2c_mux_core *muxc, int adapters);
 
 /*
  * 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 a 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.
  */
@@ -88,7 +74,6 @@ struct i2c_mux_core *i2c_mux_one_adapter(struct i2c_adapter *parent,
 					 int (*deselect)(struct i2c_mux_core *,
 							 u32));
 
-void i2c_del_mux_adapter(struct i2c_adapter *adap);
 void i2c_mux_del_adapters(struct i2c_mux_core *muxc);
 
 #endif /* __KERNEL__ */
-- 
2.1.4

  parent reply	other threads:[~2016-03-03 22:27 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-03 22:27 [PATCH v4 00/18] i2c mux cleanup and locking update Peter Rosin
2016-03-03 22:27 ` [PATCH v4 01/18] i2c-mux: add common data for every i2c-mux instance Peter Rosin
2016-03-03 22:27 ` [PATCH v4 02/18] i2c: i2c-mux-gpio: convert to use an explicit i2c mux core Peter Rosin
2016-03-03 22:27 ` [PATCH v4 03/18] i2c: i2c-mux-pinctrl: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 04/18] i2c: i2c-arb-gpio-challenge: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 05/18] i2c: i2c-mux-pca9541: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 06/18] i2c: i2c-mux-pca954x: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 07/18] i2c: i2c-mux-reg: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 08/18] iio: imu: inv_mpu6050: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 09/18] [media] m88ds3103: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 10/18] [media] rtl2830: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 11/18] [media] rtl2832: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 12/18] [media] si2168: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 13/18] [media] cx231xx: " Peter Rosin
2016-03-03 22:27 ` [PATCH v4 14/18] of/unittest: " Peter Rosin
2016-03-03 22:27 ` Peter Rosin [this message]
2016-03-03 22:27 ` [PATCH v4 16/18] i2c: allow adapter drivers to override the adapter locking Peter Rosin
     [not found]   ` <1457044050-15230-17-git-send-email-peda-SamgB31n2u5IcsJQ0EH25Q@public.gmane.org>
2016-03-04  5:58     ` kbuild test robot
2016-03-04  9:33     ` Peter Rosin
2016-03-03 22:27 ` [PATCH v4 17/18] i2c: muxes always lock the parent adapter Peter Rosin
2016-03-03 22:27 ` [PATCH v4 18/18] i2c-mux: relax locking of the top i2c adapter during i2c controlled muxing Peter Rosin
2016-03-04  5:21   ` kbuild test robot
     [not found]   ` <1457044050-15230-19-git-send-email-peda-SamgB31n2u5IcsJQ0EH25Q@public.gmane.org>
2016-03-04  7:10     ` Peter Rosin
2016-03-04 17:44   ` kbuild test robot
2016-03-04 11:01 ` [PATCH v4 00/18] i2c mux cleanup and locking update Peter Rosin
     [not found]   ` <56D96B15.8090806-SamgB31n2u5IcsJQ0EH25Q@public.gmane.org>
2016-03-04 14:49     ` Peter Rosin
2016-03-15 14:09 ` Peter Rosin
     [not found]   ` <56E817AE.2090005-SamgB31n2u5IcsJQ0EH25Q@public.gmane.org>
2016-03-15 17:08     ` Antti Palosaari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457044050-15230-16-git-send-email-peda@lysator.liu.se \
    --to=peda@lysator.liu.se \
    --cc=adriana.reus@intel.com \
    --cc=arnd@arndb.de \
    --cc=crope@iki.fi \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=hans.verkuil@cisco.com \
    --cc=jic23@kernel.org \
    --cc=k.kozlowski@samsung.com \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mchehab@osg.samsung.com \
    --cc=peda@axentia.se \
    --cc=peter.korsgaard@barco.com \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=terryheo@google.com \
    --cc=tt.rantala@gmail.com \
    --cc=viorel.suman@intel.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).