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/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
"Two I2C driver bugfixes.

The 'VLLS mode support' patch should have been entitled 'reconfigure
pinctrl after suspend' to make the bugfix more clear. Sorry, I missed
that, yet didn't want to rebase"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: imx-lpi2c: add VLLS mode support
i2c: i2c-cadence: Initialize configuration before probing devices

+24 -4
+4 -4
drivers/i2c/busses/i2c-cadence.c
··· 962 962 goto err_clk_dis; 963 963 } 964 964 965 - ret = i2c_add_adapter(&id->adap); 966 - if (ret < 0) 967 - goto err_clk_dis; 968 - 969 965 /* 970 966 * Cadence I2C controller has a bug wherein it generates 971 967 * invalid read transaction after HW timeout in master receiver mode. ··· 970 974 * is written to this register to reduce the chances of error. 971 975 */ 972 976 cdns_i2c_writereg(CDNS_I2C_TIMEOUT_MAX, CDNS_I2C_TIME_OUT_OFFSET); 977 + 978 + ret = i2c_add_adapter(&id->adap); 979 + if (ret < 0) 980 + goto err_clk_dis; 973 981 974 982 dev_info(&pdev->dev, "%u kHz mmio %08lx irq %d\n", 975 983 id->i2c_clk / 1000, (unsigned long)r_mem->start, id->irq);
+20
drivers/i2c/busses/i2c-imx-lpi2c.c
··· 28 28 #include <linux/module.h> 29 29 #include <linux/of.h> 30 30 #include <linux/of_device.h> 31 + #include <linux/pinctrl/consumer.h> 31 32 #include <linux/platform_device.h> 32 33 #include <linux/sched.h> 33 34 #include <linux/slab.h> ··· 637 636 return 0; 638 637 } 639 638 639 + #ifdef CONFIG_PM_SLEEP 640 + static int lpi2c_imx_suspend(struct device *dev) 641 + { 642 + pinctrl_pm_select_sleep_state(dev); 643 + 644 + return 0; 645 + } 646 + 647 + static int lpi2c_imx_resume(struct device *dev) 648 + { 649 + pinctrl_pm_select_default_state(dev); 650 + 651 + return 0; 652 + } 653 + #endif 654 + 655 + static SIMPLE_DEV_PM_OPS(imx_lpi2c_pm, lpi2c_imx_suspend, lpi2c_imx_resume); 656 + 640 657 static struct platform_driver lpi2c_imx_driver = { 641 658 .probe = lpi2c_imx_probe, 642 659 .remove = lpi2c_imx_remove, 643 660 .driver = { 644 661 .name = DRIVER_NAME, 645 662 .of_match_table = lpi2c_imx_of_match, 663 + .pm = &imx_lpi2c_pm, 646 664 }, 647 665 }; 648 666