Skip to content

Commit

Permalink
Merge tag 'i2c-for-6.8-rc1-rebased' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/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
  ...
  • Loading branch information
torvalds committed Jan 19, 2024
2 parents 378de6d + 4503538 commit ed8d845
Show file tree
Hide file tree
Showing 78 changed files with 396 additions and 445 deletions.
1 change: 1 addition & 0 deletions Documentation/devicetree/bindings/eeprom/at24.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ properties:
- enum:
- onnn,cat24c04
- onnn,cat24c05
- rohm,br24g04
- const: atmel,24c04
- items:
- const: renesas,r1ex24016
Expand Down
28 changes: 28 additions & 0 deletions Documentation/devicetree/bindings/i2c/st,stm32-i2c.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ allOf:
- st,stm32f7-i2c
- st,stm32mp13-i2c
- st,stm32mp15-i2c
- st,stm32mp25-i2c
then:
properties:
i2c-scl-rising-time-ns:
Expand All @@ -41,13 +42,38 @@ allOf:
clock-frequency:
enum: [100000, 400000]

- if:
properties:
compatible:
contains:
enum:
- st,stm32f4-i2c
- st,stm32f7-i2c
- st,stm32mp13-i2c
- st,stm32mp15-i2c
then:
properties:
interrupts:
minItems: 2

interrupt-names:
minItems: 2
else:
properties:
interrupts:
maxItems: 1

interrupt-names:
maxItems: 1

properties:
compatible:
enum:
- st,stm32f4-i2c
- st,stm32f7-i2c
- st,stm32mp13-i2c
- st,stm32mp15-i2c
- st,stm32mp25-i2c

reg:
maxItems: 1
Expand All @@ -56,11 +82,13 @@ properties:
items:
- description: interrupt ID for I2C event
- description: interrupt ID for I2C error
minItems: 1

interrupt-names:
items:
- const: event
- const: error
minItems: 1

resets:
maxItems: 1
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -10061,7 +10061,7 @@ F: Documentation/i2c/busses/i2c-parport.rst
F: drivers/i2c/busses/i2c-parport.c

