aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2008-11-19add-use-pcf50633-resume-callback-jbt6k74.patchAndy Green
Adds the resume callback stuff to glamo, then changes jbt6k74 to no longer use a sleeping workqueue, but to make its resume actions dependent on pcf50633 and glamo resume (for backlight and communication to LCM respectively) Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19introduce-pcf50633-resume-dependency-list.patchAndy Green
Adds resume dependency support to pcf50633 Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19introduce-charging-led-behaviour.patchAndy Green
Creates a new behaviour requested by Will that the red LED on GTA02 is lit during battery charging.and goes out when the battery is full. This is done by leveraging the PMU interrupts, but in one scenario there is no interrupt that occurs, when the battery is replaced after being removed with the USB power in all the while. So a sleepy work function is started under those circumstances to watch for battery reinsertion or USB cable pull. 100mA limit was not being observed under some conditions so this was fixed and tested with a USB cable with D+/D- disconnected. 1A charger behaviour was also tested. Showing the charging action exposes some inconsistency in pcf50633 charging action. If your battery is nearly full, it will keep charging it at decreasing current even after it thinks it is at 100% capacity for a long while. But if you pull that same battery and re-insert it, the charger state machine in pcf50633 believe it is full and won't charge it. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19Subject: [PATCH] Hardware glamo-fb cursor, some clean-up.Andrzej Zaborowski
2008-11-19Make ar6k not print soooo much to my consoleHolger Freyther
From 4cb4c308fde9c1f3598046ff98191d14b62bc609 Mon Sep 17 00:00:00 2001 From: Holger Freyther <zecke@openmoko.org> Date: Thu, 29 May 2008 00:09:32 +0200 Subject: [PATCH] [ar6k] silent++, removing -DDEBUG from the Makefile does not work
2008-11-19Fix possible null pointer dereference in s3c24xx_i2c_resumeHolger Freyther
From 0b9bae6aed5268707b348e48a01411ba420844e1 Mon Sep 17 00:00:00 2001 From: Holger Freyther <zecke@openmoko.org> Date: Tue, 27 May 2008 14:41:35 +0200 Subject: [PATCH] [janitor] Fix possible null pointer dereference Judging by the control flow of the resume method i2c->suspended++ could lead to a null pointer dereference.
2008-11-19fix-remove-unused-model-name-bq27000.patchAndy Green
Model name isn't in the bq27000 register set, remove the claim that we can deliver it Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-reduce-wake-reasons-in-pcf50633.patchAndy Green
Currently we are willing to wake from sleep from pcf50633 interrupts we don't actually do anything about even when we wake (somewhat puzzled). Let's disable some of these wake sources. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19add-resume-reason-sysfs.patchAndy Green
If you have U-Boot with uboot-add-find-wake-reason.patch, this patch will get you a wake reason report from cat /sys/devices/platform/neo1973-resume.0/resume_reason it looks like this: EINT00_ACCEL1 EINT01_GSM EINT02_BLUETOOTH EINT03_DEBUGBRD EINT04_JACK EINT05_WLAN EINT06_AUXKEY EINT07_HOLDKEY EINT08_ACCEL2 * EINT09_PMU adpins adprem usbins usbrem rtcalarm second onkeyr onkeyf exton1r exton1f exton2r exton2f exton3r exton3f * batfull chghalt thlimon thlimoff usblimon usblimoff adcrdy onkey1s lowsys lowbat hightmp autopwrfail dwn1pwrfail dwn2pwrfail ledpwrfail ledovp ldo1pwrfail ldo2pwrfail ldo3pwrfail ldo4pwrfail ldo5pwrfail ldo6pwrfail hcidopwrfail hcidoovl EINT10_NULL EINT11_NULL EINT12_GLAMO EINT13_NULL EINT14_NULL EINT15_NULL This shows a problem, false wake from suspend due to battery full Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19Fixup hang on resume caused by the s3c2410 touch screen driverHolger Freyther
From dc6d335b467646d802a21ea6b925ee97e83e07be Mon Sep 17 00:00:00 2001 From: Holger Freyther <zecke@openmoko.org> Date: Thu, 15 May 2008 01:16:23 +0200 Subject: [PATCH] Do not use msleep in the resume path of s3c2410_ts as it might lockup For some reason msleep might set the only task running into a suspended state and no timer will ever wake it up. Use mdelay to avoid this. I was not able to understand the reasoning of sleeping after enabling the clock. So we might just remove the msleep/mdelay at all and be fine. Signed-Off-By: Holger Freyther <zecke@openmoko.org>
2008-11-19fix-wep-needs-keys-before-ap.patchSean McNeil
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-suspend-backlight-timing-pm-debug.patchAndy Green
This patch improves the smoothness of suspend and resume action. Taking out CONFIG_PM_DEBUG allows much more rapid resume (the low level serial traffic appears to be synchronous) Added a platform callback in jbt driver and support in pcf50633 so we can defer bringing up the backlight until the LCM is able to process video again (which must happen after the glamo is up and producing video beacuse the LCM is hooked to glamo SPI) GTA01 should not be affected by all this as the callback will default to null and it is on pcf50606 Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-KEY_PHONE-up-down-inversion.patchSean McNeil
the KEY_PHONE is backwards. It returns up when pushed and down when released. The following change fixes it: Signed-off-by: Sean McNeil <sean@mcneil.com>
2008-11-19tracking-2.6.26-rc1-sdio-pnp-changes.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.26-rc1-remove-dupe-s3c2410_nand_update_chip.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.26-rc1-remove-input-dev-private-member.patchAndy Green
Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19clean-sdio-hcd-suspend.patchAndy Green
fix trailing whitespace and function args for suspend. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19From cc08b5986dfd8d971ee46ce7045fb7863f99a92a Mon Sep 17 00:00:00 2001Matt Hsu
Subject: [PATCH] - add suspend/resume function of s3c24xx_hcd driver Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>
2008-11-19gta01-fix-resume-redo-par.patchReddog
--> (http://bugzilla.openmoko.org/cgi-bin/bugzilla/attachment.cgi?id=595&action=view) fix resume of fbdev BZ#79 I played a bit with the fbdev resume. With this patch the neo doesn't get this white screen on resume from console and from X. Signed-off-by: Reddog <reddog@mastersword.de>
2008-11-19tracking-2.6.25-changed-s3c2410_dma_request-reurn.patchAndy Green
s3c2410_dma_request used to return 0 for OK and something else for error, now it returns -ve error code or +ve dma channel index + flag Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.25-struct-bus-type-loses-devices-member.patchAndy Green
I don't know what device the symlink should be linked against on GTA01, somebody that does know needs to edit it in where it says "FIXME"... I think the supplied method can work OK otherwise. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19tracking-2.6.25-input_dev-cdev-union-removed.patchAndy Green
struct input_dev in include/linux/input.h used to have a union cdev which contained the associated device struct pointer. This got simplified out in 2.6.25, so this patch removes cdev from our drivers that used it before. Signed-off-by: Andy Green <andy@openmoko.com>
2008-11-19fix-gta01-pmu-irq-edge-lost-on-resume.patchMike Wester
GTA01 -only Restore power button functionality after resume operation Per Werner's suggestion, run the PMU interrupt handler immediately after resume to clear/handle any pending interrupts from that device. This appears to resolve the dead-powerbutton-after-resume problem. This is not well-tested; need feedback to see if there are any side-effects or other problems. From BZ 1313 Signed-off-by: Mike Wester <mwester@dis.net>
2008-11-19fix-jack-interrupt-debounce-loss-window.patchAndy Green
Make sure we can't lose a jack interrupt in debounce, despite it is a one-in-a-million thing that just needs replug to clear Signed-off-by: Andy Green <andy@openmoko.com>
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[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-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-wlan-disable.patchSameo
see http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=1288
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-19debug-glamo-dump-regs.patchwarmcat
From: Andy Green <andy@openmoko.com> Sigend-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-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-19fix-s3c2410_timer_setup-resume-BUG.patchwarmcat
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>