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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 06 Feb 2008 13:38:39 +0100
From:	Roel Kluin <12o3l@...cali.nl>
To:	Kristoffer Ericson <kristoffer.ericson@...il.com>
CC:	Russell King <linux@....linux.org.uk>, rpurdie@...nedhand.com,
	Linux-arm <linux-arm-kernel@...ts.arm.linux.org.uk>,
	linux-main <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH/HP7XX] - Add combined LCD / BL driver for platform HP
 Jornada 7xx handhelds

Roel Kluin wrote:
> Kristoffer Ericson wrote:
>> Greetings,
>>
>> Richard I've cleaned up the driver by checking with checkpatch.pl as Russell suggested. I would appreciate it if you could
>> look through the patch again and give comments since the patch looks somewhat different.
>>
>> I can add patch for Kconfig/Makefile later on but suspect there will be some changes required before that.
>>
>> Oh and to answer your question regarding MAX/MIN values of the backlight, 0 = max and 255 = min. So we simply turn it around
>> by returning 255 - value. Same thing when we need to set value.
>>
>> Best wishes
>> Kristoffer Ericson
>>
>> diff --git a/drivers/video/backlight/jornada720_bllcd.c b/drivers/video/backlight/jornada720_bllcd.c

>> +static int jornada_bl_get_brightness(struct backlight_device *dev)
>> +{
>> +	int ret;
>> +
>> +	/* check if backlight is on */
>> +	if (!(PPSR & PPC_LDD1))
>> +		return 255;
> return JORNADA_BL_MAX_BRIGHTNESS;
> 
>> +
>> +	jornada_ssp_start();
>> +	if (jornada_ssp_inout(GETBRIGHTNESS) == -ETIMEDOUT) {
>> +		printk(KERN_ERR "jornada720_bl: GetBrightness failed\n");
>> +		ret = 256;
> ret = JORNADA_BL_MAX_BRIGHTNESS + 1;
>> +	} else
>> +		ret = jornada_ssp_inout(TXDUMMY);

forgot to mention missing curly bracket here

>> +
>> +	jornada_ssp_end();
>> +
>> +	/* 0 is max brightness */
>> +	return (255 - ret);
> return (JORNADA_BL_MAX_BRIGHTNESS - ret);
>> +}
--
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