kernel.git
9 years agoImplement enable/reset of 3D engine drm-tracking
Thomas White [Sat, 16 Jan 2010 20:30:22 +0000 (21:30 +0100)]
Implement enable/reset of 3D engine

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoMerge branch 'andy-tracking' into drm-tracking
Thomas White [Thu, 26 Nov 2009 21:06:58 +0000 (22:06 +0100)]
Merge branch 'andy-tracking' into drm-tracking

10 years agomfd: glamo: Enable FIFO stage for the LCD engine's memory access
Thomas White [Thu, 26 Nov 2009 08:55:33 +0000 (11:55 +0300)]
mfd: glamo: Enable FIFO stage for the LCD engine's memory access

By avoiding conflicts of memory access inside Glamo, this doubles the
speed of internal memory access.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agoinput: lis302dl: fix the resume path
Michael Trimarchi [Thu, 26 Nov 2009 00:51:19 +0000 (01:51 +0100)]
input: lis302dl: fix the resume path

This fix the resume path of the accelerometer. If the accelerometer
is not power up, restore to initial status. Move the REG_CTRL1 to the
last one position avoid writing on the register when the device is
in power down mode.

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agoFix KMS framebuffer physical address
Thomas White [Fri, 20 Nov 2009 21:06:30 +0000 (22:06 +0100)]
Fix KMS framebuffer physical address

This allows "/dev/fb0" to work correctly with mmap().

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoSimplify fences somewhat
Thomas White [Mon, 16 Nov 2009 20:41:26 +0000 (21:41 +0100)]
Simplify fences somewhat

The "dummy blit" isn't actually needed.  Leaving the scratch buffer there for the
time being, since it nicely shows up things which need fixing in KMS.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFix ordering of KMS initialisation
Thomas White [Sun, 15 Nov 2009 21:11:31 +0000 (22:11 +0100)]
Fix ordering of KMS initialisation

This fixes a problem which was hidden because the framebuffer was always at the lowest
address.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoEnable FIFO stage for the LCD engine's memory access
Thomas White [Sun, 15 Nov 2009 01:02:31 +0000 (02:02 +0100)]
Enable FIFO stage for the LCD engine's memory access

By avoiding conflicts of memory access inside Glamo, this doubles the
speed of internal memory access.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoAdd interrupt-driven waitqueue for better GPU synchronisation
Thomas White [Mon, 9 Nov 2009 23:06:38 +0000 (00:06 +0100)]
Add interrupt-driven waitqueue for better GPU synchronisation

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFix oops in GEM object allocation
Thomas White [Mon, 9 Nov 2009 21:01:52 +0000 (22:01 +0100)]
Fix oops in GEM object allocation

If the allocation of a new GEM object failed due to there being no available VRAM, then
glamo_gem_object_alloc() would bail out, calling drm_gem_object_unreference() in the
process.  glamodrm_gem_free_object() would then proceed to try to give back the memory
which was unsuccessfully allocated.  This obviously doesn't work, and resulted in an oops.
To fix it, check that the VRAM block handle is non-NULL before freeing it.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFix some CmdQ nonsense (?)
Thomas White [Sun, 8 Nov 2009 17:53:16 +0000 (18:53 +0100)]
Fix some CmdQ nonsense (?)

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoTidy up and fix burst submission
Thomas White [Sun, 8 Nov 2009 17:13:45 +0000 (18:13 +0100)]
Tidy up and fix burst submission

Fixing a stupid mistake in the process...

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoglamo-spi: missing semicolon after MODULE_AUTHOR()
Martin Jansa [Wed, 4 Nov 2009 19:09:03 +0000 (20:09 +0100)]
glamo-spi: missing semicolon after MODULE_AUTHOR()

Fix compilation error due to missing semicolon

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agoAdd burst commands
Thomas White [Sun, 18 Oct 2009 21:00:45 +0000 (23:00 +0200)]
Add burst commands

This adds kernel support for sending burst commands to the hardware.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoGTA01/GTA02: disable android drivers in default configs
Radek Polak [Fri, 2 Oct 2009 18:54:29 +0000 (20:54 +0200)]
GTA01/GTA02: disable android drivers in default configs

