Commit 83af4067 authored by Dave.wang's avatar Dave.wang Committed by Bastien Nocera

elan: ELAN_0C42 always supports calibration

Split off calibration support checks into elan_supports_calibration()
parent ce31c1d7
......@@ -627,6 +627,14 @@ enum calibrate_states {
CALIBRATE_NUM_STATES,
};
static gboolean elan_supports_calibration(struct elan_dev *elandev)
{
if (elandev->dev_type == ELAN_0C42)
return TRUE;
return elandev->fw_ver >= ELAN_MIN_CALIBRATION_FW;
}
static void calibrate_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_data)
{
struct fp_img_dev *dev = user_data;
......@@ -640,7 +648,7 @@ static void calibrate_run_state(fpi_ssm *ssm, struct fp_dev *_dev, void *user_da
break;
case CALIBRATE_SAVE_BACKGROUND:
elan_save_background(elandev);
if (elandev->fw_ver < ELAN_MIN_CALIBRATION_FW) {
if (!elan_supports_calibration(elandev)) {
fp_dbg("FW does not support calibration");
fpi_ssm_mark_completed(ssm);
} else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment