@@ -16,7 +16,7 @@
#include "pmbus.h"
enum chips {
- tps53647, tps53667, tps53676, tps53679, tps53681, tps53688
+ tps53647, tps53667, tps53676, tps53679, tps53681, tps53688, tps53685
};
#define TPS53647_PAGE_NUM 1
@@ -109,6 +109,31 @@ static int tps53679_identify_chip(struct
i2c_client *client,
return 0;
}
+static int tps53685_identify_chip(struct i2c_client *client,
+ u8 revision)
+{
+ u8 buf[I2C_SMBUS_BLOCK_MAX];
+ int ret;
+
+ ret = pmbus_read_byte_data(client, 0, PMBUS_REVISION);
+ if (ret < 0)
+ return ret;
+ if (ret != revision) {
+ dev_err(&client->dev, "Unexpected PMBus revision 0x%x\n", ret);
+ return -ENODEV;
+ }
+
+ ret = i2c_smbus_read_block_data(client, PMBUS_IC_DEVICE_ID, buf);
+ if (ret < 0)
+ return ret;
+
+ if (strncmp("\x54\x49\x53\x68\x50\x00", buf, 6)) {
+ dev_err(&client->dev, "Unexpected device ID: %s\n", buf);
+ return -ENODEV;
+ }
+ return 0;
+}
+
/*
* Common identification function for chips with multi-phase support.