Android drivers are not needed for standard linux systems. We can save
memory by disabling them.

Android low memory killer (CONFIG_ANDROID_LOW_MEMORY_KILLER) also
prevents using swap by killing applications before swapping can start
on non android systems.

Reported-by: Jim Morris <morris@wolfman.com>
Signed-off-by: Radek Polak <psonek2@seznam.cz>
Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agoFix s3c-adc suspend
Vasily Khoruzhick [Fri, 2 Oct 2009 01:58:18 +0000 (20:58 -0500)]
Fix s3c-adc suspend

Fix for a bug that shows when the s3c2410 TS driver requests
a conversion from the s3c-adc driver and the machine goes into suspend.
In this case the touchscreen stops working.

Note: Nelson edited the original patch with a few small changes.

Reported-by: Radek Polak <psonek2@seznam.cz>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agoMerge commit 'refs/remotes/openmoko/andy-tracking' into drm-tracking
Thomas White [Sun, 27 Sep 2009 10:51:26 +0000 (11:51 +0100)]
Merge commit 'refs/remotes/openmoko/andy-tracking' into drm-tracking

10 years agoFix small typo
Nelson Castillo [Thu, 24 Sep 2009 22:37:14 +0000 (17:37 -0500)]
Fix small typo

s/though/thought/

Reported-by: Rask Ingemann Lambertsen <ccc94453@vip.cybercity.dk>
Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agoFix wrong commit
Nelson Castillo [Wed, 23 Sep 2009 07:44:08 +0000 (02:44 -0500)]
Fix wrong commit

I'm quite sorry I sent the commit that crashes GTA01.

The fix is quite short. Fixing is easier than reverting and
fixing conflicts.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agoRequire CONFIG_S3C24XX_ADC for GTA01/GTA02
Nelson Castillo [Wed, 23 Sep 2009 07:01:37 +0000 (02:01 -0500)]
Require CONFIG_S3C24XX_ADC for GTA01/GTA02

Select CONFIG_S3C24XX_ADC by defult for GTA01/GTA02.
Somebody will hate me if I don't send this patch soon.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agoGTA01: Disable glamo
Nelson Castillo [Tue, 22 Sep 2009 10:23:50 +0000 (05:23 -0500)]
GTA01: Disable glamo

Remove glamo from defconfig.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agoRemove sort call from group filter
Nelson Castillo [Tue, 22 Sep 2009 10:23:43 +0000 (05:23 -0500)]
Remove sort call from group filter

This patch applies upstream feedback to the group filter.
The algorithms are equivalent, thus we will get the same
results after applying this patch.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agoFix Andy's email in filters.
Nelson Castillo [Tue, 22 Sep 2009 10:23:36 +0000 (05:23 -0500)]
Fix Andy's email in filters.

He is not reachable at the OM address.
We need the right email if we send upstream.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agos3_ts: cleanups
Nelson Castillo [Tue, 22 Sep 2009 10:23:28 +0000 (05:23 -0500)]
s3_ts: cleanups

General cleanups. Now we pass checkpatch.pl.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agoMake s3c TS driver use s3c-adc API
Nelson Castillo [Fri, 18 Sep 2009 06:45:39 +0000 (01:45 -0500)]
Make s3c TS driver use s3c-adc API

I had a patch by Vasily Khoruzhick <anarsoul@gmail.com>
in the linux-arm-kernel as a guide for some of the changes.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agos3c24xx: introduce s3c-adc delay
Vasily Khoruzhick [Tue, 22 Sep 2009 10:23:12 +0000 (05:23 -0500)]
s3c24xx: introduce s3c-adc delay

Without this patch we cannot make the s3c2410/s3c2440 touchscreen
driver work.

Is this delay device-dependant?
Is there a better way to do this?

We specify the delay value (S3C2410_ADCDLY).

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
10 years agoS3C: ADC: Expose number of remaining conversions to convert callback
Nelson Castillo [Tue, 22 Sep 2009 10:23:04 +0000 (05:23 -0500)]
S3C: ADC: Expose number of remaining conversions to convert callback

