[commit] r2420 - in trunk: linux-2.6.x/drivers/video linux-2.6.x/drivers/video/backlight linux-2.6.x/include/asm-arm/arch-nds vendors/Nintendo/DLDI

dslinux_sonny_jim at dslinux.in-berlin.de dslinux_sonny_jim at dslinux.in-berlin.de
Mon Jun 29 20:31:26 CEST 2009


Author: dslinux_sonny_jim
Date: Mon Jun 29 20:31:25 2009
New Revision: 2420

Log:
DS Lite backlight control, via /sys/class/backlight/ndsbl/.  Still need to add check for DS phat

Added:
   trunk/linux-2.6.x/drivers/video/backlight/ndsbl.c
Modified:
   trunk/linux-2.6.x/drivers/video/backlight/Makefile
   trunk/linux-2.6.x/drivers/video/ndsfb.c
   trunk/linux-2.6.x/include/asm-arm/arch-nds/fifo.h
   trunk/vendors/Nintendo/DLDI/Makefile
   trunk/vendors/Nintendo/DLDI/config.linux-2.6.x
   trunk/vendors/Nintendo/DLDI/rc

Modified: trunk/linux-2.6.x/drivers/video/backlight/Makefile
==============================================================================
--- trunk/linux-2.6.x/drivers/video/backlight/Makefile	(original)
+++ trunk/linux-2.6.x/drivers/video/backlight/Makefile	Mon Jun 29 20:31:25 2009
@@ -4,3 +4,4 @@
 obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o
 obj-$(CONFIG_BACKLIGHT_CORGI)	+= corgi_bl.o
 obj-$(CONFIG_SHARP_LOCOMO)	+= locomolcd.o
+obj-$(CONFIG_ARCH_NDS)		+= ndsbl.o

Modified: trunk/linux-2.6.x/drivers/video/ndsfb.c
==============================================================================
--- trunk/linux-2.6.x/drivers/video/ndsfb.c	(original)
+++ trunk/linux-2.6.x/drivers/video/ndsfb.c	Mon Jun 29 20:31:25 2009
@@ -469,11 +469,9 @@
 
 static int ndsfb_blank(int blank_mode, struct fb_info *info)
 {
-	if (blank_mode) {
-		nds_fifo_send(FIFO_POWER_CMD(FIFO_POWER_CMD_BACKLIGHT_DISABLE, 0));
-	} else {
-		nds_fifo_send(FIFO_POWER_CMD(FIFO_POWER_CMD_BACKLIGHT_ENABLE, 0));
-	}
+	/*
+	 * This is now handled by drivers/video/backlight/ndsbl.c
+	 */
 	return 0;
 }
 

Modified: trunk/linux-2.6.x/include/asm-arm/arch-nds/fifo.h
==============================================================================
--- trunk/linux-2.6.x/include/asm-arm/arch-nds/fifo.h	(original)
+++ trunk/linux-2.6.x/include/asm-arm/arch-nds/fifo.h	Mon Jun 29 20:31:25 2009
@@ -45,7 +45,7 @@
 /* 
  * Fifo commands for power management chip
  * +-------------------------------------------------------------------------+
- * |3 bits FIFO_FIRMWARE | 5 bits FIFO_CMD_FIRMWARE_x | 24 bits command data |
+ * |3 bits FIFO_POWER | 5 bits FIFO_CMD_POWER_x | 24 bits command data |
  * +-------------------------------------------------------------------------+
 */
 #define FIFO_POWER_CMD(c, d) (FIFO_POWER | ((c & 0x1f) << 24) | (d & 0x00ffffff))
@@ -54,8 +54,8 @@
 #define FIFO_POWER_DECODE_ADDRESS(a) ((a) + 0x02000000)
 
 enum FIFO_POWER_CMDS {
-		FIFO_POWER_CMD_BACKLIGHT_ENABLE,
-		FIFO_POWER_CMD_BACKLIGHT_DISABLE,
+		FIFO_POWER_CMD_BACKLIGHT_POWER,
+		FIFO_POWER_CMD_BACKLIGHT_BRIGHTNESS,
 		FIFO_POWER_CMD_SYSTEM_POWER
 };
 
@@ -184,7 +184,7 @@
 		void (*time_handler)(u32 seconds);
 		void (*wifi_handler)(u8 cmd, u32 data);
 		void (*mic_handler)(void);
-		void (*power_handler)(u8 cmd);
+		void (*power_handler)(u8 cmd, u32 data);
 		/* ... */
 	} handler;
 };

Modified: trunk/vendors/Nintendo/DLDI/Makefile
==============================================================================
--- trunk/vendors/Nintendo/DLDI/Makefile	(original)
+++ trunk/vendors/Nintendo/DLDI/Makefile	Mon Jun 29 20:31:25 2009
@@ -9,7 +9,7 @@
 FATFS	 := media
 OPTDIR	 := opt
 
-ROMFS_DIRS := boot dev dev/input proc sbin $(FATFS)/linux $(OPTDIR) tmp 
+ROMFS_DIRS := boot dev dev/input proc sbin $(FATFS)/linux $(OPTDIR) tmp sys
 
 FS_DIRS := etc/rc.d home lib usr/bin usr/bin/coreutils usr/games usr/lib usr/share/udhcpc \
 	   var/lock var/tmp var/run var/log var/mail var/www usr/share/man usr/share/consolefonts \

Modified: trunk/vendors/Nintendo/DLDI/config.linux-2.6.x
==============================================================================
--- trunk/vendors/Nintendo/DLDI/config.linux-2.6.x	(original)
+++ trunk/vendors/Nintendo/DLDI/config.linux-2.6.x	Mon Jun 29 20:31:25 2009
@@ -1,6 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.14-hsc0
+# Mon Jun 29 18:11:46 2009
 #
 CONFIG_ARM=y
 # CONFIG_MMU is not set
@@ -609,6 +610,10 @@
 # CONFIG_LOGO_LINUX_CLUT224 is not set
 # CONFIG_LOGO_NDS_CLUT224 is not set
 CONFIG_LOGO_NDS_BIG_CLUT224=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_DEVICE=y
+# CONFIG_LCD_CLASS_DEVICE is not set
 
 #
 # Sound
@@ -703,7 +708,7 @@
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
-# CONFIG_SYSFS is not set
+CONFIG_SYSFS=y
 # CONFIG_TMPFS is not set
 # CONFIG_HUGETLBFS is not set
 # CONFIG_HUGETLB_PAGE is not set
@@ -822,6 +827,7 @@
 # Security options
 #
 # CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
 
 #
 # Cryptographic options

Modified: trunk/vendors/Nintendo/DLDI/rc
==============================================================================
--- trunk/vendors/Nintendo/DLDI/rc	(original)
+++ trunk/vendors/Nintendo/DLDI/rc	Mon Jun 29 20:31:25 2009
@@ -11,7 +11,9 @@
 fi
 mount -t ramfs none /var/run
 mount -t ramfs none /tmp
+mount -t sysfs none /sys
 
+# Create r/w /dev entries so dropbear will work
 mknod /var/run/ttyp0 c 3 0
 mknod /var/run/ttyp1 c 3 1
 mknod /var/run/ttyp2 c 3 2


More information about the dslinux-commit mailing list