public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roel Kluin <12o3l@tiscali.nl>
To: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>,
	rpurdie@openedhand.com,
	Linux-arm <linux-arm-kernel@lists.arm.linux.org.uk>,
	linux-main <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH/HP7XX] - Add combined LCD / BL driver for platform HP Jornada 7xx handhelds
Date: Wed, 06 Feb 2008 13:38:39 +0100	[thread overview]
Message-ID: <47A9AA4F.80508@tiscali.nl> (raw)
In-Reply-To: <47A9A944.7090401@tiscali.nl>

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);
>> +}

  reply	other threads:[~2008-02-06 12:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-05 18:53 [PATCH/HP7XX] - Add combined LCD / BL driver for platform HP Jornada 7xx handhelds Kristoffer Ericson
2008-02-06 12:34 ` Roel Kluin
2008-02-06 12:38   ` Roel Kluin [this message]
2008-02-06 16:33     ` Kristoffer Ericson
2008-02-06 16:44       ` Russell King - ARM Linux
2008-02-06 19:21         ` Kristoffer Ericson
2008-02-06 19:31           ` Russell King - ARM Linux
2008-02-06 19:43             ` Kristoffer Ericson
2008-02-06 19:45               ` Russell King - ARM Linux
2008-02-07  7:19                 ` Uwe Kleine-König
2008-02-06 19:49             ` Kristoffer Ericson
2008-02-06 17:04       ` Roel Kluin
2008-02-06 17:22       ` Sam Ravnborg
2008-02-06 17:25       ` Richard Purdie
2008-02-06 16:26   ` Kristoffer Ericson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47A9AA4F.80508@tiscali.nl \
    --to=12o3l@tiscali.nl \
    --cc=kristoffer.ericson@gmail.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=rpurdie@openedhand.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox