From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Richard Purdie <rpurdie@rpsys.net>
Cc: Andrew Morton <akpm@osdl.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [-mm patch 4/5] SharpSL: Abstract model specifics from Corgi Backlight driver
Date: Thu, 8 Sep 2005 13:30:39 +0100 [thread overview]
Message-ID: <20050908133039.E31595@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1126007631.8338.129.camel@localhost.localdomain>; from rpurdie@rpsys.net on Tue, Sep 06, 2005 at 12:53:51PM +0100
On Tue, Sep 06, 2005 at 12:53:51PM +0100, Richard Purdie wrote:
> +/*
> + * Corgi/Spitz Backlight Power
> + */
> +int corgi_bl_max(void)
> +{
> + if (machine_is_corgi() || machine_is_shepherd() || machine_is_husky())
> + return 0x2e;
> + return 0x3e;
Couldn't this be passed in cleanly via the device's platform data?
> +}
> +
> +void corgi_bl_set(int intensity)
> +{
Along with a function pointer for whatever's needed here for each
machine?
> + if ((machine_is_corgi() || machine_is_shepherd() || machine_is_husky())
> + && (intensity > 0x10))
> + intensity+=0x10;
> +
> + /* Skip 0x20 as it will blank the display */
> + if (intensity >= 0x20)
> + intensity++;
> +
> + /* Bits 0-4 are accessed via the SSP interface */
> + corgi_ssp_blduty_set(intensity & 0x1f);
> +
> + if (machine_is_corgi() || machine_is_shepherd() || machine_is_husky()) {
> +#ifdef CONFIG_PXA_SHARP_C7xx
> + /* Bit 5 is via SCOOP */
> + if (intensity & 0x0020)
> + set_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_BACKLIGHT_CONT);
> + else
> + reset_scoop_gpio(&corgiscoop_device.dev, CORGI_SCP_BACKLIGHT_CONT);
> +#endif
> + } else if (machine_is_spitz() || machine_is_borzoi()) {
> +#if defined(CONFIG_MACH_SPITZ) || defined(CONFIG_MACH_BORZOI)
> + /* Bit 5 is via SCOOP */
> + if (intensity & 0x0020)
> + reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_CONT);
> + else
> + set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_CONT);
> +
> + if (intensity)
> + set_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_ON);
> + else
> + reset_scoop_gpio(&spitzscoop2_device.dev, SPITZ_SCP2_BACKLIGHT_ON);
> +#endif
> + } else if (machine_is_akita()) {
> +#ifdef CONFIG_MACH_AKITA
> + /* Bit 5 is via IO-Expander */
> + if (intensity & 0x0020)
> + akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_CONT);
> + else
> + akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_CONT);
> +
> + if (intensity)
> + akita_set_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_ON);
> + else
> + akita_reset_ioexp(&akitaioexp_device.dev, AKITA_IOEXP_BACKLIGHT_ON);
> +#endif
> + }
> +}
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
prev parent reply other threads:[~2005-09-08 12:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-06 11:53 Richard Purdie
2005-09-08 12:30 ` Russell King [this message]
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=20050908133039.E31595@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/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
all inboxes | Powered by JetHome®