Age | Commit message (Collapse) | Author |
|
pcf50633 driver rewritten to use the MFD model.
|
|
Move the RTC subdevice driver into drivers/rtc/rtc-pcf50633.c
|
|
Introduces pcf50633_read and pcf50633_write for reading a block of
registers. Assumes mutex held by caller.
|
|
We don't need to save state when we suspend as we don't put the PMU to
standby.
This improves the 'resume devices' time from 1.175s to 1.135 sec!
|
|
1. Removes pmu_voltage_rails stuff and replaces it with regulator_init_data[]
2. Removes voltage_ldoX and other /sys attributes.
3. Introduces s3c2410_pm_begin method to call regulator_suspend_prepare()
|
|
Changes the glamo-mci driver to use the regulator API.
|
|
Move backlight support out of pcf50633 driver. backlight
support now uses corgibl aka generic backlight support.
Set
CONFIG_BACKLIGHT_CORGI=y to use it.
|
|
Improves ADC access interface in pcf50633 driver.
|
|
Specify regulator constraints for gta02. For now, constraints for only
the current used devices are specified.
|
|
Modify pcf50633 driver to use the new regulator API.
|
|
Eliminate pcf50633_global and hence make pcf50633.c work with
multiple devices. pcf50633 is no longer a paltform device, but
an i2c device.
|
|
Merge in the accelerometer functionality from stable
From: Simon Kagstrom <simon.kagstrom@gmail.com>
This giant patch merges the functionality from stable. It also changes
the default threshold to 0 (generate interrupts on data). As the
level-triggered interrupts cause too frequent interruptions on low
thresholds, also set a lower limit to 36mg to avoid slowing down the
phone too much.
Also rearrange the probe function to disable interrupts only over device
I/O. This fixes the kernel errors when inserting the module.
Andy was right: In stable-tracking, no magic workaround is needed to
make suspend/resume work. I've tested the accelerometers under heavy
load (making the phone basically unusable) without getting lockups.
Signed-off-by: Simon Kagstrom <simon.kagstrom@gmail.com>
|
|
Some header files have moved so update #includes.
devs.h has been moved and updated. Delete the old version at
include/asm-arm/plat-s3c24xx as it is no longer used. Nothing to
migrate from this file to the new file at the new location.
s3c_device_i2c has become s3c_device_i2c0
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Minimal set of kernel changes to support Android operation.
Note arch/arm/configs/gta02-android-defconfig
|
|
This large patch removes motion sensor from Linux SPI bitbang driver.
Previously, some access was done through Linux SPI protected
by a mutex, and the ISR access was done by platform bitbang code due
to inability of Linux SPI driver to work in the interrupt context.
Now all access is done by bitbang callbacks in mach_gta02.c and are
protected by single scheme of interrupt lockout for the duration --
I line-by-line'd the driver to confirm that best I could, adding
protection and taking more care on several /sys related paths.
Because this is no longer a Linux SPI bus driver, the path for various
/sys things have changed. They can now be found down, eg,
/sys/devices/platform/lis302dl.1/sample_rate
lis302dl.1 is the top sensor and .2 the bottom. The names of the input
susbsytem paths remain the same as before.
Not working in interrupt context made trouble using interrupt lockout as
locking
[21474615.495000] BUG: sleeping function called from invalid context at kernel/sched.c:4684
[21474615.495000] in_atomic():0, irqs_disabled():128
[21474615.495000] 2 locks held by bash/779:
[21474615.495000] #0: (&buffer->mutex){....}, at: [<c00ec1b0>] sysfs_write_file+0x30/0x80
[21474615.495000] #1: (pm_mutex){....}, at: [<c007a34c>] enter_state+0xd4/0x10c
[21474615.495000] [<c0032a14>] (dump_stack+0x0/0x14) from [<c0049410>] (__might_sleep+0xdc/0xf8)
[21474615.495000] [<c0049334>] (__might_sleep+0x0/0xf8) from [<c0316c38>] (wait_for_common+0x28/0x190)
[21474615.495000] r5:c79ffd00 r4:c79ffd4c
[21474615.495000] [<c0316c10>] (wait_for_common+0x0/0x190) from [<c0316e30>] (wait_for_completion+0x18/0x1c)
[21474615.495000] r8:c79ffd84 r7:c79c4800 r6:c79ffd00 r5:c79ffd20 r4:c79ffd4c
[21474615.495000] [<c0316e18>] (wait_for_completion+0x0/0x1c) from [<c01d28ec>] (spi_sync+0xa0/0xb8)
[21474615.495000] [<c01d284c>] (spi_sync+0x0/0xb8) from [<c020ca10>] (__reg_write+0x88/0x94)
[21474615.495000] [<c020c988>] (__reg_write+0x0/0x94) from [<c020cc30>] (lis302dl_resume+0x54/0x198)
[21474615.495000] r6:60000013 r5:c79c4800 r4:c79bc9c0
[21474615.495000] [<c020cbdc>] (lis302dl_resume+0x0/0x198) from [<c01d2fb0>] (spi_resume+0x38/0x44)
[21474615.495000] r6:00000010 r5:c79c4800 r4:c79c4974
[21474615.495000] [<c01d2f78>] (spi_resume+0x0/0x44) from [<c0198f34>] (resume_device+0x8c/0x1b0)
[21474615.495000] [<c0198ea8>] (resume_device+0x0/0x1b0) from [<c01990c0>] (dpm_resume+0x68/0x134)
[21474615.495000] r7:00000003 r6:00000010 r5:c79c4800 r4:c79c4974
[21474615.495000] [<c0199058>] (dpm_resume+0x0/0x134) from [<c01991b4>] (device_resume+0x28/0x38)
[21474615.495000] r6:00000003 r5:c08b7188 r4:00000010
[21474615.495000] [<c019918c>] (device_resume+0x0/0x38) from [<c007a0f8>] (suspend_devices_and_enter+0x110/0x180)
[21474615.495000] r4:00000000
[21474615.495000] [<c0079fe8>] (suspend_devices_and_enter+0x0/0x180) from [<c007a320>] (enter_state+0xa8/0x10c)
[21474615.495000] r6:00000003 r5:c03aa414 r4:00000000
[21474615.495000] [<c007a278>] (enter_state+0x0/0x10c) from [<c007a430>] (state_store+0xac/0xc0)
[21474615.495000] r6:c7b80000 r5:00000003 r4:c03aa414
[21474615.495000] [<c007a384>] (state_store+0x0/0xc0) from [<c014dfb4>] (kobj_attr_store+0x24/0x30)
[21474615.495000] [<c014df90>] (kobj_attr_store+0x0/0x30) from [<c00ebe58>] (flush_write_buffer+0x54/0x68)
[21474615.495000] [<c00ebe04>] (flush_write_buffer+0x0/0x68) from [<c00ec1d8>] (sysfs_write_file+0x58/0x80)
[21474615.495000] r8:c7acca80 r7:c79fff78 r6:000be408 r5:00000004 r4:c7a19ea0
[21474615.495000] [<c00ec180>] (sysfs_write_file+0x0/0x80) from [<c00a91b8>] (vfs_write+0xbc/0x14c)
[21474615.495000] [<c00a90fc>] (vfs_write+0x0/0x14c) from [<c00a9774>] (sys_write+0x4c/0x7c)
[21474615.495000] r7:00000004 r6:00000000 r5:00000000 r4:c7acca80
[21474615.495000] [<c00a9728>] (sys_write+0x0/0x7c) from [<c002dc20>] (ret_fast_syscall+0x0/0x2c)
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
All that stuff should be enforced by device tree now, out with it
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Along the same lines as FIQ, HDQ can have children in device tree terms too.
Allow the same kind of callback in machine-specific code
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
This patch carries over the OpenMoko modifications at
include/asm-arm/arch-s3c2410/spi-gpio.h to
arch/arm/mach-s3c2410/include/mach/spi-gpio.h
Note: board_size and board_info have been removed upstream, but as we
still rely on them we'll just put them back for now. These will need to
be removed (and the corresponding driver changes made, of course) before
this can go upstream.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
This pulls the Moko changes to regs-sdi.h that were in
include/asm-arm/arch-s3c2410 over to the file at arch/arm/../mach and
deletes the file at include/asm-arm.
Note: we have been using a mix of regs-sdi.h from the two different
locations. The unification of these two files may have some unknown
consequences... keep your eyes open for oddities after applying this.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
This file already exists at arch/arm/mach-s3c2410/include/mach (where it
needs to be) and there are no OpenMoko changes to be carried over.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
This "move" is not so much a file move as just carrying over the current
status of the irqs.h file from include/asm-arm/arch-s3c2410 to the file
at arch/arm/mach-s3c2410/include/mach. For some reason both files
existed and had become out of sync.
NOTE: Some of these changes look fishy... please check these properly.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
This file was moved in the big file move, but some OpenMoko specific
changes did not make it. This patch peels out the relevant bits and
adds them to the gpio.h file in the upstream location.
The only OpenMoko specific change is the definition of gpio_to_irq and
irq_to_gpio. These functions should really be defined in gpio_chip and
asm-generic/gpio.h; this is coming soon, but until then we'll just use
the Moko definitions that we've been using up until now.
This is not strictly correct for the GTA02 case, but it works given
the configuration that's currently in use. This can be fixed (and
should become evident) when the configuration options are cleaned up.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
This file is OpenMoko specific and didn't get moved in the big file
move. Move it to arch/arm/mach-s3c2410/include/mach where it belongs
and fix the references to it.
Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
|
|
Attached is a patch that has greatly reduced the frequency of failures
to resume (due to an oops from the glamo resume handler), and the
dreaded "white screen after resume". I can't say that it fixes all of
these, although I have yet to see the white-screen since applying this
patch and suspending/resuming several hundred times (with the 30-second
suspend on the 2008.8 image and the endless stream of GSM error messages
generated by something in that image, it has proved to be very useful to
do an automated stress test!)
This patch will apply to stable, and should make stable slightly more,
well, "stable".
[Feel free to remove the debug messages if someone feels strongly about
that; I left them in because I think they might be useful in triaging
further crashes; I'm not at all convinced that this patch will fix all
the cases of resume failures.]
[[And, yes, this is ugly, really ugly.]]
[[[Oh yeah - there's still one extreme case that will result in an oops:
if a dependent driver is built as a module, and it is unloaded, and it
happened that the preceding suspend/resume was aborted, and that abort
happened between the dependent driver and the driver upon which it is
dependent, then a list entry will be left behind referencing the
unloaded module. There's just no good way to fix that given the way the
resume dependency plumbing is connected up right now, so just avoid
using modules for any of the drivers involved in the resume dependency
stuff.]]]
Regards,
Mike (mwester)
commit 905d2fc9c45f622418ce9ef4e67c23453aab7571
Author: Mike Westerhof <mwester@dls.net>
Date: Mon Aug 11 11:11:25 2008 -0500
always-call-resume-dependencies.patch
Ensure that a dependent resume handler is always executed,
even if the resume handler for driver upon which it is
dependent never suspends (and therefore never resumes either).
Also make sure that we do not end up with duplicate
dependencies registered, something that can happen if the
suspend is aborted due to driver failure or an early resume
(such as occurs when the GSM interrupts during suspend).
Signed-off-by: Mike Westerhof <mwester@dls.net>
|
|
- pca9632 is a LED driver which will be adopted in gta03.
Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>
|
|
Hi!
First: Unfortunately, the freerunner currently wakes up immediately on
suspend when the accelerometer IRQ is selected as a wakeup source. I'm
posting this for comments and if someone else wants to have a look at
this problem.
The patch should be safe to apply even though the sleep portion doesn't
work - as long as it's configured it will not disturb anything.
// Simon
--
lis302dl-configure-wakeup-interrupts.patch
From: simon.kagstrom <simon.kagstrom@gmail.com>
First: Unfortunately, the freerunner currently wakes up immediately on
suspend when the accelerometer IRQ is selected as a wakeup source.
Add configuration of wakeup/freefall interrupts through a sysfs
interface. Configuration is done through echoing a value of the
form
X Y Z THRESHOLD DURATION SPEC
to freefall_wakeup_1/2. X, Y and Z are threshold values, given as a
value > 0, < 0 or 0 to specify if an interrupt should be generated for
high or low thresholds or neither (off). THRESHOLD specifies the
threshold that must be exceeded. DURATION specifies the time in
milliseconds for which the acceleration should be measured. SPEC is
either '1' or '0' and specifies if the thresholds should be taken all
together or one at a time ('and' or 'or' mode).
Echoing '0' to the file turns off the interrupts.
Example:
echo "1 1 1 60 60 0" > freefall_wakeup_1 # Turn on x,y,z, 60ms/60 threshold, or-mode
echo "0" > freefall_wakeup_1 # Turn off interrupt
The hardware supports two simulataneous wakeup sources to be configured,
but the freerunner only connects one of the interrupt outputs. The patch
exports both. Similarly, only the "top" accelerometer can be used as a
wake-up source, and it's not possible to generate DATA_READY interrupts
while the wakeup interrupts are active.
Signed-off-by: Simon Kagstrom <simon.kagstrom@gmail.com>
|
|
Add definitions for the rest of the wakeup defs and also change FFWUSRC1
to FFWUSRC - there are two of these which are identical.
Signed-off-by: Simon Kagstrom <simon.kagstrom@gmail.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
This patch adds the gta01 backlight callback that defers the
restoring of the backlight until after the jbt driver has
resumed. This doesn't eliminate the flashing of the LCD on
the gta01, but it reduces it considerably.
Signed-off-by: Mike Westerhof <mwester@dls.net>
|
|
Subject: [PATCH] [ar6k] Build the wireless driver without DEBUG
- Remove DEBUG from the Makefile
- Do not send events through netlink to userspace. We might
need to reevaluate this. But we seem to use wireless_send_event
at the right places.
(SEND_EVENT_TO_APP)
- Do not report debug logs to apps
(REPORT_DEBUG_LOGS_TO_APP)
Signed-Off-By: Holger Freyther <zecke@openmoko.org>
|
|
Allows the direct creation of symlinks on /sys/bus/*/devices. This is needed
for a compat symlink from gta01-pm-gps.0 to neo1973-pm-gps.0 on the Openmoko
Neo1973 GTA01.
Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
|
|
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
Signed-off-by: Andy Green <andy@openmoko.com>
|
|
This patch gives glamo-mci a concept of a platform-defined
dynamic clock slowing callback. It means that platform code
can associate some completely external state to decide if
we run the SD clock at normal rate or a rate divided by a
module parameter "sd_slow_ratio", which you can set on
kernel commandline like this:
glamo_mci.sd_slow_ratio=8
you can also change it at runtime by
echo 8 > /sys/module/glamo_mci/parameters/sd_slow_ratio
If no platform callback is defined, then no slow mode
is used. If it is defined, then the default division
action is / 8, eg, 16MHz normal -> 2MHz slow mode.
Signed-off-by: Andy Green <andy@openmoko.com>
|