| 
      
      
      From: <mar...@us...> - 2007-09-21 00:40:35
      
     | 
| Revision: 1333
          http://hackndev.svn.sourceforge.net/hackndev/?rev=1333&view=rev
Author:   marex_z71
Date:     2007-09-20 17:40:32 -0700 (Thu, 20 Sep 2007)
Log Message:
-----------
PalmTX: migrate to palmlcd_border
Modified Paths:
--------------
    linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c
    linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig
    linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile
    linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c
Removed Paths:
-------------
    linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_border.c
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c	2007-09-21 00:12:29 UTC (rev 1332)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmld/palmld.c	2007-09-21 00:40:32 UTC (rev 1333)
@@ -223,7 +223,7 @@
 
 struct platform_device palmld_border = {
 	.name	= "palmlcd-border",
-	.id	= 0,
+	.id	= -1,
 	.dev	= {
 		.platform_data = &border_machinfo,
 	},
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig	2007-09-21 00:12:29 UTC (rev 1332)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Kconfig	2007-09-21 00:40:32 UTC (rev 1333)
@@ -33,9 +33,3 @@
         depends on MACH_XSCALE_PALMTX
         help
             This driver handles the CF/PCCARD/PCMCIA bus.
-
-config PALMTX_BORDER
-        tristate "Palm TX Display border switch"
-	depends on MACH_XSCALE_PALMTX
-	help
-            Enable support for turning LCD border on/off
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile	2007-09-21 00:12:29 UTC (rev 1332)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/Makefile	2007-09-21 00:40:32 UTC (rev 1333)
@@ -6,4 +6,3 @@
 obj-$(CONFIG_PALMTX_BATTERY)		+= palmtx_battery.o
 obj-$(CONFIG_PALMTX_PM)			+= palmtx_pm.o
 obj-$(CONFIG_PALMTX_PCMCIA)		+= palmtx_pcmcia.o
-obj-$(CONFIG_PALMTX_BORDER)		+= palmtx_border.o
Modified: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c	2007-09-21 00:12:29 UTC (rev 1332)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx.c	2007-09-21 00:40:32 UTC (rev 1333)
@@ -45,6 +45,7 @@
 #include <asm/arch/palmtx-init.h>
 #include <asm/arch/palmtx-gpio.h>
 #include <asm/arch/pxa2xx_udc_gpio.h>
+#include <asm/arch/palmlcd-border.h>
 
 #include "../generic.h"
 
@@ -154,12 +155,16 @@
 /**************
  * LCD Border *
  **************/
+static struct palmlcd_border_pdata border_machinfo = {
+	.select_gpio	= GPIO_NR_PALMTX_BORDER_SELECT,
+	.switch_gpio	= GPIO_NR_PALMTX_BORDER_SWITCH,
+};
 
 struct platform_device palmtx_border = {
-        .name	= "palmtx-border",
+        .name	= "palmlcd-border",
         .id	= -1,
         .dev	= {
-        	.platform_data	= NULL,
+        	.platform_data	= &border_machinfo,
         },
 };
 
Deleted: linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_border.c
===================================================================
--- linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_border.c	2007-09-21 00:12:29 UTC (rev 1332)
+++ linux4palm/linux/trunk/arch/arm/mach-pxa/palmtx/palmtx_border.c	2007-09-21 00:40:32 UTC (rev 1333)
@@ -1,100 +0,0 @@
-/*
- *  Palm T|X LCD Border switch
- *
- *  Copyright (C) 2007 Marek Vasut <mar...@gm...>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/delay.h>
-
-#include <asm/arch/hardware.h>
-#include <asm/arch/palmtx-gpio.h>
-
-static ssize_t palmtx_border_write(struct device *dev, struct device_attribute *attr,
-				   const char *buf, size_t count)
-{
-	signed long state = simple_strtol(buf, NULL, 10);
-	
-	if ( state >= 1 )
-	    SET_PALMTX_GPIO(BORDER_SELECT, 1);
-	else
-	    SET_PALMTX_GPIO(BORDER_SELECT, 0);
-
-	msleep(50);
-	SET_PALMTX_GPIO(BORDER_SWITCH, 1);
-
-	if ((state == 1) || (state == 0)) /* default - switch border on/off */
-	    msleep(200);
-	else { /* hidden functionality - colored border */
-	    if (state >= 0)
-		msleep(state);
-	    else
-		msleep(-state);
-	}
-
-	SET_PALMTX_GPIO(BORDER_SWITCH, 0);
-
-	return count;
-}
-
-static ssize_t palmtx_border_read(struct device *dev, 
-				  struct device_attribute *attr,
-				  char *buf)
-{
-	return strlcpy(buf, GET_PALMTX_GPIO(BORDER_SELECT) ? "1\n" : "0\n", 3);
-}
-
-static DEVICE_ATTR(border_power, 0644, palmtx_border_read, palmtx_border_write);
-
-static struct attribute *palmtx_border_attrs[] = {
-	&dev_attr_border_power.attr,
-	NULL
-};
-
-static struct attribute_group palmtx_border_attr_group = {
-	.attrs	= palmtx_border_attrs,
-};
-
-static int __devinit palmtx_border_probe(struct platform_device *pdev)
-{
-	return sysfs_create_group(&pdev->dev.kobj, &palmtx_border_attr_group);
-}
-
-static int palmtx_border_remove(struct platform_device *pdev)
-{
-	sysfs_remove_group(&pdev->dev.kobj, &palmtx_border_attr_group);
-	return 0;
-}
-
-static struct platform_driver palmtx_border_driver = {
-	.probe 		= palmtx_border_probe,
-	.remove		= palmtx_border_remove,
-	.suspend 	= NULL,
-	.resume		= NULL,
-	.driver = {
-		.name 	= "palmtx-border",
-	}
-};
-
-static int __init palmtx_border_init(void)
-{
-	return platform_driver_register(&palmtx_border_driver);
-}
-
-static void palmtx_border_exit(void)
-{
-	platform_driver_unregister(&palmtx_border_driver);
-}
-
-module_init(palmtx_border_init);
-module_exit(palmtx_border_exit);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Marek Vasut <mar...@gm...>");
-MODULE_DESCRIPTION("Palm T|X Border switch");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |