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 18:04:03 +0100 [thread overview]
Message-ID: <47A9E883.2000806@tiscali.nl> (raw)
In-Reply-To: <20080206173341.619c52c8.Kristoffer.ericson@gmail.com>
Kristoffer Ericson wrote:
> Oki, here is attempt #2 (btw, new mail or just keep thread?)
>
> Tested to build and checkpatch.
>
> diff --git a/drivers/video/backlight/jornada720_bllcd.c b/drivers/video/backlight/jornada720_bllcd.c
> +static int jornada_bl_update_status(struct backlight_device *dev)
> +{
> + int ret = 0;
> +
> + jornada_ssp_start();
> +
> + if (dev->props.power != FB_BLANK_UNBLANK ||
> + dev->props.fb_blank != FB_BLANK_UNBLANK) {
> + ret = jornada_ssp_inout(BRIGHTNESSOFF);
> + if (ret == -ETIMEDOUT)
since there is no curly bracket here...
> + printk(KERN_ERR "jornada720_bl: \
> + BrightnessOff timeout\n");
...indentation is wrong in lines below
> + /* backlight off */
> + PPSR &= ~PPC_LDD1;
> + PPDR |= PPC_LDD1;
> +
> + } else { /* backlight on */
too much indentation in lines below as well
> + PPSR |= PPC_LDD1;
> + if ((jornada_ssp_inout(SETBRIGHTNESS)) == TXDUMMY) {
> + /* send brightness value (0 is max, 255 lowest) */
> + if (jornada_ssp_byte(JORNADA_BL_MAX_BRIGHTNESS -
> + dev->props.brightness) != -ETIMEDOUT)
> + ret = (JORNADA_BL_MAX_BRIGHTNESS -
> + dev->props.brightness);
> + } else
> + printk(KERN_ERR "jornada720_bl: \
> + SetBrightness timeout\n");
> + }
> + jornada_ssp_end();
> +
> + return ret;
> +}
> +static int jornada_lcd_set_contrast(struct lcd_device *pdev, int contrast)
> +{
> + int ret = 0;
> +
> + jornada_ssp_start();
> +
> + ret = jornada_ssp_inout(SETCONTRAST);
> +
> + if (ret == -ETIMEDOUT)
> + printk(KERN_ERR "jornada_lcd: failure to set contrast\n");
> + else
whitespace before else
> + ret = jornada_ssp_byte(contrast);
> +
> + jornada_ssp_end();
> +
> + return ret;
> +}
> +
> +static int jornada_lcd_set_power(struct lcd_device *pdev, int power)
> +{
> + if (power != FB_BLANK_UNBLANK) {
> + /* turn off LCD */
> + PPSR &= ~PPC_LDD2;
> + PPDR |= PPC_LDD2;
> + } else {
> + /* turn on LCD */
> + PPSR |= PPC_LDD2;
> + }
whitespace before curly bracket
> +
> + return 0;
> +}
next prev parent reply other threads:[~2008-02-06 17:04 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
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 [this message]
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=47A9E883.2000806@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.