Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux

Pull i2c-embedded fixes from Wolfram Sang:
"Some bugfixes for the "embedded" part of the I2C subsystem. The fixes
affect mostly drivers which have been largely reworked lately and
where regressions appeared."

* 'i2c-embedded/for-current' of git://git.pengutronix.de/git/wsa/linux:
i2c: tegra: protect suspend/resume callbacks with CONFIG_PM_SLEEP
i2c: diolan-u2c: Fix master_xfer return code
I2C: OMAP: xfer: fix runtime PM get/put balance on error
i2c: nomadik: Add default configuration into the Nomadik I2C driver

+21 -12
+1
drivers/i2c/busses/i2c-diolan-u2c.c
··· 405 405 } 406 406 } 407 407 } 408 + ret = num; 408 409 abort: 409 410 sret = diolan_i2c_stop(dev); 410 411 if (sret < 0 && ret >= 0)
+18 -10
drivers/i2c/busses/i2c-nomadik.c
··· 350 350 351 351 i2c_clk = clk_get_rate(dev->clk); 352 352 353 - /* fallback to std. mode if machine has not provided it */ 354 - if (dev->cfg.clk_freq == 0) 355 - dev->cfg.clk_freq = 100000; 356 - 357 353 /* 358 354 * The spec says, in case of std. mode the divider is 359 355 * 2 whereas it is 3 for fast and fastplus mode of ··· 907 911 .functionality = nmk_i2c_functionality 908 912 }; 909 913 914 + static struct nmk_i2c_controller u8500_i2c = { 915 + /* 916 + * Slave data setup time; 250ns, 100ns, and 10ns, which 917 + * is 14, 6 and 2 respectively for a 48Mhz i2c clock. 918 + */ 919 + .slsu = 0xe, 920 + .tft = 1, /* Tx FIFO threshold */ 921 + .rft = 8, /* Rx FIFO threshold */ 922 + .clk_freq = 400000, /* fast mode operation */ 923 + .timeout = 200, /* Slave response timeout(ms) */ 924 + .sm = I2C_FREQ_MODE_FAST, 925 + }; 926 + 910 927 static atomic_t adapter_id = ATOMIC_INIT(0); 911 928 912 929 static int nmk_i2c_probe(struct amba_device *adev, const struct amba_id *id) 913 930 { 914 931 int ret = 0; 915 - struct nmk_i2c_controller *pdata = 916 - adev->dev.platform_data; 932 + struct nmk_i2c_controller *pdata = adev->dev.platform_data; 917 933 struct nmk_i2c_dev *dev; 918 934 struct i2c_adapter *adap; 919 935 920 - if (!pdata) { 921 - dev_warn(&adev->dev, "no platform data\n"); 922 - return -ENODEV; 923 - } 936 + if (!pdata) 937 + /* No i2c configuration found, using the default. */ 938 + pdata = &u8500_i2c; 939 + 924 940 dev = kzalloc(sizeof(struct nmk_i2c_dev), GFP_KERNEL); 925 941 if (!dev) { 926 942 dev_err(&adev->dev, "cannot allocate memory\n");
+1 -1
drivers/i2c/busses/i2c-omap.c
··· 584 584 585 585 r = pm_runtime_get_sync(dev->dev); 586 586 if (IS_ERR_VALUE(r)) 587 - return r; 587 + goto out; 588 588 589 589 r = omap_i2c_wait_for_bb(dev); 590 590 if (r < 0)
+1 -1
drivers/i2c/busses/i2c-tegra.c
··· 712 712 return 0; 713 713 } 714 714 715 - #ifdef CONFIG_PM 715 + #ifdef CONFIG_PM_SLEEP 716 716 static int tegra_i2c_suspend(struct device *dev) 717 717 { 718 718 struct tegra_i2c_dev *i2c_dev = dev_get_drvdata(dev);