Re: [PATCH/HP7XX] - Add combined LCD / BL driver for platform HPJornada 7xx handhelds

From: Roel Kluin
Date: Wed Feb 06 2008 - 07:38:56 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/