This patch allow us to efficiently modify the number of
remaining conversions from the client side. This us useful
when we do not know in advance how many conversions we will
need or when we need to cancel pending conversions.

This change is simple enough to be compatible with existing
code that can just define the new pointer in the callback
and ignore it.

Sample usage:

http://tinyurl.com/s3c2410-ts-c (function stylus_adc_action).

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
10 years agoS3C: ADC: Fix lines with more than 80 chars in adc.h
Nelson Castillo [Tue, 22 Sep 2009 10:22:57 +0000 (05:22 -0500)]
S3C: ADC: Fix lines with more than 80 chars in adc.h

Small cleanup.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
[ben-linux@fluff.org: rewrote subject]
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
10 years agoRemove dependence on old netdev operations
Michael Trimarchi [Tue, 22 Sep 2009 17:36:37 +0000 (19:36 +0200)]
Remove dependence on old netdev operations

Remove the dependence to the OLD NET DEV operation

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
10 years agoMerge commit 'remotes/openmoko/andy-tracking' into drm-tracking
Thomas White [Fri, 11 Sep 2009 11:49:39 +0000 (12:49 +0100)]
Merge commit 'remotes/openmoko/andy-tracking' into drm-tracking

10 years agoFix sanitisation
Thomas White [Thu, 10 Sep 2009 09:26:20 +0000 (10:26 +0100)]
Fix sanitisation

Muppetry...

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoSanitise size and alignment of GEM objects
Thomas White [Wed, 9 Sep 2009 14:41:02 +0000 (15:41 +0100)]
Sanitise size and alignment of GEM objects

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agogta01: when charging the current reported should be negative
Paul Fertser [Thu, 27 Aug 2009 08:19:12 +0000 (12:19 +0400)]
gta01: when charging the current reported should be negative

Reported-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agopcf50606: fix RTC alarm
Arnaud Patard [Thu, 27 Aug 2009 07:46:41 +0000 (11:46 +0400)]
pcf50606: fix RTC alarm

This makes wake up on RTC alarm work properly, ported from rtc-pcf50633
commits 4caf79de95c26495e7cdc8204023d97598f887d2 and
c3e4e22fb0c3e1d82f66e67f6592949e48f3995a.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agopcf50633: move messages to appropriate log levels
Arnaud Patard [Thu, 27 Aug 2009 07:39:33 +0000 (11:39 +0400)]
pcf50633: move messages to appropriate log levels

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agopcf50606: move messages to appropriate log levels
Arnaud Patard [Thu, 27 Aug 2009 07:37:49 +0000 (11:37 +0400)]
pcf50606: move messages to appropriate log levels

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agoRevert "AR6000: move low-level cleanup from ar6000_destroy to ar6000_close"
Paul Fertser [Sun, 30 Aug 2009 07:55:48 +0000 (11:55 +0400)]
Revert "AR6000: move low-level cleanup from ar6000_destroy to ar6000_close"

This reverts commit 9c4451ff31b937a478f3d3eabef30b71cbe12b12.

This commit made wifi unusable after ifconfig down and sometimes after
unbinding.

10 years agoSilence suspend/resume
Thomas White [Thu, 27 Aug 2009 20:02:14 +0000 (21:02 +0100)]
Silence suspend/resume

This removes a few excess printks to tidy up suspend/resume.
Identical changes exist in andy-tracking already

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFix max voltage of LDO1
Sven Rebhan [Sun, 23 Aug 2009 15:17:23 +0000 (17:17 +0200)]
Fix max voltage of LDO1

This patch fixes a typo in the voltage setting of LDO1.
In the function mangle_pmu_pdata_by_system_rev() the value of min_uV
is set twice, while the value of max_uV stays at the initialized
value. This leaves us with .constraints.min_uV = 3300000 and
.constraints.max_uV = 1300000, which is probably not what we want.

This patch is only required on andy-tracking.

