@@ -349,6 +349,7 @@ static int tw9910_set_scale(struct i2c_client *client,
static int tw9910_set_hsync(struct i2c_client *client,
const u16 start, const u16 end)
{
+ struct tw9910_priv *priv = to_tw9910(client);
int ret;
/* bit 10 - 3 */
@@ -363,15 +364,22 @@ static int tw9910_set_hsync(struct i2c_client *client,
if (ret < 0)
return ret;
- /* bit 2 - 0 */
- ret = i2c_smbus_read_byte_data(client, HSLOWCTL);
- if (ret < 0)
- return ret;
+ /* FIXME
+ *
+ * So far only revisions 0 and 1 have been seen
+ */
+ if (1 == priv->rev) {
- ret = i2c_smbus_write_byte_data(client, HSLOWCTL,
- (ret & 0x88) |
- (start & 0x0007) << 4 |
- (end & 0x0007));
+ /* bit 2 - 0 */
+ ret = i2c_smbus_read_byte_data(client, HSLOWCTL);
+ if (ret < 0)
+ return ret;
+
+ ret = i2c_smbus_write_byte_data(client, HSLOWCTL,
+ (ret & 0x88) |
+ (start & 0x0007) << 4 |
+ (end & 0x0007));
+ }
return ret;
}