Skip to content

Commit ed8d845

Browse files
committed
Merge tag 'i2c-for-6.8-rc1-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c updates from Wolfram Sang: "This removes the currently unused CLASS_DDC support (controllers set the flag, but there is no client to use it). Also, CLASS_SPD support gets simplified to prepare removal in the future. Class based instantiation is not recommended these days anyhow. Furthermore, I2C core now creates a debugfs directory per I2C adapter. Current bus driver users were converted to use it. Finally, quite some driver updates. Standing out are patches for the wmt-driver which is refactored to support more variants. This is the rebased pull request where a large series for the designware driver was dropped" * tag 'i2c-for-6.8-rc1-rebased' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits) MAINTAINERS: use proper email for my I2C work i2c: stm32f7: add support for stm32mp25 soc i2c: stm32f7: perform I2C_ISR read once at beginning of event isr dt-bindings: i2c: document st,stm32mp25-i2c compatible i2c: stm32f7: simplify status messages in case of errors i2c: stm32f7: perform most of irq job in threaded handler i2c: stm32f7: use dev_err_probe upon calls of devm_request_irq i2c: i801: Add lis3lv02d for Dell XPS 15 7590 i2c: i801: Add lis3lv02d for Dell Precision 3540 i2c: wmt: Reduce redundant: REG_CR setting i2c: wmt: Reduce redundant: function parameter i2c: wmt: Reduce redundant: clock mode setting i2c: wmt: Reduce redundant: wait event complete i2c: wmt: Reduce redundant: bus busy check i2c: mux: reg: Remove class-based device auto-detection support i2c: make i2c_bus_type const dt-bindings: at24: add ROHM BR24G04 eeprom: at24: use of_match_ptr() i2c: cpm: Remove linux,i2c-index conversion from be32 i2c: imx: Make SDA actually optional for bus recovering ...
2 parents 378de6d + 4503538 commit ed8d845

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+396
-445
lines changed

Documentation/devicetree/bindings/eeprom/at24.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ properties:
123123
- enum:
124124
- onnn,cat24c04
125125
- onnn,cat24c05
126+
- rohm,br24g04
126127
- const: atmel,24c04
127128
- items:
128129
- const: renesas,r1ex24016

Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ allOf:
1919
- st,stm32f7-i2c
2020
- st,stm32mp13-i2c
2121
- st,stm32mp15-i2c
22+
- st,stm32mp25-i2c
2223
then:
2324
properties:
2425
i2c-scl-rising-time-ns:
@@ -41,13 +42,38 @@ allOf:
4142
clock-frequency:
4243
enum: [100000, 400000]
4344

45+
- if:
46+
properties:
47+
compatible:
48+
contains:
49+
enum:
50+
- st,stm32f4-i2c
51+
- st,stm32f7-i2c
52+
- st,stm32mp13-i2c
53+
- st,stm32mp15-i2c
54+
then:
55+
properties:
56+
interrupts:
57+
minItems: 2
58+
59+
interrupt-names:
60+
minItems: 2
61+
else:
62+
properties:
63+
interrupts:
64+
maxItems: 1
65+
66+
interrupt-names:
67+
maxItems: 1
68+
4469
properties:
4570
compatible:
4671
enum:
4772
- st,stm32f4-i2c
4873
- st,stm32f7-i2c
4974
- st,stm32mp13-i2c
5075
- st,stm32mp15-i2c
76+
- st,stm32mp25-i2c
5177

5278
reg:
5379
maxItems: 1
@@ -56,11 +82,13 @@ properties:
5682
items:
5783
- description: interrupt ID for I2C event
5884
- description: interrupt ID for I2C error
85+
minItems: 1
5986

6087
interrupt-names:
6188
items:
6289
- const: event
6390
- const: error
91+
minItems: 1
6492

6593
resets:
6694
maxItems: 1

MAINTAINERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -10061,7 +10061,7 @@ F: Documentation/i2c/busses/i2c-parport.rst
1006110061
F: drivers/i2c/busses/i2c-parport.c
1006210062

