Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c93f5a7 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "backlight: qcom-spmi-wled: Change the SYNC toggle sequence"

parents 5190cfa3 4b00f2a8
Loading
Loading
Loading
Loading
+10 −13
Original line number Diff line number Diff line
@@ -378,15 +378,13 @@ static int wled_sync_toggle(struct wled *wled)

	rc = regmap_update_bits(wled->regmap,
			wled->sink_addr + WLED_SINK_SYNC,
			WLED_SINK_SYNC_MASK, WLED_SINK_SYNC_MASK);
			WLED_SINK_SYNC_MASK, WLED_SINK_SYNC_CLEAR);
	if (rc < 0)
		return rc;

	rc = regmap_update_bits(wled->regmap,
	return regmap_update_bits(wled->regmap,
			wled->sink_addr + WLED_SINK_SYNC,
			WLED_SINK_SYNC_MASK, WLED_SINK_SYNC_CLEAR);

	return rc;
			WLED_SINK_SYNC_MASK, WLED_SINK_SYNC_MASK);
}

static int wled5_sample_hold_control(struct wled *wled, u16 brightness,
@@ -460,20 +458,19 @@ static int wled5_set_brightness(struct wled *wled, u16 brightness)
	if (rc < 0)
		return rc;

	/* Update brightness values to modulator in WLED5 */
	val = (wled->cfg.mod_sel == MOD_A) ? WLED5_SINK_SYNC_MODA_BIT :
		WLED5_SINK_SYNC_MODB_BIT;
	val = 0;
	rc = regmap_update_bits(wled->regmap,
			wled->sink_addr + WLED5_SINK_MOD_SYNC_BIT_REG,
			WLED5_SINK_SYNC_MASK, val);
			WLED_SINK_SYNC_MASK, val);
	/* Update brightness values to modulator in WLED5 */
	if (rc < 0)
		return rc;

	val = 0;
	rc = regmap_update_bits(wled->regmap,
	val = (wled->cfg.mod_sel == MOD_A) ? WLED5_SINK_SYNC_MODA_BIT :
		WLED5_SINK_SYNC_MODB_BIT;
	return regmap_update_bits(wled->regmap,
			wled->sink_addr + WLED5_SINK_MOD_SYNC_BIT_REG,
			WLED_SINK_SYNC_MASK, val);
	return rc;
			WLED5_SINK_SYNC_MASK, val);
}

static int wled4_set_brightness(struct wled *wled, u16 brightness)