Signed-off-by: Sven Rebhan <odinshorse@googlemail.com>
10 years agoRemove 'vram_base'
Thomas White [Sat, 22 Aug 2009 16:27:22 +0000 (17:27 +0100)]
Remove 'vram_base'

This isn't needed any more.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoRelease mapping resources when deleting a GEM object
Thomas White [Sat, 22 Aug 2009 16:26:32 +0000 (17:26 +0100)]
Release mapping resources when deleting a GEM object

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoZero VRAM before passing to userspace
Thomas White [Sat, 22 Aug 2009 16:25:31 +0000 (17:25 +0100)]
Zero VRAM before passing to userspace

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoInitial buffer wait/IRQ stuff
Thomas White [Thu, 20 Aug 2009 16:27:15 +0000 (17:27 +0100)]
Initial buffer wait/IRQ stuff

IRQ stuff brought across from earlier work by Andreas.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoMove glamo_ioctl_gem_wait_rendering() to glamo-cmdq.c
Thomas White [Wed, 19 Aug 2009 16:42:57 +0000 (17:42 +0100)]
Move glamo_ioctl_gem_wait_rendering() to glamo-cmdq.c

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFormatting fussiness
Thomas White [Wed, 19 Aug 2009 16:19:06 +0000 (17:19 +0100)]
Formatting fussiness

10 years agoRemove KMS function announcements
Thomas White [Tue, 18 Aug 2009 23:08:59 +0000 (00:08 +0100)]
Remove KMS function announcements

I'm happy with how this works, now.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoRemove CmdQ wrap-around printk
Thomas White [Tue, 18 Aug 2009 22:11:19 +0000 (23:11 +0100)]
Remove CmdQ wrap-around printk

This works - no need for the message any more.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoUnlock mutex on unsuccessful mmap
Thomas White [Sun, 16 Aug 2009 17:01:52 +0000 (18:01 +0100)]
Unlock mutex on unsuccessful mmap

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFormatting
Thomas White [Sun, 16 Aug 2009 17:00:14 +0000 (18:00 +0100)]
Formatting

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoRemove unused snippet
Thomas White [Sun, 16 Aug 2009 16:59:26 +0000 (17:59 +0100)]
Remove unused snippet

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoMerge branch 'drm-tracking' of git+ssh://git-weiss@git.bitwiz.org.uk/srv/git-public...
Thomas White [Tue, 11 Aug 2009 18:16:22 +0000 (19:16 +0100)]
Merge branch 'drm-tracking' of git+ssh://git-weiss@git.bitwiz.org.uk/srv/git-public/kernel into drm-tracking

10 years agoUpdate licence boilerplate
Thomas White [Thu, 30 Jul 2009 11:09:37 +0000 (12:09 +0100)]
Update licence boilerplate

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoTidy up, and remove debug
Thomas White [Thu, 6 Aug 2009 16:09:21 +0000 (17:09 +0100)]
Tidy up, and remove debug

Tidy up a few lines, and remove debug lines which would slow us down.
Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoPut the mutex functions the right way round
Thomas White [Wed, 5 Aug 2009 23:01:01 +0000 (00:01 +0100)]
Put the mutex functions the right way round

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoioremap() the framebuffer properly
Thomas White [Tue, 4 Aug 2009 21:24:49 +0000 (22:24 +0100)]
ioremap() the framebuffer properly

This fixes the glamo-kms-fb initialisation to ioremap() the proper address for the
framebuffer, rather than just assuming it's at the start of the VRAM.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoTidy up initialisation
Thomas White [Tue, 4 Aug 2009 20:48:16 +0000 (21:48 +0100)]
Tidy up initialisation

Fix label usage, making a compiler warning go away in the process.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoKeep glamo-kms-fb off the hardware registers
Thomas White [Tue, 4 Aug 2009 20:34:34 +0000 (21:34 +0100)]
Keep glamo-kms-fb off the hardware registers

This removes the last remaining instance of glamo-kms-fb touching Glamo's
registers directly.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoCopyright and debug
Thomas White [Tue, 4 Aug 2009 19:59:00 +0000 (20:59 +0100)]
Copyright and debug

