Loading drivers/input/touchscreen/it7258_ts_i2c.c +12 −11 Original line number Diff line number Diff line Loading @@ -1117,7 +1117,7 @@ static void IT7260_ts_work_func(struct work_struct *work) pm_relax(&gl_ts->client->dev); } static bool IT7260_chipIdentify(void) static int IT7260_chipIdentify(void) { static const uint8_t cmd_ident[] = {CMD_IDENT_CHIP}; static const uint8_t expected_id[] = {0x0A, 'I', 'T', 'E', '7', Loading @@ -1129,7 +1129,7 @@ static bool IT7260_chipIdentify(void) if (!IT7260_i2cWriteNoReadyCheck(BUF_COMMAND, cmd_ident, sizeof(cmd_ident))) { dev_err(&gl_ts->client->dev, "failed to write CMD_IDENT_CHIP\n"); return false; return -ENODEV; } IT7260_waitDeviceReady(false, false); Loading @@ -1137,7 +1137,7 @@ static bool IT7260_chipIdentify(void) if (!IT7260_i2cReadNoReadyCheck(BUF_RESPONSE, chip_id, sizeof(chip_id))) { dev_err(&gl_ts->client->dev, "failed to read chip-id\n"); return false; return -ENODEV; } dev_info(&gl_ts->client->dev, "IT7260_chipIdentify read id: %02X %c%c%c%c%c%c%c %c%c\n", Loading @@ -1145,7 +1145,7 @@ static bool IT7260_chipIdentify(void) chip_id[5], chip_id[6], chip_id[7], chip_id[8], chip_id[9]); if (memcmp(chip_id, expected_id, sizeof(expected_id))) return false; return -EINVAL; if (chip_id[8] == '5' && chip_id[9] == '6') dev_info(&gl_ts->client->dev, "rev BX3 found\n"); Loading @@ -1155,7 +1155,7 @@ static bool IT7260_chipIdentify(void) dev_info(&gl_ts->client->dev, "unknown revision (0x%02X 0x%02X) found\n", chip_id[8], chip_id[9]); return true; return 0; } static int reg_set_optimum_mode_check(struct regulator *reg, int load_uA) Loading Loading @@ -1572,7 +1572,7 @@ static int IT7260_ts_probe(struct i2c_client *client, static const uint8_t cmd_start[] = {CMD_UNKNOWN_7}; struct IT7260_ts_platform_data *pdata; uint8_t rsp[2]; int ret = -1; int ret = -1, err; struct dentry *temp; if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { Loading Loading @@ -1641,8 +1641,9 @@ static int IT7260_ts_probe(struct i2c_client *client, } } if (!IT7260_chipIdentify()) { dev_err(&client->dev, "Failed to identify chip!!!"); ret = IT7260_chipIdentify(); if (ret) { dev_err(&client->dev, "Failed to identify chip %d!!!", ret); goto err_identification_fail; } Loading Loading @@ -1768,12 +1769,12 @@ err_identification_fail: devm_pinctrl_put(gl_ts->ts_pinctrl); gl_ts->ts_pinctrl = NULL; } else { ret = pinctrl_select_state(gl_ts->ts_pinctrl, err = pinctrl_select_state(gl_ts->ts_pinctrl, gl_ts->pinctrl_state_release); if (ret) if (err) dev_err(&gl_ts->client->dev, "failed to select relase pinctrl state %d\n", ret); err); } } else { if (gpio_is_valid(pdata->reset_gpio)) Loading Loading
drivers/input/touchscreen/it7258_ts_i2c.c +12 −11 Original line number Diff line number Diff line Loading @@ -1117,7 +1117,7 @@ static void IT7260_ts_work_func(struct work_struct *work) pm_relax(&gl_ts->client->dev); } static bool IT7260_chipIdentify(void) static int IT7260_chipIdentify(void) { static const uint8_t cmd_ident[] = {CMD_IDENT_CHIP}; static const uint8_t expected_id[] = {0x0A, 'I', 'T', 'E', '7', Loading @@ -1129,7 +1129,7 @@ static bool IT7260_chipIdentify(void) if (!IT7260_i2cWriteNoReadyCheck(BUF_COMMAND, cmd_ident, sizeof(cmd_ident))) { dev_err(&gl_ts->client->dev, "failed to write CMD_IDENT_CHIP\n"); return false; return -ENODEV; } IT7260_waitDeviceReady(false, false); Loading @@ -1137,7 +1137,7 @@ static bool IT7260_chipIdentify(void) if (!IT7260_i2cReadNoReadyCheck(BUF_RESPONSE, chip_id, sizeof(chip_id))) { dev_err(&gl_ts->client->dev, "failed to read chip-id\n"); return false; return -ENODEV; } dev_info(&gl_ts->client->dev, "IT7260_chipIdentify read id: %02X %c%c%c%c%c%c%c %c%c\n", Loading @@ -1145,7 +1145,7 @@ static bool IT7260_chipIdentify(void) chip_id[5], chip_id[6], chip_id[7], chip_id[8], chip_id[9]); if (memcmp(chip_id, expected_id, sizeof(expected_id))) return false; return -EINVAL; if (chip_id[8] == '5' && chip_id[9] == '6') dev_info(&gl_ts->client->dev, "rev BX3 found\n"); Loading @@ -1155,7 +1155,7 @@ static bool IT7260_chipIdentify(void) dev_info(&gl_ts->client->dev, "unknown revision (0x%02X 0x%02X) found\n", chip_id[8], chip_id[9]); return true; return 0; } static int reg_set_optimum_mode_check(struct regulator *reg, int load_uA) Loading Loading @@ -1572,7 +1572,7 @@ static int IT7260_ts_probe(struct i2c_client *client, static const uint8_t cmd_start[] = {CMD_UNKNOWN_7}; struct IT7260_ts_platform_data *pdata; uint8_t rsp[2]; int ret = -1; int ret = -1, err; struct dentry *temp; if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { Loading Loading @@ -1641,8 +1641,9 @@ static int IT7260_ts_probe(struct i2c_client *client, } } if (!IT7260_chipIdentify()) { dev_err(&client->dev, "Failed to identify chip!!!"); ret = IT7260_chipIdentify(); if (ret) { dev_err(&client->dev, "Failed to identify chip %d!!!", ret); goto err_identification_fail; } Loading Loading @@ -1768,12 +1769,12 @@ err_identification_fail: devm_pinctrl_put(gl_ts->ts_pinctrl); gl_ts->ts_pinctrl = NULL; } else { ret = pinctrl_select_state(gl_ts->ts_pinctrl, err = pinctrl_select_state(gl_ts->ts_pinctrl, gl_ts->pinctrl_state_release); if (ret) if (err) dev_err(&gl_ts->client->dev, "failed to select relase pinctrl state %d\n", ret); err); } } else { if (gpio_is_valid(pdata->reset_gpio)) Loading