Loading drivers/misc/apds993x.c +24 −7 Original line number Diff line number Diff line Loading @@ -73,6 +73,11 @@ /* * Defines */ #define APDS9930_ID 0x30 #define APDS9931_ID 0x39 #define APDS9900_ID 0x29 #define APDS9901_ID 0x20 #define APDS993X_ENABLE_REG 0x00 #define APDS993X_ATIME_REG 0x01 #define APDS993X_PTIME_REG 0x02 Loading Loading @@ -1832,12 +1837,24 @@ static int apds993x_init_client(struct i2c_client *client) return err; id = i2c_smbus_read_byte_data(client, CMD_BYTE|APDS993X_ID_REG); if (id == 0x30) { pr_info("%s: APDS9931\n", __func__); } else if (id == 0x39) { pr_info("%s: APDS9930\n", __func__); } else { pr_info("%s: Neither APDS9931 nor APDS9930\n", __func__); switch (id) { case APDS9931_ID: dev_dbg(&client->dev, "APDS9931\n"); break; case APDS9930_ID: dev_dbg(&client->dev, "APDS9930\n"); break; case APDS9900_ID: dev_dbg(&client->dev, "APDS9900\n"); break; case APDS9901_ID: dev_dbg(&client->dev, "APDS9931\n"); break; default: dev_err(&client->dev, "Neither APDS993x nor APDS990x\n"); return -ENODEV; } Loading Loading @@ -2475,7 +2492,7 @@ MODULE_DEVICE_TABLE(i2c, apds993x_id); static struct of_device_id apds993X_match_table[] = { { .compatible = "avago,apds9930",}, { }, { .compatible = "avago,apds9900",}, }; static const struct dev_pm_ops apds993x_pm_ops = { Loading Loading
drivers/misc/apds993x.c +24 −7 Original line number Diff line number Diff line Loading @@ -73,6 +73,11 @@ /* * Defines */ #define APDS9930_ID 0x30 #define APDS9931_ID 0x39 #define APDS9900_ID 0x29 #define APDS9901_ID 0x20 #define APDS993X_ENABLE_REG 0x00 #define APDS993X_ATIME_REG 0x01 #define APDS993X_PTIME_REG 0x02 Loading Loading @@ -1832,12 +1837,24 @@ static int apds993x_init_client(struct i2c_client *client) return err; id = i2c_smbus_read_byte_data(client, CMD_BYTE|APDS993X_ID_REG); if (id == 0x30) { pr_info("%s: APDS9931\n", __func__); } else if (id == 0x39) { pr_info("%s: APDS9930\n", __func__); } else { pr_info("%s: Neither APDS9931 nor APDS9930\n", __func__); switch (id) { case APDS9931_ID: dev_dbg(&client->dev, "APDS9931\n"); break; case APDS9930_ID: dev_dbg(&client->dev, "APDS9930\n"); break; case APDS9900_ID: dev_dbg(&client->dev, "APDS9900\n"); break; case APDS9901_ID: dev_dbg(&client->dev, "APDS9931\n"); break; default: dev_err(&client->dev, "Neither APDS993x nor APDS990x\n"); return -ENODEV; } Loading Loading @@ -2475,7 +2492,7 @@ MODULE_DEVICE_TABLE(i2c, apds993x_id); static struct of_device_id apds993X_match_table[] = { { .compatible = "avago,apds9930",}, { }, { .compatible = "avago,apds9900",}, }; static const struct dev_pm_ops apds993x_pm_ops = { Loading