Update the copyright notice to include proper BSD credit for the memory mapping
in glamo-buffer.c.

Also removes some superfluous debug messages.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoTake FB allocation back down to the minimum
Thomas White [Tue, 4 Aug 2009 19:42:22 +0000 (20:42 +0100)]
Take FB allocation back down to the minimum

This doesn't work with the current 'standard' DDX, so there's no point trying
to make it work.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoGTA02: add support for dumb battery driver
Paul Fertser [Sun, 26 Jul 2009 14:09:13 +0000 (18:09 +0400)]
GTA02: add support for dumb battery driver

This allows to use gta01 battery driver on gta02.

echo bq27000-battery.0 > /sys/bus/platform/drivers/bq27000-battery/unbind
modprobe gta01_battery

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agogta02: use a dedicated function to query usb online status
Paul Fertser [Wed, 29 Jul 2009 19:56:48 +0000 (23:56 +0400)]
gta02: use a dedicated function to query usb online status

We need to use a dedicated function because we can't get charger
status from an irq context and that is required by usb gadgets.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agopcf50633: query charger status directly
Paul Fertser [Wed, 29 Jul 2009 14:24:39 +0000 (18:24 +0400)]
pcf50633: query charger status directly

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>
10 years agopcf50633: properly reenable charging when the supply conditions change
Paul Fertser [Wed, 29 Jul 2009 14:09:20 +0000 (18:09 +0400)]
pcf50633: properly reenable charging when the supply conditions change

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>
10 years agopcf50633: get rid of charging restart software auto-triggering
Paul Fertser [Wed, 29 Jul 2009 13:39:52 +0000 (17:39 +0400)]
pcf50633: get rid of charging restart software auto-triggering

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>
10 years agopcf50633: fix wrong define for 10bit ADC mode
Paul Fertser [Mon, 27 Jul 2009 21:09:04 +0000 (01:09 +0400)]
pcf50633: fix wrong define for 10bit ADC mode

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agopcf50633: revise locking for ADC
Paul Fertser [Mon, 27 Jul 2009 20:58:48 +0000 (00:58 +0400)]
pcf50633: revise locking for ADC

Current implementation is prone to races, this patch attempts to remove all
but one (in pcf50633_adc_sync_read).

The idea is that we need to guard the queue access only on inserting and
removing items. If we insert and there're no more items in the queue it
means that the last irq already happened and we need to trigger ADC
manually. If not, then the next conversion will be triggered by the irq
handler upon completion of the previous.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agopcf50633: use a dedicated workqueue for irq processing
Paul Fertser [Mon, 27 Jul 2009 20:41:15 +0000 (00:41 +0400)]
pcf50633: use a dedicated workqueue for irq processing

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>
10 years agogta02: charging_restart_interval should no longer be used, count on MBC auto-restart
Paul Fertser [Wed, 29 Jul 2009 14:32:52 +0000 (18:32 +0400)]
gta02: charging_restart_interval should no longer be used, count on MBC auto-restart

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agogta01_battery: add charge_{now,full} properties
Paul Fertser [Thu, 30 Jul 2009 20:47:41 +0000 (00:47 +0400)]
gta01_battery: add charge_{now,full} properties

