Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73835
b: refs/heads/master
c: 8b925a3
h: refs/heads/master
i:
  73833: 17d39ca
  73831: 0edfe76
v: v3
  • Loading branch information
Jean Delvare authored and Jean Delvare committed Nov 15, 2007
1 parent ec4e4c4 commit 704330b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0f2cbd38aa377e30df3b7602abed69464d1970aa
refs/heads/master: 8b925a3dd8a4d7451092cb9aa11da727ba69e0f0
14 changes: 9 additions & 5 deletions trunk/drivers/i2c/chips/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,16 @@ static int eeprom_detect(struct i2c_adapter *adapter, int address, int kind)
goto exit_kfree;

/* Detect the Vaio nature of EEPROMs.
We use the "PCG-" prefix as the signature. */
We use the "PCG-" or "VGN-" prefix as the signature. */
if (address == 0x57) {
if (i2c_smbus_read_byte_data(new_client, 0x80) == 'P'
&& i2c_smbus_read_byte(new_client) == 'C'
&& i2c_smbus_read_byte(new_client) == 'G'
&& i2c_smbus_read_byte(new_client) == '-') {
char name[4];

name[0] = i2c_smbus_read_byte_data(new_client, 0x80);
name[1] = i2c_smbus_read_byte(new_client);
name[2] = i2c_smbus_read_byte(new_client);
name[3] = i2c_smbus_read_byte(new_client);

if (!memcmp(name, "PCG-", 4) || !memcmp(name, "VGN-", 4)) {
dev_info(&new_client->dev, "Vaio EEPROM detected, "
"enabling privacy protection\n");
data->nature = VAIO;
Expand Down

0 comments on commit 704330b

Please sign in to comment.