1006310063
I2C SUBSYSTEM
10064-
M: Wolfram Sang <wsa@kernel.org>
10064+
M: Wolfram Sang <wsa+renesas@sang-engineering.com>
1006510065
L: linux-i2c@vger.kernel.org
1006610066
S: Maintained
1006710067
W: https://i2c.wiki.kernel.org/

drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c

-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,
175175

176176
i2c->rec = *rec;
177177
i2c->adapter.owner = THIS_MODULE;
178-
i2c->adapter.class = I2C_CLASS_DDC;
179178
i2c->adapter.dev.parent = dev->dev;
180179
i2c->dev = dev;
181180
i2c_set_adapdata(&i2c->adapter, i2c);

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

-1
Original file line numberDiff line numberDiff line change
@@ -7615,7 +7615,6 @@ create_i2c(struct ddc_service *ddc_service,
76157615
if (!i2c)
76167616
return NULL;
76177617
i2c->base.owner = THIS_MODULE;
7618-
i2c->base.class = I2C_CLASS_DDC;
76197618
i2c->base.dev.parent = &adev->pdev->dev;
76207619
i2c->base.algo = &amdgpu_dm_i2c_algo;
76217620
snprintf(i2c->base.name, sizeof(i2c->base.name), "AMDGPU DM i2c hw bus %d", link_index);

drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c

-1
Original file line numberDiff line numberDiff line change
@@ -1530,7 +1530,6 @@ static int aldebaran_i2c_control_init(struct smu_context *smu)
15301530
smu_i2c->port = 0;
15311531
mutex_init(&smu_i2c->mutex);
15321532
control->owner = THIS_MODULE;
1533-
control->class = I2C_CLASS_SPD;
15341533
control->dev.parent = &adev->pdev->dev;
15351534
control->algo = &aldebaran_i2c_algo;
15361535
snprintf(control->name, sizeof(control->name), "AMDGPU SMU 0");

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

-1
Original file line numberDiff line numberDiff line change
@@ -2696,7 +2696,6 @@ static int smu_v13_0_0_i2c_control_init(struct smu_context *smu)
26962696
smu_i2c->port = i;
26972697
mutex_init(&smu_i2c->mutex);
26982698
control->owner = THIS_MODULE;
2699-
control->class = I2C_CLASS_SPD;
27002699
control->dev.parent = &adev->pdev->dev;
27012700
control->algo = &smu_v13_0_0_i2c_algo;
27022701
snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i);

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

-1
Original file line numberDiff line numberDiff line change
@@ -1936,7 +1936,6 @@ static int smu_v13_0_6_i2c_control_init(struct smu_context *smu)
19361936
smu_i2c->port = i;
19371937
mutex_init(&smu_i2c->mutex);
19381938
control->owner = THIS_MODULE;
1939-
control->class = I2C_CLASS_SPD;
19401939
control->dev.parent = &adev->pdev->dev;
19411940
control->algo = &smu_v13_0_6_i2c_algo;
19421941
snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i);

drivers/gpu/drm/ast/ast_i2c.c

-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ struct ast_i2c_chan *ast_i2c_create(struct drm_device *dev)
120120
return NULL;
121121

122122
i2c->adapter.owner = THIS_MODULE;
123-
i2c->adapter.class = I2C_CLASS_DDC;
124123
i2c->adapter.dev.parent = dev->dev;
125124
i2c->dev = dev;
126125
i2c_set_adapdata(&i2c->adapter, i2c);

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c

-1
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,6 @@ static struct i2c_adapter *dw_hdmi_i2c_adapter(struct dw_hdmi *hdmi)
515515
init_completion(&i2c->cmp);
516516

517517
adap = &i2c->adap;
518-
adap->class = I2C_CLASS_DDC;
519518
adap->owner = THIS_MODULE;
520519
adap->dev.parent = hdmi->dev;
521520
adap->algo = &dw_hdmi_algorithm;

