summaryrefslogtreecommitdiffstats
path: root/drivers/video/sa1100fb.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-14 10:49:44 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-02-21 11:56:19 +0000
commit531060fc1989a438fbc2c3198f5057c40121ff50 (patch)
tree9de13ddf44c42ef3137dacfc1b24d0dd746e6f66 /drivers/video/sa1100fb.h
parent798892966871077b8c867abf3d491227037dc2eb (diff)
downloadblackbird-op-linux-531060fc1989a438fbc2c3198f5057c40121ff50.tar.gz
blackbird-op-linux-531060fc1989a438fbc2c3198f5057c40121ff50.zip
FB: sa1100: combine RGB bitfield overrides into sa1100fb_mach_info
Allow the sa1100fb_mach_info structure to carry the RGB bitfield overrides, rather than requiring them to be separately initialized in sa1100fb_get_machine_info(). Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/video/sa1100fb.h')
-rw-r--r--drivers/video/sa1100fb.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/video/sa1100fb.h b/drivers/video/sa1100fb.h
index b1d5b089ee4a..77239b766e56 100644
--- a/drivers/video/sa1100fb.h
+++ b/drivers/video/sa1100fb.h
@@ -10,10 +10,12 @@
* for more details.
*/
-/*
- * These are the bitfields for each
- * display depth that we support.
- */
+#define RGB_4 0
+#define RGB_8 1
+#define RGB_16 2
+#define NR_RGB 3
+
+/* These are the bitfields for each display depth that we support. */
struct sa1100fb_rgb {
struct fb_bitfield red;
struct fb_bitfield green;
@@ -21,9 +23,7 @@ struct sa1100fb_rgb {
struct fb_bitfield transp;
};
-/*
- * This structure describes the machine which we are running on.
- */
+/* This structure describes the machine which we are running on. */
struct sa1100fb_mach_info {
u_long pixclock;
@@ -47,6 +47,9 @@ struct sa1100fb_mach_info {
u_int lccr0;
u_int lccr3;
+
+ /* Overrides for the default RGB maps */
+ const struct sa1100fb_rgb *rgb[NR_RGB];
};
/* Shadows for LCD controller registers */
@@ -57,11 +60,6 @@ struct sa1100fb_lcd_reg {
unsigned long lccr3;
};
-#define RGB_4 (0)
-#define RGB_8 (1)
-#define RGB_16 (2)
-#define NR_RGB 3
-
struct sa1100fb_info {
struct fb_info fb;
struct device *dev;
OpenPOWER on IntegriCloud