lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 1 Feb 2012 12:34:46 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Christian Gmeiner <christian.gmeiner@...il.com>
Cc:	linux-kernel@...r.kernel.org, dilinger@...ued.net,
	linux-geode@...ts.infradead.org, rpurdie@...ys.net
Subject: Re: [PATCH v2] backlight: Add backlight driver for Bachmann's ot200

On Wed, 01 Feb 2012 19:48:57 +0100
Christian Gmeiner <christian.gmeiner@...il.com> wrote:

> Add backlight driver for Bachmann's ot200 visualisation device. The
> driver uses MFGPT 7 of CS5535 silicon to regulate the backlight.

Looks OK to me.  A couple of little tweaks:

+++ a/drivers/video/backlight/ot200_bl.c
@@ -19,15 +19,15 @@
 static struct cs5535_mfgpt_timer *pwm_timer;
 
 /* this array defines the mapping of brightness in % to pwm frequency */
-static const  u8 dim_table[101] = {0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
-				   2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4,
-				   4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9,
-				   10, 10, 11, 11, 12, 12, 13, 14, 15, 15, 16,
-				   17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28,
-				   30, 31, 33, 35, 37, 39, 41, 43, 45, 47, 50,
-				   53, 55, 58, 61, 65, 68, 72, 75, 79, 84, 88,
-				   93, 97, 103, 108, 114, 120, 126, 133, 140,
-				   147, 155, 163};
+static const u8 dim_table[101] = {0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2,
+				  2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4,
+				  4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 9, 9,
+				  10, 10, 11, 11, 12, 12, 13, 14, 15, 15, 16,
+				  17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28,
+				  30, 31, 33, 35, 37, 39, 41, 43, 45, 47, 50,
+				  53, 55, 58, 61, 65, 68, 72, 75, 79, 84, 88,
+				  93, 97, 103, 108, 114, 120, 126, 133, 140,
+				  147, 155, 163};
 
 struct ot200_backlight_data {
 	int current_brightness;
@@ -51,7 +51,7 @@ static int ot200_backlight_update_status
 	/* enable or disable PWM timer */
 	if (brightness == 0)
 		cs5535_mfgpt_write(pwm_timer, MFGPT_REG_SETUP, 0);
-	else if (brightness != 0 && data->current_brightness == 0) {
+	else if (data->current_brightness == 0) {
 		cs5535_mfgpt_write(pwm_timer, MFGPT_REG_COUNTER, 0);
 		cs5535_mfgpt_write(pwm_timer, MFGPT_REG_SETUP,
 			MFGPT_SETUP_CNTEN);
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