I2C SUBSYSTEM
M: Wolfram Sang <wsa@kernel.org>
M: Wolfram Sang <wsa+renesas@sang-engineering.com>
L: linux-i2c@vger.kernel.org
S: Maintained
W: https://i2c.wiki.kernel.org/
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ struct amdgpu_i2c_chan *amdgpu_i2c_create(struct drm_device *dev,

i2c->rec = *rec;
i2c->adapter.owner = THIS_MODULE;
i2c->adapter.class = I2C_CLASS_DDC;
i2c->adapter.dev.parent = dev->dev;
i2c->dev = dev;
i2c_set_adapdata(&i2c->adapter, i2c);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -7615,7 +7615,6 @@ create_i2c(struct ddc_service *ddc_service,
if (!i2c)
return NULL;
i2c->base.owner = THIS_MODULE;
i2c->base.class = I2C_CLASS_DDC;
i2c->base.dev.parent = &adev->pdev->dev;
i2c->base.algo = &amdgpu_dm_i2c_algo;
snprintf(i2c->base.name, sizeof(i2c->base.name), "AMDGPU DM i2c hw bus %d", link_index);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,6 @@ static int aldebaran_i2c_control_init(struct smu_context *smu)
smu_i2c->port = 0;
mutex_init(&smu_i2c->mutex);
control->owner = THIS_MODULE;
control->class = I2C_CLASS_SPD;
control->dev.parent = &adev->pdev->dev;
control->algo = &aldebaran_i2c_algo;
snprintf(control->name, sizeof(control->name), "AMDGPU SMU 0");
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2696,7 +2696,6 @@ static int smu_v13_0_0_i2c_control_init(struct smu_context *smu)
smu_i2c->port = i;
mutex_init(&smu_i2c->mutex);
control->owner = THIS_MODULE;
control->class = I2C_CLASS_SPD;
control->dev.parent = &adev->pdev->dev;
control->algo = &smu_v13_0_0_i2c_algo;
snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1936,7 +1936,6 @@ static int smu_v13_0_6_i2c_control_init(struct smu_context *smu)
smu_i2c->port = i;
mutex_init(&smu_i2c->mutex);
control->owner = THIS_MODULE;
control->class = I2C_CLASS_SPD;
control->dev.parent = &adev->pdev->dev;
control->algo = &smu_v13_0_6_i2c_algo;
snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/ast/ast_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ struct ast_i2c_chan *ast_i2c_create(struct drm_device *dev)
return NULL;

i2c->adapter.owner = THIS_MODULE;
i2c->adapter.class = I2C_CLASS_DDC;
i2c->adapter.dev.parent = dev->dev;
i2c->dev = dev;
i2c_set_adapdata(&i2c->adapter, i2c);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,6 @@ static struct i2c_adapter *dw_hdmi_i2c_adapter(struct dw_hdmi *hdmi)
init_completion(&i2c->cmp);

adap = &i2c->adap;
adap->class = I2C_CLASS_DDC;
adap->owner = THIS_MODULE;
adap->dev.parent = hdmi->dev;
adap->algo = &dw_hdmi_algorithm;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/display/drm_dp_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -2102,7 +2102,6 @@ int drm_dp_aux_register(struct drm_dp_aux *aux)
if (!aux->ddc.algo)
drm_dp_aux_init(aux);

aux->ddc.class = I2C_CLASS_DDC;
aux->ddc.owner = THIS_MODULE;
aux->ddc.dev.parent = aux->dev;

Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/display/drm_dp_mst_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -5926,7 +5926,6 @@ static int drm_dp_mst_register_i2c_bus(struct drm_dp_mst_port *port)
aux->ddc.algo_data = aux;
aux->ddc.retries = 3;

aux->ddc.class = I2C_CLASS_DDC;
aux->ddc.owner = THIS_MODULE;
/* FIXME: set the kdev of the port's connector as parent */
aux->ddc.dev.parent = parent_dev;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/gma500/cdv_intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,6 @@ cdv_intel_dp_i2c_init(struct gma_connector *connector,

memset(&intel_dp->adapter, '\0', sizeof (intel_dp->adapter));
intel_dp->adapter.owner = THIS_MODULE;
intel_dp->adapter.class = I2C_CLASS_DDC;
strncpy (intel_dp->adapter.name, name, sizeof(intel_dp->adapter.name) - 1);
intel_dp->adapter.name[sizeof(intel_dp->adapter.name) - 1] = '\0';
intel_dp->adapter.algo_data = &intel_dp->algo;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/gma500/intel_gmbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ int gma_intel_setup_gmbus(struct drm_device *dev)
struct intel_gmbus *bus = &dev_priv->gmbus[i];

bus->adapter.owner = THIS_MODULE;
bus->adapter.class = I2C_CLASS_DDC;
snprintf(bus->adapter.name,
sizeof(bus->adapter.name),
"gma500 gmbus %s",
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ static struct i2c_adapter oaktrail_hdmi_i2c_adapter = {
.name = "oaktrail_hdmi_i2c",
.nr = 3,
.owner = THIS_MODULE,
.class = I2C_CLASS_DDC,
.algo = &oaktrail_hdmi_i2c_algorithm,
};

Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/gma500/psb_intel_sdvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -2426,7 +2426,6 @@ psb_intel_sdvo_init_ddc_proxy(struct psb_intel_sdvo *sdvo,
struct drm_device *dev)
{
sdvo->ddc.owner = THIS_MODULE;
sdvo->ddc.class = I2C_CLASS_DDC;
snprintf(sdvo->ddc.name, I2C_NAME_SIZE, "SDVO DDC proxy");
sdvo->ddc.dev.parent = dev->dev;
sdvo->ddc.algo_data = sdvo;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ int hibmc_ddc_create(struct drm_device *drm_dev,
struct hibmc_connector *connector)
{
connector->adapter.owner = THIS_MODULE;
connector->adapter.class = I2C_CLASS_DDC;
snprintf(connector->adapter.name, I2C_NAME_SIZE, "HIS i2c bit bus");
connector->adapter.dev.parent = drm_dev->dev;
i2c_set_adapdata(&connector->adapter, connector);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_gmbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,6 @@ int intel_gmbus_setup(struct drm_i915_private *i915)
}

bus->adapter.owner = THIS_MODULE;
bus->adapter.class = I2C_CLASS_DDC;
snprintf(bus->adapter.name,
sizeof(bus->adapter.name),
"i915 gmbus %s", gmbus_pin->name);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/i915/display/intel_sdvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -3327,7 +3327,6 @@ intel_sdvo_init_ddc_proxy(struct intel_sdvo_ddc *ddc,
ddc->ddc_bus = ddc_bus;

ddc->ddc.owner = THIS_MODULE;
ddc->ddc.class = I2C_CLASS_DDC;
snprintf(ddc->ddc.name, I2C_NAME_SIZE, "SDVO %c DDC%d",
port_name(sdvo->base.port), ddc_bus);
ddc->ddc.dev.parent = &pdev->dev;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/loongson/lsdc_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ int lsdc_create_i2c_chan(struct drm_device *ddev,
adapter = &li2c->adapter;
adapter->algo_data = &li2c->bit;
adapter->owner = THIS_MODULE;
adapter->class = I2C_CLASS_DDC;
adapter->dev.parent = ddev->dev;
adapter->nr = -1;

Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/mediatek/mtk_hdmi_ddc.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ static int mtk_hdmi_ddc_probe(struct platform_device *pdev)

strscpy(ddc->adap.name, "mediatek-hdmi-ddc", sizeof(ddc->adap.name));
ddc->adap.owner = THIS_MODULE;
ddc->adap.class = I2C_CLASS_DDC;
ddc->adap.algo = &mtk_hdmi_ddc_algorithm;
ddc->adap.retries = 3;
ddc->adap.dev.of_node = dev->of_node;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/mgag200/mgag200_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ int mgag200_i2c_init(struct mga_device *mdev, struct mga_i2c_chan *i2c)
i2c->data = BIT(info->i2c.data_bit);
i2c->clock = BIT(info->i2c.clock_bit);
i2c->adapter.owner = THIS_MODULE;
i2c->adapter.class = I2C_CLASS_DDC;
i2c->adapter.dev.parent = dev->dev;
i2c->dev = dev;
i2c_set_adapdata(&i2c->adapter, i2c);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/msm/hdmi/hdmi_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi)


i2c->owner = THIS_MODULE;
i2c->class = I2C_CLASS_DDC;
snprintf(i2c->name, sizeof(i2c->name), "msm hdmi i2c");
i2c->dev.parent = &hdmi->pdev->dev;
i2c->algo = &msm_hdmi_i2c_algorithm;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/radeon/radeon_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,6 @@ struct radeon_i2c_chan *radeon_i2c_create(struct drm_device *dev,

i2c->rec = *rec;
i2c->adapter.owner = THIS_MODULE;
i2c->adapter.class = I2C_CLASS_DDC;
i2c->adapter.dev.parent = dev->dev;
i2c->dev = dev;
i2c_set_adapdata(&i2c->adapter, i2c);
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/rockchip/inno_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,6 @@ static struct i2c_adapter *inno_hdmi_i2c_adapter(struct inno_hdmi *hdmi)
init_completion(&i2c->cmp);

adap = &i2c->adap;
adap->class = I2C_CLASS_DDC;
adap->owner = THIS_MODULE;
adap->dev.parent = hdmi->dev;
adap->dev.of_node = hdmi->dev->of_node;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/rockchip/rk3066_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,6 @@ static struct i2c_adapter *rk3066_hdmi_i2c_adapter(struct rk3066_hdmi *hdmi)
init_completion(&i2c->cmpltn);

adap = &i2c->adap;
adap->class = I2C_CLASS_DDC;
adap->owner = THIS_MODULE;
adap->dev.parent = hdmi->dev;
adap->dev.of_node = hdmi->dev->of_node;
Expand Down
1 change: 0 additions & 1 deletion drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ int sun4i_hdmi_i2c_create(struct device *dev, struct sun4i_hdmi *hdmi)
return -ENOMEM;

adap->owner = THIS_MODULE;
adap->class = I2C_CLASS_DDC;
adap->algo = &sun4i_hdmi_i2c_algorithm;
strscpy(adap->name, "sun4i_hdmi_i2c adapter", sizeof(adap->name));
i2c_set_adapdata(adap, hdmi);
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-ali1535.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ static const struct i2c_algorithm smbus_algorithm = {

static struct i2c_adapter ali1535_adapter = {
.owner = THIS_MODULE,
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
.class = I2C_CLASS_HWMON,
.algo = &smbus_algorithm,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-ali1563.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ static const struct i2c_algorithm ali1563_algorithm = {

static struct i2c_adapter ali1563_adapter = {
.owner = THIS_MODULE,
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
.class = I2C_CLASS_HWMON,
.algo = &ali1563_algorithm,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-ali15x3.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ static const struct i2c_algorithm smbus_algorithm = {

static struct i2c_adapter ali15x3_adapter = {
.owner = THIS_MODULE,
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
.class = I2C_CLASS_HWMON,
.algo = &smbus_algorithm,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-amd756.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static const struct i2c_algorithm smbus_algorithm = {

struct i2c_adapter amd756_smbus = {
.owner = THIS_MODULE,
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
.class = I2C_CLASS_HWMON,
.algo = &smbus_algorithm,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-amd8111.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static int amd8111_probe(struct pci_dev *dev, const struct pci_device_id *id)
smbus->adapter.owner = THIS_MODULE;
snprintf(smbus->adapter.name, sizeof(smbus->adapter.name),
"SMBus2 AMD8111 adapter at %04x", smbus->base);
smbus->adapter.class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
smbus->adapter.class = I2C_CLASS_HWMON;
smbus->adapter.algo = &smbus_algorithm;
smbus->adapter.algo_data = smbus;

Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-cpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ static int cpm_i2c_probe(struct platform_device *ofdev)
/* register new adapter to i2c module... */

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

if (result < 0)
Expand Down
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-elektor.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ static struct i2c_algo_pcf_data pcf_isa_data = {

static struct i2c_adapter pcf_isa_ops = {
.owner = THIS_MODULE,
.class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
.class = I2C_CLASS_HWMON,
.algo_data = &pcf_isa_data,
.name = "i2c-elektor",
};
Expand Down
Loading

0 comments on commit ed8d845

Please sign in to comment.