Skip to content

Commit c773547

Browse files
committed
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c/pca954x: Initialize the mux to disconnected state i2c-taos-evm: Fix log messages
2 parents 78a3cc3 + cd823db commit c773547

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

drivers/i2c/busses/i2c-taos-evm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static int taos_connect(struct serio *serio, struct serio_driver *drv)
234234

235235
if (taos->state != TAOS_STATE_IDLE) {
236236
err = -ENODEV;
237-
dev_dbg(&serio->dev, "TAOS EVM reset failed (state=%d, "
237+
dev_err(&serio->dev, "TAOS EVM reset failed (state=%d, "
238238
"pos=%d)\n", taos->state, taos->pos);
239239
goto exit_close;
240240
}
@@ -255,15 +255,15 @@ static int taos_connect(struct serio *serio, struct serio_driver *drv)
255255
msecs_to_jiffies(250));
256256
if (taos->state != TAOS_STATE_IDLE) {
257257
err = -ENODEV;
258-
dev_err(&adapter->dev, "Echo off failed "
258+
dev_err(&serio->dev, "TAOS EVM echo off failed "
259259
"(state=%d)\n", taos->state);
260260
goto exit_close;
261261
}
262262

263263
err = i2c_add_adapter(adapter);
264264
if (err)
265265
goto exit_close;
266-
dev_dbg(&serio->dev, "Connected to TAOS EVM\n");
266+
dev_info(&serio->dev, "Connected to TAOS EVM\n");
267267

268268
taos->client = taos_instantiate_device(adapter);
269269
return 0;
@@ -288,7 +288,7 @@ static void taos_disconnect(struct serio *serio)
288288
serio_set_drvdata(serio, NULL);
289289
kfree(taos);
290290

291-
dev_dbg(&serio->dev, "Disconnected from TAOS EVM\n");
291+
dev_info(&serio->dev, "Disconnected from TAOS EVM\n");
292292
}
293293

294294
static struct serio_device_id taos_serio_ids[] = {

drivers/i2c/muxes/pca954x.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,11 @@ static int pca954x_probe(struct i2c_client *client,
201201

202202
i2c_set_clientdata(client, data);
203203

204-
/* Read the mux register at addr to verify
205-
* that the mux is in fact present.
204+
/* Write the mux register at addr to verify
205+
* that the mux is in fact present. This also
206+
* initializes the mux to disconnected state.
206207
*/
207-
if (i2c_smbus_read_byte(client) < 0) {
208+
if (i2c_smbus_write_byte(client, 0) < 0) {
208209
dev_warn(&client->dev, "probe failed\n");
209210
goto exit_free;
210211
}

0 commit comments

Comments
 (0)