Skip to content

Commit a835523

Browse files
hkallweitwsakernel
authored andcommitted
i2c: mux: reg: Remove class-based device auto-detection support
Legacy class-based device auto-detection shouldn't be used in new code. Therefore remove support in i2c-mux-reg as long as we don't have a user of this feature yet. Link: https://lore.kernel.org/linux-i2c/[email protected]/ Signed-off-by: Heiner Kallweit <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 94959c0 commit a835523

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

drivers/i2c/muxes/i2c-mux-reg.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ static int i2c_mux_reg_probe(struct platform_device *pdev)
159159
struct regmux *mux;
160160
struct i2c_adapter *parent;
161161
struct resource *res;
162-
unsigned int class;
163162
int i, ret, nr;
164163

165164
mux = devm_kzalloc(&pdev->dev, sizeof(*mux), GFP_KERNEL);
@@ -213,9 +212,8 @@ static int i2c_mux_reg_probe(struct platform_device *pdev)
213212

214213
for (i = 0; i < mux->data.n_values; i++) {
215214
nr = mux->data.base_nr ? (mux->data.base_nr + i) : 0;
216-
class = mux->data.classes ? mux->data.classes[i] : 0;
217215

218-
ret = i2c_mux_add_adapter(muxc, nr, mux->data.values[i], class);
216+
ret = i2c_mux_add_adapter(muxc, nr, mux->data.values[i], 0);
219217
if (ret)
220218
goto err_del_mux_adapters;
221219
}

include/linux/platform_data/i2c-mux-reg.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
* @n_values: Number of multiplexer channels
1818
* @little_endian: Indicating if the register is in little endian
1919
* @write_only: Reading the register is not allowed by hardware
20-
* @classes: Optional I2C auto-detection classes
2120
* @idle: Value to write to mux when idle
2221
* @idle_in_use: indicate if idle value is in use
2322
* @reg: Virtual address of the register to switch channel
@@ -30,7 +29,6 @@ struct i2c_mux_reg_platform_data {
3029
int n_values;
3130
bool little_endian;
3231
bool write_only;
33-
const unsigned int *classes;
3432
u32 idle;
3533
bool idle_in_use;
3634
void __iomem *reg;

0 commit comments

Comments
 (0)