aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-11-19[neo] Every access to GPIO bank B has to go through the shadow codeHolger Freyther
- Any setting of any PIN on bank B will undo the LED setting. Introduce neo1973_gpb_set_pin to set the PIN in a way not losing the LED or any other shadowed setting. - Update users of GPBXY for gta01 and gta02. Signed-Off-By: Holger Freyther <zecke@openmoko.org>
2008-11-19[neo bluetooth] GTA01_GPIO_MODEM_RST != GTA02_GPIO_MODEM_RSTHolger Freyther
The bluetooth enable and modem reset switched the order in gta02. Do not poke the bluetooth dongle when we want to reset the modem. Signed-Off-By: Holger Freyther <zecke@openmoko.org>
2008-11-19[led] Misc fixes in the driver codeHolger Freyther
to_bundle returned the wrong data. The platform_device is the parent of the class_device used by the LED device class. Return the correct class. num_leds was not set to the correct number of registered LEDs. All loops using num_leds (e.g. module unloading) were not executed at all. On removal of the module disable all LEDs. Signed-Off-By: Holger Freyther <zecke@openmoko.org>
2008-11-19[leds] We would enable PWM for all four timers, disable it for all four as wellHolger Freyther
Currently we do not use the PWM code to drive the LEDS. We have enabled the PWM for four timer sources but disable it only for three, fix that up. Signed-Off-By: Holger Freyther <zecke@openmoko.org>
2008-11-19Remove not needed #ifdef as machine_is_ is always defined.Holger Freyther
If we build a kernel without gta01/gta02 the machine_is_ macro will expand to (0) and the compiler will optimize the if (0) {} away. Signed-Off-By: Holger Freyther <zecke@openmoko.org>
2008-11-19OpenMoko => OpenmokoHolger Freyther
Signed-Off-By: Holger Freyther <zecke@openmoko.org>
2008-11-19fix-jack-debounce.patchAndy Green
Headphone jack detection is bouncy, it can trigger multiple interrupts on insertion or removal. This patch adds a workqueue that waits out the interrupt spew in 100ms units, and if it sees no more interrupts for 100ms only then samples and reports the jack state. I was unable to get a bounce after 20 or so tries after this. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19debug-glamo-add-lcd-regs-to-dump.patchwarmcat
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamofb-cmd-mode-locking.patchAndy Green
Glamo "cmd mode" is modal, but nothing took care about locking. Also cmd mode was entered recursively in rotate_lcd(). Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-glamofb-cmdqueue-timeout.patchAndy Green
loglevl=9 can cause failure to init glamo-fb problem seems to be too low timeout when text scrolling can delay commandqueue going empty Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-gsm-download-irq-balance-issue.patchAndy Green
Only enable or disable the interrupt if we see we are in the opposing state. Also force that damn GSM download signal deasserted on probe at the time we set the logical state for it to deasserted. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19defconfig-audio.patchwarmcat
Add in some audio config needed Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-wlan-disable.patchSameo
see http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=1288
2008-11-19Enable GPS only if it was powered on before suspending the deviceHolger Freyther
Similar to the neo1974_pm_gsm.c keep a static struct around. On suspend we will save the current power state, on resume we will use this information to enable power of the GPS only when it was powered on before. This is passing basic tests with screen /dev/ttySAC1 on suspend and resume. Only do this for the GTA02 as I don't have a gllin setup for the GTA01 I wonder why the suspend and resume code is not using gps_pwron_set and why for the GTA02 we need to keep the state of the GPIOs, this should be done by the s3c code. Signed-Off-by: Holger Frether <zecke@openmoko.org>
2008-11-19Fix the firing of "Jack"-Interrupts after resume when the modem is powered on.Holger Freyther
GTA02_GPIO_nDL_GSM defaults to high/1. On resume do not enable the DL_GSM if it was not enabled before. This is stopping the storm of interrupts. Fix the logic in the download file handling. Downloads are disabled (0) when the GTA02_GPIO_nDL_GSM is high (1). To enable downloading set GTA02_GPIO_nDL_GSM to low (0, !on). Disable the jack interrupt while download the is active. When disabling download we will get a couple of jack interrupts but this is hardly avoidable. Avoid reading the GPIO value if we do not even have a console set. Signed-Off-by: Holger Freyther <zecke@openmoko.org>
2008-11-19Fix spelling. flaoting => floatingHolger Freyther
Signed-Off-by: Holger Freyther <zecke@openmoko.org>
2008-11-19This is gta02 and not gta01. Do not call the vibrator led.Holger Freyther
Signed-Off-by: Holger Freyther <zecke@openmoko.org>
2008-11-19Add GPIO -> IRQ for the s3c2410 and add irq_to_gpio to the gpio.h of the ↵Holger Freyther
Samsung SoC Use this irq_to_gpio in the neo1973 keyboard driver
2008-11-19Convert the driver to the generic GPIO frameworkHolger Freyther
Signed-Off-by: Holger Freyther <zecke@openmoko.org>
2008-11-19Fix the FIXME, store the GPIO value for nowHolger Freyther
Signed-Off-by: Holger Freyther <zecke@openmoko.org>
2008-11-19Remove dead codeHolger Freyther
Signed-Off-by: Holger Freyther <zecke@openmoko.org>
2008-11-19Simplify the code, there is no need for a branch. The code forHolger Freyther
GTA01_GPIO_AUX_KEY looks odd. Signed-Off-by: Holger Freyther <zecke@openmoko.org>
2008-11-19add-pcb-rev-sysfs.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19debug-glamo-dump-regs.patchwarmcat
From: Andy Green <andy@openmoko.com> Sigend-off-by: Andy Green <andy@openmoko.com>
2008-11-19add-gta02-pcb-revision-detect.patchAndy Green
Add function int gta02_get_pcb_revision(void) which returns state of GTA02 PCB revision pins. It is also called and logged during boot with KERN_INFO. The results look like: b9 b8 b2 b1 b0 GPD4 GPD3 GPD0 GPC15 GPC13 GTA02 A5 and before: 0x000 GTA02 A6 : 0x001 Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19Do not send low level debugging to the modemHolger Freyther
Hey, I see no reason to send LL debugging messages to the modem. This can happen if we compile the Samsung SoC with PM debugging as in andy's git branch. From 452c17990dfeb9c2eb2ffa7ded4d24ddb1bcd4b2 Mon Sep 17 00:00:00 2001 From: Holger Freyther <zecke@openmoko.org> Date: Sun, 23 Mar 2008 00:57:28 +0100 Subject: [PATCH] Never ever send debug messages to the modem. The serial console is on UART2, send the messages for decompressing and low level debugging there. Signed-Off-by: Holger Freyther <zecke@openmoko.org>
2008-11-19fix-suspend-gps-tx-level.patchwarmcat
We used to drive output high into GPS unit in suspend Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-lis302dl-suspend-gpio.patchAndy Green
Add platform stuff to deal with going in and out of suspend so the motion sensor IO is not driving high into unpowered sensors Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19add-pcf50633-06-RTC_AIE-ioctlHolger Hans Peter Freyther
Hey, the legacy application 'atd' from Russ Nelson/Nils Faerber, used by Qtopia, to schedule alarms currently fails to start as the the above ioctl is failing. The other drivers in drivers/rtc implement the above ioctl and we can implement it too. The code to mask/unmask the RTC alarm is copied from the set_alarm routine and adapted to use the reg_set_bit_mask and reg_set_clear_mask. It is compiling, so it must work. Please welcome me the lkml way ;) Signed-Off-by: Holger Hans Peter Freyther <zecke@openmoko.org>
2008-11-19fix-charging-deassert-host-power-1a-detect.patchAndy Green
We don't take care to stop driving generated USB host power even when we have a 1A charger connected on the same pins. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19introduce-usb-host-power-control.patchAndy Green
Unless I really really missed the point, there is no support for enabling USB Host power for USB host mode. This patch adds a /sys node for GTA02 that allows control of the charge pump for 5V out on the USB mini connector It doesn't change any logical mode in the CPU, just enables (1) and disables (0) USB host power. # cat /sys/devices/platform/neo1973-pm-host.0/hostmode 0 # echo 1 > /sys/devices/platform/neo1973-pm-host.0/hostmode Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-gpio-led-patch-still-pwm-t3.patchwarmcat
Starting up all the PWMs seems to be needed for PWM3 operation and FIQ / HDQ / VIB operation. But after starting, turn the LEDs to GPIO-only. Applies on top of Willie's patch Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19use gpio control ledsWillie
2008-11-19fix-glamo-mci-fake-reset-opcode-in-suspend.patchwarmcat
2008-11-19fix-lcm-reinit-post-resume.patchwarmcat
2008-11-19fix-glamo-mci-defeat-ops-during-suspend.patchAndy Green
We need to be able to use the config option CONFIG_MMC_UNSAFE_RESUME that allows the rootfs to live on SD. But when we use this, it tries to send a reset command to the SD card during suspend -- and unfortunately many things like Power have suspended by then. This patch again rejects IO on the MMC device during suspend of the MMC device, and it gives the result the rootfs on SD card works okay. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19config-add-alsa.patchwarmcat
2008-11-19fix-s3c2410_timer_setup-resume-BUG.patchwarmcat
2008-11-19debug-suspend-dump-gpio-states-add-GPA.patchAndy Green
Add support for GPA[] GPIO bus since we have some NCs but they seem to output-only IO cells so no matter Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19introduce-bq27000-battery-driver.patchAndy Green
This is a driver for the bq27000 found in the Highcell A5 battery, and the platform device stuff for it for GTA02. It is a Power Supply Class battery device. The driver doesn't contain an HDQ engine but accepts pointers from the platform data to the HDQ action routines; our platform data plugs it into the FIQ HDQ engine stuff. The Power Supply class exposes the battery down /sys so you can find out battery status by doing the equivalent of this bash command for i in capacity charge_full current_now present status technology temp time_to_empty_now time_to_full_now type voltage_now ; do echo -n "$i " ; cat /sys/devices/platform/bq27000-battery.0/power_supply/bat/$i ; done Here is the kind of result you get from a battery discharging capacity 0 charge_full 1215585 current_now 183375 present 1 status Discharging technology Li-ion temp 276 time_to_empty_now 0 time_to_full_now 3932100 type Battery voltage_now 2761000 Note that temp is in 1/10 degrees C, other values are in uV, uA, uW. The time_to_* reported are bogus, but that is what the battery actually reports. We can make more mappings to entries in power_supply class but this is enough to get started with. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19introduce-fiq-hdq.patchAndy Green
This adds a platform driver and device which performs HDQ battery protocol using a single GPIO pin which is set through platform data. HDQ has some hard latency requirements which can't be met if interrupts are enabled, so normally using a GPIO for this will require blocking out all other interrupts and processes for several milliseconds per register being read or written. This HDQ protocol engine is a FSM implemented inside the the FIQ ISR and regulated by timer interrupts happening at 20us intervals. The path through the FSM on any "clock" is very short and should be over with in ~ 1us. Because FIQ has guaranteed latencies of <1us, it means we can service the HDQ protocol without blocking interrupts or any other process other than the caller that is waiting for the result. It's pretty cool performance from 1 GPIO ;-) Due to it being hard to do locking from the FIQ ISR the code simply sleeps 10ms or whatever the scheduler gives it and checks if the transfer took place yet. This platform driver doesn't have any knowledge about the device it is talking to, it just knows it is a HDQ device. It exports three functions for read, write and confirming HDQ is initialized. It also exports two /sys nodes that are usable by humans, one dumps the whole 127 register HDQ register space # cat /sys/devices/platform/gta02-hdq.0/hdq/dump 00 44 55 00 00 00 ba 04 a2 0d 50 00 00 00 00 00 00 00 9a 1a 00 00 ff ff ff ff 29 00 00 00 80 2b 00 00 00 00 00 00 ff ff 00 00 00 00 00 32 af 06 a0 d8 37 4e 00 00 00 00 00 00 00 34 2e 03 b4 e7 00 00 06 00 41 00 4c 02 00 00 00 00 00 00 00 00 83 02 00 00 94 09 59 b9 a5 0d 7f 21 00 00 7a ff df ff 62 ff a7 04 2e 05 00 00 00 01 00 07 00 00 2a 78 36 67 7b b5 1b a9 af 19 38 89 63 57 42 7c # and the other allows to set one register # echo 2 170 > /sys/devices/platform/gta02-hdq.0/hdq/write writes 0xAA into register 2. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19clean-snip-gpio-reinit.patchwarmcat
These are initialized already Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19bugfix-deglitch-gpio-output-enable.patchwarmcat
2008-11-19contrib-fix-chgstate-array-bloat.patchMike Montour
--- linux-2.6.22/drivers/i2c/chips/pcf50606.c.orig 2008-01-17 22:30:16.000000000 -0800 +++ linux-2.6.22/drivers/i2c/chips/pcf50606.c 2008-01-17 22:31:43.000000000 -0800 @@ -71,12 +71,19 @@ I2C_CLIENT_INSMOD_1(pcf50606); -#define PCF50606_F_CHG_FAST 0x00000001 /* Charger Fast allowed */ -#define PCF50606_F_CHG_PRESENT 0x00000002 /* Charger present */ -#define PCF50606_F_CHG_FOK 0x00000004 /* Fast OK for battery */ -#define PCF50606_F_CHG_ERR 0x00000008 /* Charger Error */ -#define PCF50606_F_CHG_PROT 0x00000010 /* Charger Protection */ -#define PCF50606_F_CHG_READY 0x00000020 /* Charging completed */ +#define PCF50606_B_CHG_FAST 0 /* Charger Fast allowed */ +#define PCF50606_B_CHG_PRESENT 1 /* Charger present */ +#define PCF50606_B_CHG_FOK 2 /* Fast OK for battery */ +#define PCF50606_B_CHG_ERR 3 /* Charger Error */ +#define PCF50606_B_CHG_PROT 4 /* Charger Protection */ +#define PCF50606_B_CHG_READY 5 /* Charging completed */ + +#define PCF50606_F_CHG_FAST (1<<PCF50606_B_CHG_FAST) /* Charger Fast allowed */ +#define PCF50606_F_CHG_PRESENT (1<<PCF50606_B_CHG_PRESENT) /* Charger present */ +#define PCF50606_F_CHG_FOK (1<<PCF50606_B_CHG_FOK) /* Fast OK for battery */ +#define PCF50606_F_CHG_ERR (1<<PCF50606_B_CHG_ERR) /* Charger Error */ +#define PCF50606_F_CHG_PROT (1<<PCF50606_B_CHG_PROT) /* Charger Protection */ +#define PCF50606_F_CHG_READY (1<<PCF50606_B_CHG_READY) /* Charging completed */ #define PCF50606_F_CHG_MASK 0x000000fc #define PCF50606_F_PWR_PRESSED 0x00000100 @@ -1026,12 +1033,12 @@ static DEVICE_ATTR(chgmode, S_IRUGO | S_IWUSR, show_chgmode, set_chgmode); static const char *chgstate_names[] = { - [PCF50606_F_CHG_FAST] = "fast_enabled", - [PCF50606_F_CHG_PRESENT] = "present", - [PCF50606_F_CHG_FOK] = "fast_ok", - [PCF50606_F_CHG_ERR] = "error", - [PCF50606_F_CHG_PROT] = "protection", - [PCF50606_F_CHG_READY] = "ready", + [PCF50606_B_CHG_FAST] = "fast_enabled", + [PCF50606_B_CHG_PRESENT] = "present", + [PCF50606_B_CHG_FOK] = "fast_ok", + [PCF50606_B_CHG_ERR] = "error", + [PCF50606_B_CHG_PROT] = "protection", + [PCF50606_B_CHG_READY] = "ready", }; static ssize_t show_chgstate(struct device *dev, struct device_attribute *attr,
2008-11-19local-config-ext2.patchwarmcat
2008-11-19local-config-pmu.patchwarmcat
2008-11-19local-config-defconfig-motion-sensor-gpio.patchwarmcat
2008-11-19local-config-wlan-config-changes.patchwarmcat
2008-11-19local-config-add-bluetooth-monolithic.patchwarmcat
Add Bluetooth in monolithic kernel
2008-11-19local-config-add-vfat-nls-to-kern.patchwarmcat
SD Card / VFAT in monolithic kernel Signed-off-by: Andy Green <andy@openmoko.com>