if (err < 0)
return err;
- if (dmi_check_system(s5k4aa_vflip_dmi_table))
+ if (dmi_check_system(s5k4aa_vflip_dmi_table)) {
val = !val;
+ data = (data & 0x3f) |
+ (!sensor_settings[HFLIP_IDX] << 6) |
+ ((val & 0x01) << 7);
+ } else {
+ data = (data & 0x3f) |
+ (sensor_settings[HFLIP_IDX] << 6) |
+ ((val & 0x01) << 7);
+ }
- data = ((data & ~S5K4AA_RM_V_FLIP)
- | ((val & 0x01) << 7));
err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
if (err < 0)
return err;
- if (dmi_check_system(s5k4aa_vflip_dmi_table))
- val = !val;
-
if (val) {
err = m5602_read_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
if (err < 0)
data--;
err = m5602_write_sensor(sd, S5K4AA_ROWSTART_LO, &data, 1);
}
-
return err;
}
if (err < 0)
return err;
+ if (dmi_check_system(s5k4aa_vflip_dmi_table)) {
+ val = !val;
+ data = (data & 0x3f) |
+ (!sensor_settings[VFLIP_IDX] << 7) |
+ ((val & 0x01) << 6);
+ } else {
+ data = (data & 0x3f) |
+ (sensor_settings[VFLIP_IDX] << 7) |
+ ((val & 0x01) << 6);
+ }
+
data = ((data & ~S5K4AA_RM_H_FLIP) | ((val & 0x01) << 6));
err = m5602_write_sensor(sd, S5K4AA_READ_MODE, &data, 1);
if (err < 0)
data--;
err = m5602_write_sensor(sd, S5K4AA_COLSTART_LO, &data, 1);
}
-
return err;
}