aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2009-11-02Merge branches 'pcf50633-2.6.31' and 'gta02-machine-devices-2.6.31' into ↵Lars-Peter Clausen
om-gta02-2.6.31
2009-11-02backlight/mfd: Add pcf50633 backlight driverLars-Peter Clausen
This patch adds a backlight driver controling the pcf50633 led converter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2009-10-31Merge branch 'om-s3c-2.6.31' into om-gta02-2.6.31Lars-Peter Clausen
2009-10-31s3c2410_udc-2440_dual_packet-workaround.patchmokopatches
This is a patch that seems to make the USB hangs on the S3C2440 go away. At least a good amount of ping torture didn't make them come back so far. The issue is that, if there are several back-to-back packets, sometimes no interrupt is generated for one of them. This seems to be caused by the mysterious dual packet mode, which the USB hardware enters automatically if the endpoint size is half that of the FIFO. (On the 2440, this is the normal situation for bulk data endpoints.) There is also a timing factor in this. I think what happens is that the USB hardware automatically sends an acknowledgement if there is only one packet in the FIFO (the FIFO has space for two). If another packet arrives before the host has retrieved and acknowledged the previous one, no interrupt is generated for that second one. However, there may be an indication. There is one undocumented bit (none of the 244x manuals document it), OUT_CRS1_REG[1], that seems to be set suspiciously often when this condition occurs. There is also CLR_DATA_TOGGLE, OUT_CRS1_REG[7], which may have a function related to this. (The Samsung manual is rather terse on that, as usual.) This needs to be examined further. For now, the patch seems to do the trick. Note that this is not a clean solution by any means, because we might potentially get stuck in that interrupt for quite a while.
2009-10-24Merge branch 's3c-touchscreen-2.6.31' into om-gta02-2.6.31Lars-Peter Clausen
2009-10-24touchscreen patches for om-gta02-2.6.31Nelson Castillo
On Sat, Oct 24, 2009 at 3:04 AM, Nelson Castillo <arhuaco@freaks-unidos.net> wrote: > Hi there. I finally made this work. I tested with: cat /dev/input/touchscreen0 | hexdump > > I wonder why it didn't work with X... This rootfs works with other drivers I've tested (even with the upstream kernel). Problem found. Patch attached. From: Nelson Castillo <arhuaco@freaks-unidos.net> Date: Sat, 24 Oct 2009 14:12:58 -0500 Subject: [PATCH] Add auto-pst Without these lines the TS doesn't work. I didn't check who the author of the lines is. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-10-24MFD: pcf50633: Fix bitfield logic in interrupt handlerLars-Peter Clausen
As those constans are alread bitfields it's wrong Those constants are already bitfields.
2009-10-24ts-filter: Move include files to include/linux/input/touchscreenLars-Peter Clausen
2009-10-24Add s3c2410tsNelson Castillo
Add the ts and the relevant files. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-10-24Add touchscreen filtersNelson Castillo
Add filter source code and add it to the defconfig. Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
2009-10-17Merge branch 'om-s3c-2.6.31' into om-gta02-2.6.31Lars-Peter Clausen
2009-10-17Merge branch 'glamo-2.6.31' into om-gta02-2.6.31Lars-Peter Clausen
2009-10-17mtd: s3c2410_nand: Add config option to disable hw ecc at runtimeHolger Freyther
This patch adds a flag to the s3c2410_nand platform data, which configures whether hardware ecc is used for that chip. Currently hardware ecc is used if it was compiled into the kernel. But if you want to build a kernel which runs on multiple devices you might have a configuration where you have devices which require hw ecc as well as devices which want software ecc. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2009-10-17glamo-mci: Fix regulator error checkLars-Peter Clausen
regulator_get returns a ERR_PTR in case of an error and not a NULL pointer.
2009-10-11Merge branch 'glamo-2.6.31' into om-gta02-2.6.31Lars-Peter Clausen
2009-10-10glamo-core: Use set_irq_flags on ARM only. set_irq_{no,}prove everywhere elseLars-Peter Clausen
Although there will probably never any other platform using the glamo...
2009-10-10glamo: Use set_irq_data instead of set_irq_chip_data for the demux handlerLars-Peter Clausen
Also fixup order in which the irq handler and it's data are initalized.
2009-10-10glamo: Fix checkpatch issuses.Lars-Peter Clausen
2009-10-10glamo-core: Properly initalize irq_baseLars-Peter Clausen
2009-10-10glamo-mci: Reset if engine is stalled.Lars-Peter Clausen
2009-10-10Merge branch 'glamo-2.6.31' into om-gta02-2.6.31Lars-Peter Clausen
2009-10-10glamo-mci: Wait for the mmc engine to become idle before signaling that aLars-Peter Clausen
request has been finished.
2009-10-10glamo-mci: do_pio_{read,write}: Use sg_mapping_iter to iterate through the ↵Lars-Peter Clausen
sg list.
2009-10-09Merge branches 'om-s3c-2.6.31', 'gta02-machine-2.6.31', 'ar6000-2.6.31', ↵Lars-Peter Clausen
'glamo-2.6.31', 'jbt6k74-2.6.31', 'gta02-vibrator-2.6.31', 'bq27000-2.6.31', 'wm8753-2.6.31' and 'pcf50633-2.6.31' into om-gta02-2.6.31
2009-10-09mfd: pcf50633: Fix pcf50633-regulator drvdata usageLars-Peter Clausen
Currently the pcf50633-regulator driver data is set to the pcf50633 core structure, but the pcf50633-regulator remove handler assumes that it is set to the regulator device. This patch fixes the issue by accessing the pcf506533 core structure through its parent device and setting the driver data to the regulator device. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2009-10-09mfd: pcf50633: Use platform_device_add_data to set regulator platform dataLars-Peter Clausen
Platform devices allocated with platform_device_alloc should use platform_device_add_data to set the platform data, because kfree will be called on the platform_data when the device is released. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2009-10-09mfd: pcf50633: Cleanup pcf50633_probe error handlingLars-Peter Clausen
Currently the child devices were not freed if the irq could not be requested. This patch restructures the function, that in case of an error all previously allocated resources are freed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2009-10-07mfd: pcf50633: Fix memleak in pcf50633_client_dev_registerLars-Peter Clausen
Since platform_device_add_data copies the passed data, the allocated subdev_pdata is never freed. A simple fix would be to either free subdev_pdata or put it onto the stack. But since the pcf50633 child devices can rely on beeing children of the pcf50633 core device it's much more elegant to get access to pcf50633 core structure through that link. This allows to get completly rid of pcf5033_subdev_pdata. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2009-10-07mfd: pcf50633: move messages to appropriate log levelsArnaud Patard
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07mfd: pcf50633: make suspend/resume belong to i2c_driverLars-Peter Clausen
When not using the i2c suspend/resume callbacks the i2c client resumed before the i2c master. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07mfd: pcf50633 disable unnecessary shutdown on lowsysPaul Fertser
On gta02 hardware revision A5 it can actually bring the system down during normal operating conditions so we disable it. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07power: pcf50633: query charger status directlyPaul Fertser
Current scheme is fragile and is likely to go off sync, especially on batfull->adapter charging automatic MBC transition. Query the status bit every time we need it instead. We need to export another function to query for USB presence because we can't read anything from PCF50633 (via I2C) inside irq context and that is needed by usb gadgets. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07power: pcf50633: properly reenable charging when the supply conditions changePaul Fertser
If chgmod == BATFULL, setting chgena has no effect. Datasheet says we need to set resume instead but when autoresume is used resume doesn't work. Clear and set chgena instead. This enables a user to force charging by re-plugging USB even when the charger entered Battery Full mode, might be handy before a long trip. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07power: pcf50633: get rid of charging restart software auto-triggeringPaul Fertser
After reaching Battery Full condition MBC state machine switches back into charging mode when the battery voltage falls below 96% of a battery float voltage. The voltage drop in Li-Ion batteries is marginal (1-2%) till about 80% of its capacity - which means, after a BATFULL, charging won't be restarted until 75-80%. That is a desired behaviour recommended by battery manufacturers, don't mess with it. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07power: pcf50633: introduces battery charging current controlBalaji Rao
Signed-off-by: Balaji Rao <balajirrao@openmoko.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07power: pcf50633: add ac power supply class to the chargerSean McNeil
This adds an appropriate ac power_supply class and shows usb only when at the appropriate current limit. Signed-off-by: Sean McNeil <sean@mcneil.com> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07rtc: pcf50633: manage RTC alarm "pending" flagWerner Almesberger
This patch adds setting and clearing of the "pending" flag of the RTC alarm. The semantics follow the UEFI specification 2.2 available at http://www.uefi.org/specs/, i.e., the "pending" flag is cleared by disabling the alarm, but not by any other condition (such as the passing of time, a successful wakeup, or setting of a new alarm.) Signed-off-by: Werner Almesberger <werner@openmoko.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07rtc: pcf50633: consider alrm->enable in pcf50633_rtc_set_alarmWerner Almesberger
According to Documentation/rtc.txt, RTC_WKALM_SET sets the alarm time and enables/disables the alarm. We implement RTC_WKALM_SET through pcf50633_rtc_set_alarm. The enabling/disabling part was missing. Signed-off-by: Werner Almesberger <werner@openmoko.org> Reported-by: Michael 'Mickey' Lauer <mickey@openmoko.org> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07rtc: pcf50633: Fix month off-by-one errorRask Ingemann Lambertsen
The PCF50633 stores a month value of 1-12, but the kernel wants 0-11. Signed-off-by: Rask Ingemann Lambertsen <rask@sygehus.dk> Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07mfd: pcf50633: use set_irq_handler before requesting irqPaul Fertser
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-07Regulator: Implement list_voltage for pcf50633 regulator driver.Lars-Peter Clausen
This patch implements list_voltage for the pcf50644 regulator driver. As the voltages are linearly scaled the code to convert register values to voltages can be reused and most of the code can be shared with get_voltage. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-10-07pcf50633: use a dedicated workqueue for irq processingPaul Fertser
Using the default kernel "events" workqueue causes problems with synchronous adc readings if initiated from some task on the same workqueue. I had a deadlock trying to use pcf50633_adc_sync_read from a power_supply class driver because the reading was initiated from the workqueue and it waited for the irq processing to complete (to get the result) and that was put on the same workqueue. Signed-off-by: Paul Fertser <fercerpav@gmail.com>
2009-10-05Add glamo driver.Lars-Peter Clausen
2009-10-05Add s3c24xx_serial_console_set_silenceLars-Peter Clausen
2009-10-04Add jbt6k74 display driver.Lars-Peter Clausen
2009-10-04Add gta02-vibrator driver.Lars-Peter Clausen
2009-09-23Add hdq and bq27000 driver.Lars-Peter Clausen
2009-09-23Add ar6000 wireless driver.Lars-Peter Clausen
2009-09-09aoe: allocate unused request_queue for sysfsEd Cashin
Andy Whitcroft reported an oops in aoe triggered by use of an incorrectly initialised request_queue object: [ 2645.959090] kobject '<NULL>' (ffff880059ca22c0): tried to add an uninitialized object, something is seriously wrong. [ 2645.959104] Pid: 6, comm: events/0 Not tainted 2.6.31-5-generic #24-Ubuntu [ 2645.959107] Call Trace: [ 2645.959139] [<ffffffff8126ca2f>] kobject_add+0x5f/0x70 [ 2645.959151] [<ffffffff8125b4ab>] blk_register_queue+0x8b/0xf0 [ 2645.959155] [<ffffffff8126043f>] add_disk+0x8f/0x160 [ 2645.959161] [<ffffffffa01673c4>] aoeblk_gdalloc+0x164/0x1c0 [aoe] The request queue of an aoe device is not used but can be allocated in code that does not sleep. Bruno bisected this regression down to cd43e26f071524647e660706b784ebcbefbd2e44 block: Expose stacked device queues in sysfs "This seems to generate /sys/block/$device/queue and its contents for everyone who is using queues, not just for those queues that have a non-NULL queue->request_fn." Addresses http://bugs.launchpad.net/bugs/410198 Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13942 Note that embedding a queue inside another object has always been an illegal construct, since the queues are reference counted and must persist until the last reference is dropped. So aoe was always buggy in this respect (Jens). Signed-off-by: Ed Cashin <ecashin@coraid.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Bruno Premont <bonbons@linux-vserver.org> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-09-08i915: disable interrupts before tearing down GEM stateLinus Torvalds
Reinette Chatre reports a frozen system (with blinking keyboard LEDs) when switching from graphics mode to the text console, or when suspending (which does the same thing). With netconsole, the oops turned out to be BUG: unable to handle kernel NULL pointer dereference at 0000000000000084 IP: [<ffffffffa03ecaab>] i915_driver_irq_handler+0x26b/0xd20 [i915] and it's due to the i915_gem.c code doing drm_irq_uninstall() after having done i915_gem_idle(). And the i915_gem_idle() path will do i915_gem_idle() -> i915_gem_cleanup_ringbuffer() -> i915_gem_cleanup_hws() -> dev_priv->hw_status_page = NULL; but if an i915 interrupt comes in after this stage, it may want to access that hw_status_page, and gets the above NULL pointer dereference. And since the NULL pointer dereference happens from within an interrupt, and with the screen still in graphics mode, the common end result is simply a silently hung machine. Fix it by simply uninstalling the irq handler before idling rather than after. Fixes http://bugzilla.kernel.org/show_bug.cgi?id=13819 Reported-and-tested-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>