Input: bma150 - extend chip detection for bma180

This driver has been used while on the OpenPhoenux GTA04 with a BMA180.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by Dr. H. Nikolaus Schaller and committed by Dmitry Torokhov ef3714fd 3d725caa

Changed files
+3 -1
drivers
input
misc
+3 -1
drivers/input/misc/bma150.c
··· 70 #define BMA150_CFG_5_REG 0x11 71 72 #define BMA150_CHIP_ID 2 73 #define BMA150_CHIP_ID_REG BMA150_DATA_0_REG 74 75 #define BMA150_ACC_X_LSB_REG BMA150_DATA_2_REG ··· 540 } 541 542 chip_id = i2c_smbus_read_byte_data(client, BMA150_CHIP_ID_REG); 543 - if (chip_id != BMA150_CHIP_ID) { 544 dev_err(&client->dev, "BMA150 chip id error: %d\n", chip_id); 545 return -EINVAL; 546 } ··· 644 645 static const struct i2c_device_id bma150_id[] = { 646 { "bma150", 0 }, 647 { "smb380", 0 }, 648 { "bma023", 0 }, 649 { }
··· 70 #define BMA150_CFG_5_REG 0x11 71 72 #define BMA150_CHIP_ID 2 73 + #define BMA180_CHIP_ID 3 74 #define BMA150_CHIP_ID_REG BMA150_DATA_0_REG 75 76 #define BMA150_ACC_X_LSB_REG BMA150_DATA_2_REG ··· 539 } 540 541 chip_id = i2c_smbus_read_byte_data(client, BMA150_CHIP_ID_REG); 542 + if (chip_id != BMA150_CHIP_ID && chip_id != BMA180_CHIP_ID) { 543 dev_err(&client->dev, "BMA150 chip id error: %d\n", chip_id); 544 return -EINVAL; 545 } ··· 643 644 static const struct i2c_device_id bma150_id[] = { 645 { "bma150", 0 }, 646 + { "bma180", 0 }, 647 { "smb380", 0 }, 648 { "bma023", 0 }, 649 { }