drivers/gpu/drm/display/drm_dp_helper.c

-1
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,6 @@ int drm_dp_aux_register(struct drm_dp_aux *aux)
21022102
if (!aux->ddc.algo)
21032103
drm_dp_aux_init(aux);
21042104

2105-
aux->ddc.class = I2C_CLASS_DDC;
21062105
aux->ddc.owner = THIS_MODULE;
21072106
aux->ddc.dev.parent = aux->dev;
21082107

drivers/gpu/drm/display/drm_dp_mst_topology.c

-1
Original file line numberDiff line numberDiff line change
@@ -5926,7 +5926,6 @@ static int drm_dp_mst_register_i2c_bus(struct drm_dp_mst_port *port)
59265926
aux->ddc.algo_data = aux;
59275927
aux->ddc.retries = 3;
59285928

5929-
aux->ddc.class = I2C_CLASS_DDC;
59305929
aux->ddc.owner = THIS_MODULE;
59315930
/* FIXME: set the kdev of the port's connector as parent */
59325931
aux->ddc.dev.parent = parent_dev;

drivers/gpu/drm/gma500/cdv_intel_dp.c

-1
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,6 @@ cdv_intel_dp_i2c_init(struct gma_connector *connector,
855855

856856
memset(&intel_dp->adapter, '\0', sizeof (intel_dp->adapter));
857857
intel_dp->adapter.owner = THIS_MODULE;
858-
intel_dp->adapter.class = I2C_CLASS_DDC;
859858
strncpy (intel_dp->adapter.name, name, sizeof(intel_dp->adapter.name) - 1);
860859
intel_dp->adapter.name[sizeof(intel_dp->adapter.name) - 1] = '\0';
861860
intel_dp->adapter.algo_data = &intel_dp->algo;

drivers/gpu/drm/gma500/intel_gmbus.c

-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,6 @@ int gma_intel_setup_gmbus(struct drm_device *dev)
411411
struct intel_gmbus *bus = &dev_priv->gmbus[i];
412412

413413
bus->adapter.owner = THIS_MODULE;
414-
bus->adapter.class = I2C_CLASS_DDC;
415414
snprintf(bus->adapter.name,
416415
sizeof(bus->adapter.name),
417416
"gma500 gmbus %s",

drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c

-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ static struct i2c_adapter oaktrail_hdmi_i2c_adapter = {
168168
.name = "oaktrail_hdmi_i2c",
169169
.nr = 3,
170170
.owner = THIS_MODULE,
171-
.class = I2C_CLASS_DDC,
172171
.algo = &oaktrail_hdmi_i2c_algorithm,
173172
};
174173

drivers/gpu/drm/gma500/psb_intel_sdvo.c

-1
Original file line numberDiff line numberDiff line change
@@ -2426,7 +2426,6 @@ psb_intel_sdvo_init_ddc_proxy(struct psb_intel_sdvo *sdvo,
24262426
struct drm_device *dev)
24272427
{
24282428
sdvo->ddc.owner = THIS_MODULE;
2429-
sdvo->ddc.class = I2C_CLASS_DDC;
24302429
snprintf(sdvo->ddc.name, I2C_NAME_SIZE, "SDVO DDC proxy");
24312430
sdvo->ddc.dev.parent = dev->dev;
24322431
sdvo->ddc.algo_data = sdvo;

drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c

-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ int hibmc_ddc_create(struct drm_device *drm_dev,
8181
struct hibmc_connector *connector)
8282
{
8383
connector->adapter.owner = THIS_MODULE;
84-
connector->adapter.class = I2C_CLASS_DDC;
8584
snprintf(connector->adapter.name, I2C_NAME_SIZE, "HIS i2c bit bus");
8685
connector->adapter.dev.parent = drm_dev->dev;
8786
i2c_set_adapdata(&connector->adapter, connector);

drivers/gpu/drm/i915/display/intel_gmbus.c

-1
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,6 @@ int intel_gmbus_setup(struct drm_i915_private *i915)
899899
}
900900

901901
bus->adapter.owner = THIS_MODULE;
902-
bus->adapter.class = I2C_CLASS_DDC;
903902
snprintf(bus->adapter.name,
904903
sizeof(bus->adapter.name),
905904
"i915 gmbus %s", gmbus_pin->name);

drivers/gpu/drm/i915/display/intel_sdvo.c

-1
Original file line numberDiff line numberDiff line change
@@ -3327,7 +3327,6 @@ intel_sdvo_init_ddc_proxy(struct intel_sdvo_ddc *ddc,
33273327
ddc->ddc_bus = ddc_bus;
33283328

33293329
ddc->ddc.owner = THIS_MODULE;
3330-
ddc->ddc.class = I2C_CLASS_DDC;
33313330
snprintf(ddc->ddc.name, I2C_NAME_SIZE, "SDVO %c DDC%d",
33323331
port_name(sdvo->base.port), ddc_bus);
33333332
ddc->ddc.dev.parent = &pdev->dev;

drivers/gpu/drm/loongson/lsdc_i2c.c

-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ int lsdc_create_i2c_chan(struct drm_device *ddev,
154154
adapter = &li2c->adapter;
155155
adapter->algo_data = &li2c->bit;
156156
adapter->owner = THIS_MODULE;
157-
adapter->class = I2C_CLASS_DDC;
158157
adapter->dev.parent = ddev->dev;
159158
adapter->nr = -1;
160159

drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c

-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ static int mtk_hdmi_ddc_probe(struct platform_device *pdev)
297297

298298
strscpy(ddc->adap.name, "mediatek-hdmi-ddc", sizeof(ddc->adap.name));
299299
ddc->adap.owner = THIS_MODULE;
300-
ddc->adap.class = I2C_CLASS_DDC;
301300
ddc->adap.algo = &mtk_hdmi_ddc_algorithm;
302301
ddc->adap.retries = 3;
303302
ddc->adap.dev.of_node = dev->of_node;

drivers/gpu/drm/mgag200/mgag200_i2c.c

-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ int mgag200_i2c_init(struct mga_device *mdev, struct mga_i2c_chan *i2c)
106106
i2c->data = BIT(info->i2c.data_bit);
107107
i2c->clock = BIT(info->i2c.clock_bit);
108108
i2c->adapter.owner = THIS_MODULE;
109-
i2c->adapter.class = I2C_CLASS_DDC;
110109
i2c->adapter.dev.parent = dev->dev;
111110
i2c->dev = dev;
112111
i2c_set_adapdata(&i2c->adapter, i2c);

drivers/gpu/drm/msm/hdmi/hdmi_i2c.c

-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi)
249249

250250

251251
i2c->owner = THIS_MODULE;
252-
i2c->class = I2C_CLASS_DDC;
253252
snprintf(i2c->name, sizeof(i2c->name), "msm hdmi i2c");
254253
i2c->dev.parent = &hdmi->pdev->dev;
255254
i2c->algo = &msm_hdmi_i2c_algorithm;

drivers/gpu/drm/radeon/radeon_i2c.c

-1
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,6 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,
918918

919919
i2c->rec = *rec;
920920
i2c->adapter.owner = THIS_MODULE;
921-
i2c->adapter.class = I2C_CLASS_DDC;
922921
i2c->adapter.dev.parent = dev->dev;
923922
i2c->dev = dev;
924923
i2c_set_adapdata(&i2c->adapter, i2c);

drivers/gpu/drm/rockchip/inno_hdmi.c

-1
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,6 @@ static struct i2c_adapter *inno_hdmi_i2c_adapter(struct inno_hdmi *hdmi)
792792
init_completion(&i2c->cmp);
793793

794794
adap = &i2c->adap;
795-
adap->class = I2C_CLASS_DDC;
796795
adap->owner = THIS_MODULE;
797796
adap->dev.parent = hdmi->dev;
798797
adap->dev.of_node = hdmi->dev->of_node;

drivers/gpu/drm/rockchip/rk3066_hdmi.c

-1
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,6 @@ static struct i2c_adapter *rk3066_hdmi_i2c_adapter(struct rk3066_hdmi *hdmi)
715715
init_completion(&i2c->cmpltn);
716716

717717
adap = &i2c->adap;
718-
adap->class = I2C_CLASS_DDC;
719718
adap->owner = THIS_MODULE;
720719
adap->dev.parent = hdmi->dev;
721720
adap->dev.of_node = hdmi->dev->of_node;

drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c

-1
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ int sun4i_hdmi_i2c_create(struct device *dev, struct sun4i_hdmi *hdmi)
302302
return -ENOMEM;
303303

304304
adap->owner = THIS_MODULE;
305-
adap->class = I2C_CLASS_DDC;
306305
adap->algo = &sun4i_hdmi_i2c_algorithm;
307306
strscpy(adap->name, "sun4i_hdmi_i2c adapter", sizeof(adap->name));
308307
i2c_set_adapdata(adap, hdmi);

drivers/i2c/busses/i2c-ali1535.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ static const struct i2c_algorithm smbus_algorithm = {
477477

478478
static struct i2c_adapter ali1535_adapter = {
479479
.owner = THIS_MODULE,
480-
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
480+
.class = I2C_CLASS_HWMON,
481481
.algo = &smbus_algorithm,
482482
};
483483

drivers/i2c/busses/i2c-ali1563.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ static const struct i2c_algorithm ali1563_algorithm = {
390390

391391
static struct i2c_adapter ali1563_adapter = {
392392
.owner = THIS_MODULE,
393-
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
393+
.class = I2C_CLASS_HWMON,
394394
.algo = &ali1563_algorithm,
395395
};
396396

drivers/i2c/busses/i2c-ali15x3.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ static const struct i2c_algorithm smbus_algorithm = {
461461

462462
static struct i2c_adapter ali15x3_adapter = {
463463
.owner = THIS_MODULE,
464-
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
464+
.class = I2C_CLASS_HWMON,
465465
.algo = &smbus_algorithm,
466466
};
467467

drivers/i2c/busses/i2c-amd756.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ static const struct i2c_algorithm smbus_algorithm = {
285285

286286
struct i2c_adapter amd756_smbus = {
287287
.owner = THIS_MODULE,
288-
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
288+
.class = I2C_CLASS_HWMON,
289289
.algo = &smbus_algorithm,
290290
};
291291

drivers/i2c/busses/i2c-amd8111.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ static int amd8111_probe(struct pci_dev *dev, const struct pci_device_id *id)
449449
smbus->adapter.owner = THIS_MODULE;
450450
snprintf(smbus->adapter.name, sizeof(smbus->adapter.name),
451451
"SMBus2 AMD8111 adapter at %04x", smbus->base);
452-
smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
452+
smbus->adapter.class = I2C_CLASS_HWMON;
453453
smbus->adapter.algo = &smbus_algorithm;
454454
smbus->adapter.algo_data = smbus;
455455

drivers/i2c/busses/i2c-cpm.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ static int cpm_i2c_probe(struct platform_device *ofdev)
658658
/* register new adapter to i2c module... */
659659

660660
data = of_get_property(ofdev->dev.of_node, "linux,i2c-index", &len);
661-
cpm->adap.nr = (data && len == 4) ? be32_to_cpup(data) : -1;
661+
cpm->adap.nr = (data && len == 4) ? *data : -1;
662662
result = i2c_add_numbered_adapter(&cpm->adap);
663663

664664
if (result < 0)

drivers/i2c/busses/i2c-elektor.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static struct i2c_algo_pcf_data pcf_isa_data = {
188188

189189
static struct i2c_adapter pcf_isa_ops = {
190190
.owner = THIS_MODULE,
191-
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
191+
.class = I2C_CLASS_HWMON,
192192
.algo_data = &pcf_isa_data,
193193
.name = "i2c-elektor",
194194
};

0 commit comments

Comments
 (0)