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

Pull i2c fixes from Wolfram Sang:
"I2C has three driver fixes for the newly introduced drivers and one ID
addition for the i801 driver"

* 'i2c/for-current-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
i2c: i2c-stm32f7: make structure stm32f7_setup static const
i2c: ensure termination of *_device_id tables
i2c: i801: Add support for Intel Cedar Fork
i2c: stm32f7: fix setup structure

+14 -10
+1
Documentation/i2c/busses/i2c-i801
··· 36 36 * Intel Gemini Lake (SOC) 37 37 * Intel Cannon Lake-H (PCH) 38 38 * Intel Cannon Lake-LP (PCH) 39 + * Intel Cedar Fork (PCH) 39 40 Datasheets: Publicly available at the Intel website 40 41 41 42 On Intel Patsburg and later chipsets, both the normal host SMBus controller
+1
drivers/i2c/busses/Kconfig
··· 131 131 Gemini Lake (SOC) 132 132 Cannon Lake-H (PCH) 133 133 Cannon Lake-LP (PCH) 134 + Cedar Fork (PCH) 134 135 135 136 This driver can also be built as a module. If so, the module 136 137 will be called i2c-i801.
+4
drivers/i2c/busses/i2c-i801.c
··· 68 68 * Gemini Lake (SOC) 0x31d4 32 hard yes yes yes 69 69 * Cannon Lake-H (PCH) 0xa323 32 hard yes yes yes 70 70 * Cannon Lake-LP (PCH) 0x9da3 32 hard yes yes yes 71 + * Cedar Fork (PCH) 0x18df 32 hard yes yes yes 71 72 * 72 73 * Features supported by this driver: 73 74 * Software PEC no ··· 205 204 206 205 /* Older devices have their ID defined in <linux/pci_ids.h> */ 207 206 #define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS 0x0f12 207 + #define PCI_DEVICE_ID_INTEL_CDF_SMBUS 0x18df 208 208 #define PCI_DEVICE_ID_INTEL_DNV_SMBUS 0x19df 209 209 #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22 210 210 #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 ··· 1027 1025 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS) }, 1028 1026 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_SMBUS) }, 1029 1027 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_SMBUS) }, 1028 + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CDF_SMBUS) }, 1030 1029 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DNV_SMBUS) }, 1031 1030 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BROXTON_SMBUS) }, 1032 1031 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS) }, ··· 1516 1513 case PCI_DEVICE_ID_INTEL_CANNONLAKE_LP_SMBUS: 1517 1514 case PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS: 1518 1515 case PCI_DEVICE_ID_INTEL_LEWISBURG_SSKU_SMBUS: 1516 + case PCI_DEVICE_ID_INTEL_CDF_SMBUS: 1519 1517 case PCI_DEVICE_ID_INTEL_DNV_SMBUS: 1520 1518 case PCI_DEVICE_ID_INTEL_KABYLAKE_PCH_H_SMBUS: 1521 1519 priv->features |= FEATURE_I2C_BLOCK_READ;
+1
drivers/i2c/busses/i2c-sprd.c
··· 627 627 628 628 static const struct of_device_id sprd_i2c_of_match[] = { 629 629 { .compatible = "sprd,sc9860-i2c", }, 630 + {}, 630 631 }; 631 632 632 633 static struct platform_driver sprd_i2c_driver = {
+7 -10
drivers/i2c/busses/i2c-stm32f7.c
··· 215 215 unsigned int msg_num; 216 216 unsigned int msg_id; 217 217 struct stm32f7_i2c_msg f7_msg; 218 - struct stm32f7_i2c_setup *setup; 218 + struct stm32f7_i2c_setup setup; 219 219 struct stm32f7_i2c_timings timing; 220 220 }; 221 221 ··· 265 265 }, 266 266 }; 267 267 268 - struct stm32f7_i2c_setup stm32f7_setup = { 268 + static const struct stm32f7_i2c_setup stm32f7_setup = { 269 269 .rise_time = STM32F7_I2C_RISE_TIME_DEFAULT, 270 270 .fall_time = STM32F7_I2C_FALL_TIME_DEFAULT, 271 271 .dnf = STM32F7_I2C_DNF_DEFAULT, ··· 537 537 writel_relaxed(timing, i2c_dev->base + STM32F7_I2C_TIMINGR); 538 538 539 539 /* Enable I2C */ 540 - if (i2c_dev->setup->analog_filter) 540 + if (i2c_dev->setup.analog_filter) 541 541 stm32f7_i2c_clr_bits(i2c_dev->base + STM32F7_I2C_CR1, 542 542 STM32F7_I2C_CR1_ANFOFF); 543 543 else ··· 887 887 } 888 888 889 889 setup = of_device_get_match_data(&pdev->dev); 890 - i2c_dev->setup->rise_time = setup->rise_time; 891 - i2c_dev->setup->fall_time = setup->fall_time; 892 - i2c_dev->setup->dnf = setup->dnf; 893 - i2c_dev->setup->analog_filter = setup->analog_filter; 890 + i2c_dev->setup = *setup; 894 891 895 892 ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-rising-time-ns", 896 893 &rise_time); 897 894 if (!ret) 898 - i2c_dev->setup->rise_time = rise_time; 895 + i2c_dev->setup.rise_time = rise_time; 899 896 900 897 ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-falling-time-ns", 901 898 &fall_time); 902 899 if (!ret) 903 - i2c_dev->setup->fall_time = fall_time; 900 + i2c_dev->setup.fall_time = fall_time; 904 901 905 - ret = stm32f7_i2c_setup_timing(i2c_dev, i2c_dev->setup); 902 + ret = stm32f7_i2c_setup_timing(i2c_dev, &i2c_dev->setup); 906 903 if (ret) 907 904 goto clk_free; 908 905