|
From: <z7...@us...> - 2007-03-28 18:29:59
|
Revision: 942
http://svn.sourceforge.net/hackndev/?rev=942&view=rev
Author: z72ka
Date: 2007-03-28 11:29:58 -0700 (Wed, 28 Mar 2007)
Log Message:
-----------
palmtx: modified high level of battery to 4,1V and added some utility macros for GPIOs
Modified Paths:
--------------
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-03-28 17:34:13 UTC (rev 941)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-gpio.h 2007-03-28 18:29:58 UTC (rev 942)
@@ -6,7 +6,7 @@
* Based on palmld-gpio.h by Alex Osborne
*
* Authors: Cristiano P. <cristianop AT users DOT sourceforge DOT net>
- *
+ * Jan Herman <2h...@se...>
*
* 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
@@ -79,4 +79,37 @@
#define IRQ_GPIO_PALMTX_GPIO_RESET IRQ_GPIO(GPIO_NR_PALMTX_GPIO_RESET)
+
+/* Utility macros */
+
+#define GET_PALMTX_GPIO(gpio) \
+ (GPLR(GPIO_NR_PALMTX_ ## gpio) & GPIO_bit(GPIO_NR_PALMTX_ ## gpio))
+
+#define SET_PALMTX_GPIO(gpio, setp) \
+ do { \
+ if (setp) \
+ GPSR(GPIO_NR_PALMTX_ ## gpio) = GPIO_bit(GPIO_NR_PALMTX_ ## gpio); \
+ else \
+ GPCR(GPIO_NR_PALMTX_ ## gpio) = GPIO_bit(GPIO_NR_PALMTX_ ## gpio); \
+ } while (0)
+
+#define SET_PALMTX_GPIO_N(gpio, setp) \
+ do { \
+ if (setp) \
+ GPCR(GPIO_NR_PALMTX_ ## gpio) = GPIO_bit(GPIO_NR_PALMTX_ ## gpio); \
+ else \
+ GPSR(GPIO_NR_PALMTX_ ## gpio) = GPIO_bit(GPIO_NR_PALMTX_ ## gpio); \
+ } while (0)
+
+
+#define GET_GPIO(gpio) (GPLR(gpio) & GPIO_bit(gpio))
+
+#define SET_GPIO(gpio, setp) \
+ do { \
+ if (setp) \
+ GPSR(gpio) = GPIO_bit(gpio); \
+ else \
+ GPCR(gpio) = GPIO_bit(gpio); \
+ } while (0)
+
#endif
Modified: linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h
===================================================================
--- linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2007-03-28 17:34:13 UTC (rev 941)
+++ linux4palm/linux/trunk/include/asm-arm/arch-pxa/palmtx-init.h 2007-03-28 18:29:58 UTC (rev 942)
@@ -53,7 +53,7 @@
// BATTERY
-#define PALMTX_BAT_MAX_VOLTAGE 4000 // 3.99v current voltage at max charge as from Filez
+#define PALMTX_BAT_MAX_VOLTAGE 4100 // 3.99v current voltage at max charge as from Filez
#define PALMTX_BAT_MIN_VOLTAGE 3600 // 3.60v critical voltage as from FileZ
#define PALMTX_BAT_MAX_CURRENT 0 // unknokn
#define PALMTX_BAT_MIN_CURRENT 0 // unknown
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|