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

Commit 33c319a2 authored by Alex Sarraf's avatar Alex Sarraf
Browse files

leds: wled: Remove brightness limit for 9-bit dimming



Both 12-bit and 9-bit dimming resolutions will now have
same range of 0 to 4095. 9-bit format now clips off lower 3 LSB.

CRs-fixed: 778141
Change-Id: I7a3fd23ba76f389f69e102f8f39508058f4dd277
Signed-off-by: default avatarAlex Sarraf <asarraf@codeaurora.org>
parent dca34e2b
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -162,7 +162,6 @@
#define QPNP_WLED_SEC_UNLOCK           0xA5

#define QPNP_WLED_MAX_STRINGS		4
#define WLED_MAX_LEVEL_511		511
#define WLED_MAX_LEVEL_4095		4095
#define QPNP_WLED_RAMP_DLY_MS		20
#define QPNP_WLED_TRIGGER_NONE		"none"
@@ -1551,9 +1550,6 @@ static int qpnp_wled_probe(struct spmi_device *spmi)
	wled->cdev.brightness_set = qpnp_wled_set;
	wled->cdev.brightness_get = qpnp_wled_get;

	if (wled->en_9b_dim_res)
		wled->cdev.max_brightness = WLED_MAX_LEVEL_511;
	else
	wled->cdev.max_brightness = WLED_MAX_LEVEL_4095;

	rc = led_classdev_register(&spmi->dev, &wled->cdev);