diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2017-10-26 16:24:15 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-10-26 16:24:15 -0400 |
commit | 3990bedea6e96cb1f182dbeadd62215dbb9e1c85 (patch) | |
tree | 90ac0ab8ae1d4339dc17eb42a853042ea06d6b13 /drivers/i2c | |
parent | 631de7a4603439eaa1d7a2a1a7b5b49edcd87f67 (diff) | |
parent | 3997fb74846f35d0364c5e88e54bc9b166d5a1bc (diff) |
Merge branch 'i2c-mux/for-next' of https://github.com/peda-r/i2c-mux into i2c/for-4.15
This cycle has been real quiet for me. There's only the one trivial
patch that somewhat simplifies DT parsing in the i2c-mux-reg driver.
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/Kconfig | 1 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-i801.c | 4 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-img-scb.c | 2 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-sprd.c | 1 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-stm32f7.c | 17 | ||||
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-reg.c | 9 |
6 files changed, 17 insertions, 17 deletions
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index c06dce2c1da7..45a3f3ca29b3 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
@@ -131,6 +131,7 @@ config I2C_I801 | |||
131 | Gemini Lake (SOC) | 131 | Gemini Lake (SOC) |
132 | Cannon Lake-H (PCH) | 132 | Cannon Lake-H (PCH) |
133 | Cannon Lake-LP (PCH) | 133 | Cannon Lake-LP (PCH) |
134 | Cedar Fork (PCH) | ||
134 | 135 | ||
135 | This driver can also be built as a module. If so, the module | 136 | This driver can also be built as a module. If so, the module |
136 | will be called i2c-i801. | 137 | will be called i2c-i801. |
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index e114e4e00d29..9e12a53ef7b8 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
@@ -68,6 +68,7 @@ | |||
68 | * Gemini Lake (SOC) 0x31d4 32 hard yes yes yes | 68 | * Gemini Lake (SOC) 0x31d4 32 hard yes yes yes |
69 | * Cannon Lake-H (PCH) 0xa323 32 hard yes yes yes | 69 | * Cannon Lake-H (PCH) 0xa323 32 hard yes yes yes |
70 | * Cannon Lake-LP (PCH) 0x9da3 32 hard yes yes yes | 70 | * Cannon Lake-LP (PCH) 0x9da3 32 hard yes yes yes |
71 | * Cedar Fork (PCH) 0x18df 32 hard yes yes yes | ||
71 | * | 72 | * |
72 | * Features supported by this driver: | 73 | * Features supported by this driver: |
73 | * Software PEC no | 74 | * Software PEC no |
@@ -204,6 +205,7 @@ | |||
204 | 205 | ||
205 | /* Older devices have their ID defined in <linux/pci_ids.h> */ | 206 | /* Older devices have their ID defined in <linux/pci_ids.h> */ |
206 | #define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS 0x0f12 | 207 | #define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS 0x0f12 |
208 | #define PCI_DEVICE_ID_INTEL_CDF_SMBUS 0x18df | ||
207 | #define PCI_DEVICE_ID_INTEL_DNV_SMBUS 0x19df | 209 | #define PCI_DEVICE_ID_INTEL_DNV_SMBUS 0x19df |
208 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22 | 210 | #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22 |
209 | #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 | 211 | #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22 |
@@ -1025,6 +1027,7 @@ static const struct pci_device_id i801_ids[] = { | |||
1025 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS) }, | 1027 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS) }, |
1026 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_SMBUS) }, | 1028 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_H_SMBUS) }, |
1027 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_SMBUS) }, | 1029 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SUNRISEPOINT_LP_SMBUS) }, |
1030 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_CDF_SMBUS) }, | ||
1028 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DNV_SMBUS) }, | 1031 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DNV_SMBUS) }, |
1029 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BROXTON_SMBUS) }, | 1032 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BROXTON_SMBUS) }, |
1030 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS) }, | 1033 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS) }, |
@@ -1513,6 +1516,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id) | |||
1513 | case PCI_DEVICE_ID_INTEL_CANNONLAKE_LP_SMBUS: | 1516 | case PCI_DEVICE_ID_INTEL_CANNONLAKE_LP_SMBUS: |
1514 | case PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS: | 1517 | case PCI_DEVICE_ID_INTEL_LEWISBURG_SMBUS: |
1515 | case PCI_DEVICE_ID_INTEL_LEWISBURG_SSKU_SMBUS: | 1518 | case PCI_DEVICE_ID_INTEL_LEWISBURG_SSKU_SMBUS: |
1519 | case PCI_DEVICE_ID_INTEL_CDF_SMBUS: | ||
1516 | case PCI_DEVICE_ID_INTEL_DNV_SMBUS: | 1520 | case PCI_DEVICE_ID_INTEL_DNV_SMBUS: |
1517 | case PCI_DEVICE_ID_INTEL_KABYLAKE_PCH_H_SMBUS: | 1521 | case PCI_DEVICE_ID_INTEL_KABYLAKE_PCH_H_SMBUS: |
1518 | priv->features |= FEATURE_I2C_BLOCK_READ; | 1522 | priv->features |= FEATURE_I2C_BLOCK_READ; |
diff --git a/drivers/i2c/busses/i2c-img-scb.c b/drivers/i2c/busses/i2c-img-scb.c index 84fb35f6837f..eb1d91b986fd 100644 --- a/drivers/i2c/busses/i2c-img-scb.c +++ b/drivers/i2c/busses/i2c-img-scb.c | |||
@@ -1459,6 +1459,6 @@ static struct platform_driver img_scb_i2c_driver = { | |||
1459 | }; | 1459 | }; |
1460 | module_platform_driver(img_scb_i2c_driver); | 1460 | module_platform_driver(img_scb_i2c_driver); |
1461 | 1461 | ||
1462 | MODULE_AUTHOR("James Hogan <james.hogan@imgtec.com>"); | 1462 | MODULE_AUTHOR("James Hogan <jhogan@kernel.org>"); |
1463 | MODULE_DESCRIPTION("IMG host I2C driver"); | 1463 | MODULE_DESCRIPTION("IMG host I2C driver"); |
1464 | MODULE_LICENSE("GPL v2"); | 1464 | MODULE_LICENSE("GPL v2"); |
diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c index 22e08ae1704f..25fcc3c1e32b 100644 --- a/drivers/i2c/busses/i2c-sprd.c +++ b/drivers/i2c/busses/i2c-sprd.c | |||
@@ -627,6 +627,7 @@ static const struct dev_pm_ops sprd_i2c_pm_ops = { | |||
627 | 627 | ||
628 | static const struct of_device_id sprd_i2c_of_match[] = { | 628 | static const struct of_device_id sprd_i2c_of_match[] = { |
629 | { .compatible = "sprd,sc9860-i2c", }, | 629 | { .compatible = "sprd,sc9860-i2c", }, |
630 | {}, | ||
630 | }; | 631 | }; |
631 | 632 | ||
632 | static struct platform_driver sprd_i2c_driver = { | 633 | static struct platform_driver sprd_i2c_driver = { |
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c index 47c67b0ca896..d4a6e9c2e9aa 100644 --- a/drivers/i2c/busses/i2c-stm32f7.c +++ b/drivers/i2c/busses/i2c-stm32f7.c | |||
@@ -215,7 +215,7 @@ struct stm32f7_i2c_dev { | |||
215 | unsigned int msg_num; | 215 | unsigned int msg_num; |
216 | unsigned int msg_id; | 216 | unsigned int msg_id; |
217 | struct stm32f7_i2c_msg f7_msg; | 217 | struct stm32f7_i2c_msg f7_msg; |
218 | struct stm32f7_i2c_setup *setup; | 218 | struct stm32f7_i2c_setup setup; |
219 | struct stm32f7_i2c_timings timing; | 219 | struct stm32f7_i2c_timings timing; |
220 | }; | 220 | }; |
221 | 221 | ||
@@ -265,7 +265,7 @@ static struct stm32f7_i2c_spec i2c_specs[] = { | |||
265 | }, | 265 | }, |
266 | }; | 266 | }; |
267 | 267 | ||
268 | struct stm32f7_i2c_setup stm32f7_setup = { | 268 | static const struct stm32f7_i2c_setup stm32f7_setup = { |
269 | .rise_time = STM32F7_I2C_RISE_TIME_DEFAULT, | 269 | .rise_time = STM32F7_I2C_RISE_TIME_DEFAULT, |
270 | .fall_time = STM32F7_I2C_FALL_TIME_DEFAULT, | 270 | .fall_time = STM32F7_I2C_FALL_TIME_DEFAULT, |
271 | .dnf = STM32F7_I2C_DNF_DEFAULT, | 271 | .dnf = STM32F7_I2C_DNF_DEFAULT, |
@@ -537,7 +537,7 @@ static void stm32f7_i2c_hw_config(struct stm32f7_i2c_dev *i2c_dev) | |||
537 | writel_relaxed(timing, i2c_dev->base + STM32F7_I2C_TIMINGR); | 537 | writel_relaxed(timing, i2c_dev->base + STM32F7_I2C_TIMINGR); |
538 | 538 | ||
539 | /* Enable I2C */ | 539 | /* Enable I2C */ |
540 | if (i2c_dev->setup->analog_filter) | 540 | if (i2c_dev->setup.analog_filter) |
541 | stm32f7_i2c_clr_bits(i2c_dev->base + STM32F7_I2C_CR1, | 541 | stm32f7_i2c_clr_bits(i2c_dev->base + STM32F7_I2C_CR1, |
542 | STM32F7_I2C_CR1_ANFOFF); | 542 | STM32F7_I2C_CR1_ANFOFF); |
543 | else | 543 | else |
@@ -887,22 +887,19 @@ static int stm32f7_i2c_probe(struct platform_device *pdev) | |||
887 | } | 887 | } |
888 | 888 | ||
889 | setup = of_device_get_match_data(&pdev->dev); | 889 | setup = of_device_get_match_data(&pdev->dev); |
890 | i2c_dev->setup->rise_time = setup->rise_time; | 890 | i2c_dev->setup = *setup; |
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; | ||
894 | 891 | ||
895 | ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-rising-time-ns", | 892 | ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-rising-time-ns", |
896 | &rise_time); | 893 | &rise_time); |
897 | if (!ret) | 894 | if (!ret) |
898 | i2c_dev->setup->rise_time = rise_time; | 895 | i2c_dev->setup.rise_time = rise_time; |
899 | 896 | ||
900 | ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-falling-time-ns", | 897 | ret = device_property_read_u32(i2c_dev->dev, "i2c-scl-falling-time-ns", |
901 | &fall_time); | 898 | &fall_time); |
902 | if (!ret) | 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 | if (ret) | 903 | if (ret) |
907 | goto clk_free; | 904 | goto clk_free; |
908 | 905 | ||
diff --git a/drivers/i2c/muxes/i2c-mux-reg.c b/drivers/i2c/muxes/i2c-mux-reg.c index d97031804de8..f6c9c3dc6cad 100644 --- a/drivers/i2c/muxes/i2c-mux-reg.c +++ b/drivers/i2c/muxes/i2c-mux-reg.c | |||
@@ -107,9 +107,9 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux, | |||
107 | put_device(&adapter->dev); | 107 | put_device(&adapter->dev); |
108 | 108 | ||
109 | mux->data.n_values = of_get_child_count(np); | 109 | mux->data.n_values = of_get_child_count(np); |
110 | if (of_find_property(np, "little-endian", NULL)) { | 110 | if (of_property_read_bool(np, "little-endian")) { |
111 | mux->data.little_endian = true; | 111 | mux->data.little_endian = true; |
112 | } else if (of_find_property(np, "big-endian", NULL)) { | 112 | } else if (of_property_read_bool(np, "big-endian")) { |
113 | mux->data.little_endian = false; | 113 | mux->data.little_endian = false; |
114 | } else { | 114 | } else { |
115 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : \ | 115 | #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : \ |
@@ -122,10 +122,7 @@ static int i2c_mux_reg_probe_dt(struct regmux *mux, | |||
122 | #error Endianness not defined? | 122 | #error Endianness not defined? |
123 | #endif | 123 | #endif |
124 | } | 124 | } |
125 | if (of_find_property(np, "write-only", NULL)) | 125 | mux->data.write_only = of_property_read_bool(np, "write-only"); |
126 | mux->data.write_only = true; | ||
127 | else | ||
128 | mux->data.write_only = false; | ||
129 | 126 | ||
130 | values = devm_kzalloc(&pdev->dev, | 127 | values = devm_kzalloc(&pdev->dev, |
131 | sizeof(*mux->data.values) * mux->data.n_values, | 128 | sizeof(*mux->data.values) * mux->data.n_values, |