Changeset 2118
- Timestamp:
- 06/02/07 01:07:41 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/target/kernel/patches/gta01-power_control.patch
r2072 r2118 1 Index: linux-2.6.21 -moko/arch/arm/common/Makefile1 Index: linux-2.6.21.3-moko/arch/arm/common/Makefile 2 2 =================================================================== 3 --- linux-2.6.21 -moko.orig/arch/arm/common/Makefile4 +++ linux-2.6.21 -moko/arch/arm/common/Makefile3 --- linux-2.6.21.3-moko.orig/arch/arm/common/Makefile 4 +++ linux-2.6.21.3-moko/arch/arm/common/Makefile 5 5 @@ -17,3 +17,4 @@ 6 6 obj-$(CONFIG_SHARP_SCOOP) += scoop.o … … 8 8 obj-$(CONFIG_ARCH_IXP23XX) += uengine.o 9 9 +obj-$(CONFIG_MACH_NEO1973_GTA01)+= gta01_pm_gsm.o gta01_pm_gps.o gta01_pm_bt.o 10 Index: linux-2.6.21 -moko/arch/arm/common/gta01_pm_gps.c10 Index: linux-2.6.21.3-moko/arch/arm/common/gta01_pm_gps.c 11 11 =================================================================== 12 12 --- /dev/null 13 +++ linux-2.6.21 -moko/arch/arm/common/gta01_pm_gps.c13 +++ linux-2.6.21.3-moko/arch/arm/common/gta01_pm_gps.c 14 14 @@ -0,0 +1,558 @@ 15 15 +/* … … 571 571 +MODULE_AUTHOR("Harald Welte <laforge@openmoko.org>"); 572 572 +MODULE_DESCRIPTION("FIC GTA01 (Neo1973) GPS Power Management"); 573 Index: linux-2.6.21 -moko/arch/arm/common/gta01_pm_gsm.c573 Index: linux-2.6.21.3-moko/arch/arm/common/gta01_pm_gsm.c 574 574 =================================================================== 575 575 --- /dev/null 576 +++ linux-2.6.21 -moko/arch/arm/common/gta01_pm_gsm.c576 +++ linux-2.6.21.3-moko/arch/arm/common/gta01_pm_gsm.c 577 577 @@ -0,0 +1,217 @@ 578 578 +/* … … 793 793 +MODULE_AUTHOR("Harald Welte <laforge@openmoko.org>"); 794 794 +MODULE_DESCRIPTION("FIC GTA01 (Neo1973) GSM Management"); 795 Index: linux-2.6.21 -moko/arch/arm/common/gta01_pm_bt.c795 Index: linux-2.6.21.3-moko/arch/arm/common/gta01_pm_bt.c 796 796 =================================================================== 797 797 --- /dev/null 798 +++ linux-2.6.21 -moko/arch/arm/common/gta01_pm_bt.c799 @@ -0,0 +1,1 40@@798 +++ linux-2.6.21.3-moko/arch/arm/common/gta01_pm_bt.c 799 @@ -0,0 +1,154 @@ 800 800 +/* 801 801 + * Bluetooth PM code for the FIC Neo1973 GSM Phone … … 833 833 + goto out_1; 834 834 + } else if (!strcmp(attr->attr.name, "reset")) { 835 + if (s3c2410_gpio_getpin(GTA01_GPIO_BT_EN) )835 + if (s3c2410_gpio_getpin(GTA01_GPIO_BT_EN) == 0) 836 836 + goto out_1; 837 837 + } … … 848 848 + 849 849 + if (!strcmp(attr->attr.name, "power_on")) { 850 + if (on) 850 + /* if we are powering up, assert reset, then power, then 851 + * release reset */ 852 + if (on) { 853 + s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, 0); 851 854 + pcf50606_voltage_set(pcf50606_global, 852 855 + PCF50606_REGULATOR_D1REG, 853 856 + 3100); 857 + } 854 858 + pcf50606_onoff_set(pcf50606_global, 855 859 + PCF50606_REGULATOR_D1REG, on); 860 + s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, on); 856 861 + } else if (!strcmp(attr->attr.name, "reset")) { 857 + s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, on); 862 + /* reset is low-active, so we need to invert */ 863 + s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, on ? 0 : 1 ); 858 864 + } 859 865 + … … 868 874 +{ 869 875 + dev_info(&pdev->dev, DRVMSG ": suspending\n"); 870 + /* FIXME */ 876 + /* FIXME: The PMU should save the PMU status, and the GPIO code should 877 + * preserve the GPIO level, so there shouldn't be anything left to do 878 + * for us, should there? */ 871 879 + 872 880 + return 0; … … 876 884 +{ 877 885 + dev_info(&pdev->dev, DRVMSG ": resuming\n"); 878 + /* FIXME */879 886 + 880 887 + return 0; … … 899 906 +{ 900 907 + dev_info(&pdev->dev, DRVMSG ": starting\n"); 908 + 909 + /* we make sure that the voltage is off */ 910 + pcf50606_onoff_set(pcf50606_global, 911 + PCF50606_REGULATOR_D1REG, 0); 912 + /* we pull reset to low to make sure that the chip doesn't 913 + * drain power through the reset line */ 914 + s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, 0); 901 915 + 902 916 + return sysfs_create_group(&pdev->dev.kobj, >a01_bt_attr_group);
Note: See TracChangeset
for help on using the changeset viewer.
