Skip to content

Commit

Permalink
Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "This has a mixture of merge window cleanups and bugfixes"

* 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  i2c: st: add include for pinctrl
  i2c: mux: use proper dev when removing "channel-X" symlinks
  i2c: digicolor: remove duplicate include
  i2c: Mark adapter devices with pm_runtime_no_callbacks
  i2c: pca-platform: fix broken email address
  i2c: mxs: fix broken email address
  i2c: rk3x: report number of messages transmitted
  • Loading branch information
torvalds committed Apr 27, 2015
2 parents f583381 + fcdd5f0 commit 85f2901
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
3 changes: 1 addition & 2 deletions drivers/i2c/busses/i2c-digicolor.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@

#include <linux/clk.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ static void __exit mxs_i2c_exit(void)
module_exit(mxs_i2c_exit);

MODULE_AUTHOR("Marek Vasut <[email protected]>");
MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>");
MODULE_AUTHOR("Wolfram Sang <kernel@pengutronix.de>");
MODULE_DESCRIPTION("MXS I2C Bus Driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:" DRIVER_NAME);
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-pca-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,6 @@ static struct platform_driver i2c_pca_pf_driver = {

module_platform_driver(i2c_pca_pf_driver);

MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>");
MODULE_AUTHOR("Wolfram Sang <kernel@pengutronix.de>");
MODULE_DESCRIPTION("I2C-PCA9564/PCA9665 platform driver");
MODULE_LICENSE("GPL");
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-rk3x.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,7 @@ static int rk3x_i2c_xfer(struct i2c_adapter *adap,
clk_disable(i2c->clk);
spin_unlock_irqrestore(&i2c->lock, flags);

return ret;
return ret < 0 ? ret : num;
}

static u32 rk3x_i2c_func(struct i2c_adapter *adap)
Expand Down
13 changes: 7 additions & 6 deletions drivers/i2c/busses/i2c-st.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@
* published by the Free Software Foundation.
*/

#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/err.h>
#include <linux/of.h>
#include <linux/i2c.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/of.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>

/* SSC registers */
#define SSC_BRG 0x000
Expand Down
2 changes: 2 additions & 0 deletions drivers/i2c/i2c-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,8 @@ static int i2c_register_adapter(struct i2c_adapter *adap)

dev_dbg(&adap->dev, "adapter [%s] registered\n", adap->name);

pm_runtime_no_callbacks(&adap->dev);

#ifdef CONFIG_I2C_COMPAT
res = class_compat_create_link(i2c_adapter_compat_class, &adap->dev,
adap->dev.parent);
Expand Down
8 changes: 5 additions & 3 deletions drivers/i2c/i2c-mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ struct i2c_mux_priv {
struct i2c_algorithm algo;

struct i2c_adapter *parent;
void *mux_priv; /* the mux chip/device */
u32 chan_id; /* the channel id */
struct device *mux_dev;
void *mux_priv;
u32 chan_id;

int (*select)(struct i2c_adapter *, void *mux_priv, u32 chan_id);
int (*deselect)(struct i2c_adapter *, void *mux_priv, u32 chan_id);
Expand Down Expand Up @@ -119,6 +120,7 @@ struct i2c_adapter *i2c_add_mux_adapter(struct i2c_adapter *parent,

/* Set up private adapter data */
priv->parent = parent;
priv->mux_dev = mux_dev;
priv->mux_priv = mux_priv;
priv->chan_id = chan_id;
priv->select = select;
Expand Down Expand Up @@ -203,7 +205,7 @@ void i2c_del_mux_adapter(struct i2c_adapter *adap)
char symlink_name[20];

snprintf(symlink_name, sizeof(symlink_name), "channel-%u", priv->chan_id);
sysfs_remove_link(&adap->dev.parent->kobj, symlink_name);
sysfs_remove_link(&priv->mux_dev->kobj, symlink_name);

sysfs_remove_link(&priv->adap.dev.kobj, "mux_device");
i2c_del_adapter(adap);
Expand Down

0 comments on commit 85f2901

Please sign in to comment.