Messages in this thread | | | Date | Wed, 06 Feb 2008 13:38:39 +0100 | From | Roel Kluin <> | 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); >> +}
| |