Some userspace (notably Enlightment's batget) ignores "capacity"
completely if there're no other properties. Expose a fake value
(850mAh, typical for BL-5C) to make them happy.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agogta01_battery: generalise the driver, add capacity estimation
Paul Fertser [Sun, 26 Jul 2009 14:00:29 +0000 (18:00 +0400)]
gta01_battery: generalise the driver, add capacity estimation

Check if machine-specific hooks exist before calling, this allows to use
this driver with gta02 or any other device that is able to provide battery
voltage readings.

Report an estimate of capacity percentage left, based on discharge curves.
Strictly speaking, this is a violation of power_supply class specs but
since this is the only driver for dumb batteries and userspace lacks any
library to do the estimation itself, we have to stuff it here.

Please keep in mind that this estimation is by no means accurate, usually
cell phones have only 5 bars to represent charge status.

Credit goes to Joerg Reisenweber and SpeedEvil for helping with gathering
and analysing the data.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agogta01_battery: fix unloading bug
Paul Fertser [Sun, 26 Jul 2009 13:56:54 +0000 (17:56 +0400)]
gta01_battery: fix unloading bug

Driver data must be properly registered after allocation

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agoImplement glamo_ioctl_gem_mmap(), properly this time
Thomas White [Wed, 29 Jul 2009 23:42:42 +0000 (00:42 +0100)]
Implement glamo_ioctl_gem_mmap(), properly this time

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoImplement glamo_crtc_mode_set_base()
Thomas White [Tue, 28 Jul 2009 23:36:55 +0000 (00:36 +0100)]
Implement glamo_crtc_mode_set_base()

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoSet minimum and maximum dimensions in mode config
Thomas White [Tue, 28 Jul 2009 23:35:42 +0000 (00:35 +0100)]
Set minimum and maximum dimensions in mode config

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agogta02: fix compile without CHARGER_PCF50633
Lars-Peter Clausen [Sun, 26 Jul 2009 18:51:48 +0000 (20:51 +0200)]
gta02: fix compile without CHARGER_PCF50633

gta02_pmu_force_shutdown is only defined when CONFIG_CHARGER_PCF50633
is set, but it's used unconditionally.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
10 years agobq27000: Return -ENODEV in bq27000_battery_get_property if the battery is not
Lars-Peter Clausen [Tue, 21 Jul 2009 19:02:57 +0000 (21:02 +0200)]
bq27000: Return -ENODEV in bq27000_battery_get_property if the battery is not

If the battery is not present hdq_read will always return an error.
If the drivers knows that the battery is not present the correct thing to do is
to return -ENODEV instead of passing the error on.
Do this for all properties except POWER_SUPPLY_PROP_PRESENT.

The power supply sysfs expects us to do so, else it won't generate a proper
uevent file.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
10 years agoTidy up
Thomas White [Wed, 15 Jul 2009 19:46:56 +0000 (20:46 +0100)]
Tidy up

This just alters some formatting and removes old code.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoBring gta02_drm_config up to date with gta02_packaging_defconfig
Thomas White [Wed, 15 Jul 2009 16:45:54 +0000 (17:45 +0100)]
Bring gta02_drm_config up to date with gta02_packaging_defconfig

Signedy-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoMerge branch 'drm-kms' into drm-tracking
Thomas White [Wed, 15 Jul 2009 11:02:49 +0000 (12:02 +0100)]
Merge branch 'drm-kms' into drm-tracking

Conflicts:
drivers/mfd/glamo/glamo-cmdq.c
drivers/mfd/glamo/glamo-cmdq.h
drivers/mfd/glamo/glamo-drm-drv.c
drivers/mfd/glamo/glamo-drm-private.h

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoDe-bodge pixel clocks
Thomas White [Sat, 11 Jul 2009 22:24:49 +0000 (23:24 +0100)]
De-bodge pixel clocks

.. or re-bodge them, depending on your perspective.  This makes mode->clock
contain a value in Hz, in line with the KMS convention.  This is at the expense
of more calculations when generating the mode from the mach_info and when
setting the mode.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoDebug
Thomas White [Thu, 9 Jul 2009 00:03:13 +0000 (01:03 +0100)]
Debug

Just a little bit more debug information

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoExpose more memory via glamo-kms-fb
Thomas White [Wed, 8 Jul 2009 23:59:54 +0000 (00:59 +0100)]
Expose more memory via glamo-kms-fb

This increases the amount of memory exposed via the framebuffer.
This should eventually allow an fbdev-based DDX or a KMS DDX to
run on the same kernel, albeit suboptimally.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFix resume, part 2
Thomas White [Wed, 8 Jul 2009 23:58:03 +0000 (00:58 +0100)]
Fix resume, part 2

This removes a bogus check of var->pixclock.  With KMS, this value
is not relevant.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFix resume, part 1
Thomas White [Mon, 6 Jul 2009 18:06:22 +0000 (19:06 +0100)]
Fix resume, part 1

This seems to fix the kernel-level suspend/resume.  There remains a problem
which causes Xorg to crash on resume.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoGTA01: fix current and voltage reporting units
Paul Fertser [Sun, 5 Jul 2009 18:53:25 +0000 (22:53 +0400)]
GTA01: fix current and voltage reporting units

According to power_supply class specification all voltages and currents
must be reported in uV and uA correspondingly.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
10 years agoASoC: Fix wm8753 register cache size and initialization
Lars-Peter Clausen [Thu, 2 Jul 2009 21:04:16 +0000 (23:04 +0200)]
ASoC: Fix wm8753 register cache size and initialization

Register cache space was not being allocated for the final register,
causing bugs when it was used.  Allocate space for it.

Also ensure that the final register is displayed in sysfs.

[Commit message rewritten to document actual issue. -- broonie]

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
10 years agoASoC: Fix register cache initialisation for WM8753
Mark Brown [Fri, 3 Jul 2009 08:33:39 +0000 (09:33 +0100)]
ASoC: Fix register cache initialisation for WM8753

The wrong register cache variable was being used to provide the size for
the memcpy(), resulting in a copy of only a void * of data.

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
10 years agoInitial suspend/resume
Thomas White [Thu, 2 Jul 2009 22:44:07 +0000 (23:44 +0100)]
Initial suspend/resume

Doesn't work yet...

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoMore whitespace
Thomas White [Thu, 2 Jul 2009 21:12:01 +0000 (22:12 +0100)]
More whitespace

Fix a whitespace error introduced by the earlier debug stuff.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoUpdate gta02_drm_defconfig
Thomas White [Thu, 2 Jul 2009 21:10:40 +0000 (22:10 +0100)]
Update gta02_drm_defconfig

Alter the "DRM defconfig" to match the packaging config with minimal
tweaks for DRM.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoWhitespace
Thomas White [Thu, 2 Jul 2009 21:07:40 +0000 (22:07 +0100)]
Whitespace

Fix trailing whitespace

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoAlter jbt6k74 state on DPMS
Thomas White [Wed, 1 Jul 2009 23:33:04 +0000 (00:33 +0100)]
Alter jbt6k74 state on DPMS

This uses the "stopgap" method implemented earlier.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoDo not switch the screen off when changing mode
Thomas White [Wed, 1 Jul 2009 23:04:26 +0000 (00:04 +0100)]
Do not switch the screen off when changing mode

...because the clock(s) must be running while we talk to the chip.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoRemove debug watchpoints
Thomas White [Wed, 1 Jul 2009 22:11:52 +0000 (23:11 +0100)]
Remove debug watchpoints

Finished with these now.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoFix scanout timings
Thomas White [Wed, 1 Jul 2009 22:10:25 +0000 (23:10 +0100)]
Fix scanout timings

This fixes the scanout timing conversion so that it works.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoNasty jbt stuff
Thomas White [Wed, 1 Jul 2009 18:17:21 +0000 (19:17 +0100)]
Nasty jbt stuff

This adds a stopgap measure to permit manipulation of the LCD controller
chip in the absence of an fb notifier chain.  It also adds some messing
around with the DPMS stuff.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoDebug
Thomas White [Wed, 1 Jul 2009 18:16:01 +0000 (19:16 +0100)]
Debug

This adds some register debugging watchpoints

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoCompatibility glamo-drm <---> glamo-fb
Thomas White [Wed, 1 Jul 2009 18:08:22 +0000 (19:08 +0100)]
Compatibility glamo-drm <---> glamo-fb

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoEnable the LCD engine
Thomas White [Tue, 30 Jun 2009 17:49:39 +0000 (18:49 +0100)]
Enable the LCD engine

Well, duh.

Signed-off-by: Thomas White <taw@bitwiz.org.uk>
10 years agoWhitespace and debugging
Thomas White [Tue, 30 Jun 2009 17:00:23 +0000 (18:00 +0100)]
Whitespace and debugging

Signed-off-by: Thomas White <taw@bitwiz.org.uk>