kernel.git
8 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>

8 years agoGTA0[12]: add nls 866, 1251 to defconfigs
Paul Fertser [Wed, 24 Jun 2009 08:29:37 +0000 (12:29 +0400)]
GTA0[12]: add nls 866, 1251 to defconfigs

These codepages are still widely used by inferior operating systems to
represent cyrillic letters in filenames, both in fat filesystem and by some
samba-servers.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

8 years agoRNDIS: crude hack to fix oops on connecting to WXP SP2
Paul Fertser [Thu, 11 Jun 2009 06:16:14 +0000 (10:16 +0400)]
RNDIS: crude hack to fix oops on connecting to WXP SP2

F4t discovered that his freerunner panics on connect to his windows box.
This crude hack workarounds the problem.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years agogta02: move debugging messages to the appropriate levels
Paul Fertser [Fri, 12 Jun 2009 22:04:18 +0000 (02:04 +0400)]
gta02: move debugging messages to the appropriate levels

Clean up debugging messages so that we don't see any output with loglevel=4
(default for Qi). This avoids slowing down suspend/resume by slow fb
output.

Checkpatch barks on this patch but i guess most of that debugging would
have to be changed prior to upstream submission anyway.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years agoCONFIG_BATTERY_BQ27000_HDQ selects CONFIG_HDQ_GPIO_BITBANG
Luca Capello [Tue, 9 Jun 2009 23:23:59 +0000 (01:23 +0200)]
CONFIG_BATTERY_BQ27000_HDQ selects CONFIG_HDQ_GPIO_BITBANG

This is because of commit

  1f06c28eaa6e77384a366c3d2ab1ccdbb8a807e0
  The BQ27000 Battery requires HDQ.

Otherwise the battery is not available at all.

Signed-off-by: Luca Capello <luca@pca.it>

9 years agogta01: asoc: fix lm4857 control
Paul Fertser [Wed, 10 Jun 2009 11:39:38 +0000 (15:39 +0400)]
gta01: asoc: fix lm4857 control

Commit 4eaa9819dc08d7bfd1065ce530e31b18a119dcaf changed semantics of
private_value member of kcontrol. This resulted in inability to control
amplifier and subsequently in very low output volume.

Tested-by: Johannes Schauer <josch@pyneo.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years agoGTA0[12]: make headset button report PLAY pressed on press
Paul Fertser [Mon, 8 Jun 2009 19:46:53 +0000 (23:46 +0400)]
GTA0[12]: make headset button report PLAY pressed on press

As discussed on the ML, currently headset button reports "KEY_PAUSE
released" on press and "pressed" on release. For "pause" semantics it makes
sense but if someone thinks of that as of just another button, it'd be good
to have "pressed/released" events consistent with button press/release.

Luca Capello <luca@pca.it> suggested to change the button event to KEY_PLAY
and to invert the state to make it more consistent.

This trivial patch inverts button events for GTA03 KEY_PLUS and KEY_MINUS,
i'm not sure how undesirable that is. I can prepare an alternative that
preserves current behaviour on GTA03 per request.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years agoGTA02: gps power management bugfix
Paul Fertser [Fri, 5 Jun 2009 07:11:04 +0000 (11:11 +0400)]
GTA02: gps power management bugfix

After suspending with GPS powered on power_on sysfs node reports 0 and GPS
is actually unpowered but "echo 1 > power_on" has no effect. This patch
fixes it.

Reported and analised by Timo Juhani Lindfors <timo.lindfors@iki.fi>,
ticket #2293.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years agoGTA01, GTA02: remove RTC_DEBUG from defconfigs
Paul Fertser [Thu, 4 Jun 2009 20:01:15 +0000 (00:01 +0400)]
GTA01, GTA02: remove RTC_DEBUG from defconfigs

This option is meant for debugging and is not any more of interest to
ordinary users.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years agoGTA01: disable android wakelocks
Paul Fertser [Thu, 4 Jun 2009 20:10:08 +0000 (00:10 +0400)]
GTA01: disable android wakelocks

Enabling wakelocks leads to immediate suspend after resume. See
ce6840da7184043a09dd57d4c201a32ef7b6c083 for clarifications.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years agoGTA02: bq27000 report current charge
Paul Fertser [Thu, 4 Jun 2009 19:40:52 +0000 (23:40 +0400)]
GTA02: bq27000 report current charge

Using HAL for E's battery gadget highlighted an oddity: the kernel exposed
last full charge property but didn't expose current charge property. This
resulted in the wrong computation of current battery capacity by E's gadget
(and probably other programs as well).

This patch exposes a corresponding bq27000 register to make E battery
gadget happy (it is still not showing correct values because of bugs in HAL
resulting in 3 batteries (apm emulation and usb supply being bogus here)
instead of one).

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years agoImprove battery status notification
Michael Trimarchi [Sat, 23 May 2009 20:54:00 +0000 (17:54 -0300)]
Improve battery status notification

This patch adds a call to cancel_delayed_work before a call
to schedule_delayed_work.

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
Signed-off-by: Daniel Willmann <daniel@totalueberwachung.de>

9 years agogta01: fix jbt6k74 spi registration
Paul Fertser [Sun, 24 May 2009 11:19:58 +0000 (15:19 +0400)]
gta01: fix jbt6k74 spi registration

Without this jbt6k74 is not seen by the system and consequently
display doesn't work with Qi.

Rebasing to .28 introduced a regression (probably in
a6af63e826b79ae1ba2d8cbfa66805cc2dfe367c) resulting in jbt6k74 no longer
manageable by the kernel. This was unnoticed before because u-boot does its
own LCM initialization. With Qi it resulted in a white screen.

This patch is fixing it by making spi host bus number (unspecified,
defaults to 0) and spi device (jbt6k74) bus number match.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years ago Add a vbus polling function for use by the udc driver.
Mike Westerhof [Thu, 14 May 2009 01:15:54 +0000 (20:15 -0500)]
Add a vbus polling function for use by the udc driver.

Signed-off-by: Mike Westerhof <mwester@dls.net>

9 years ago This patch adds the option to poll vbus status to the s3c24xx udc driver.
Mike Westerhof [Thu, 14 May 2009 01:11:06 +0000 (20:11 -0500)]
This patch adds the option to poll vbus status to the s3c24xx udc driver.

    Machines that do not route the USB vbus signal to a GPIO can use this
    mechanism as an alternate way for the udc driver to detect the usb
    connect/disconnect state, which is useful (for example) to enable the
    link up/down state to be determined for the g_ether gadget.

Signed-off-by: Mike Westerhof <mwester@dls.net>

9 years agousb gadget: fix ethernet link reports to ethtool
Jonathan McDowell [Thu, 26 Mar 2009 07:45:27 +0000 (00:45 -0700)]
usb gadget: fix ethernet link reports to ethtool

The g_ether USB gadget driver currently decides whether or not there's a
link to report back for eth_get_link based on if the USB link speed is
set. The USB gadget speed is however often set even before the device is
enumerated. It seems more sensible to only report a "link" if we're
actually connected to a host that wants to talk to us. The patch below
does this for me - tested with the PXA27x UDC driver.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

9 years agoAvoid null pointer access on early call to pcf50633_mbc_get_status
Nelson Castillo [Fri, 15 May 2009 04:46:41 +0000 (23:46 -0500)]
Avoid null pointer access on early call to pcf50633_mbc_get_status

Avoid a kernel panic during an early call
to the pcf50633_mbc_get_status function.

9 years agoGlamo MFD: MFD_GLAMO_SPI_GPIO requires SPI_BITBANG to build
Rask Ingemann Lambertsen [Wed, 6 May 2009 00:41:24 +0000 (02:41 +0200)]
Glamo MFD: MFD_GLAMO_SPI_GPIO requires SPI_BITBANG to build

   This patch fixes a linking failure in the Glamo GPIO SPI bitbang support.

Signed-off-by: Rask Ingemann Lambertsen <rask@sygehus.dk>

9 years agoGlamo MFD: Fix indentation of Kconfig, convert spaces to tabs
Rask Ingemann Lambertsen [Wed, 6 May 2009 00:36:00 +0000 (02:36 +0200)]
Glamo MFD: Fix indentation of Kconfig, convert spaces to tabs

   This patch fixes some indentation which was off by one and converts
spaces to tabs.

Signed-off-by: Rask Ingemann Lambertsen <rask@sygehus.dk>

9 years agoGTA01: Add "present" property to power_supply
Nelson Castillo [Tue, 28 Apr 2009 23:58:05 +0000 (18:58 -0500)]
GTA01: Add "present" property to power_supply

Small patch to add /sys/class/power_supply/battery/present.
You must not run a GTA01 without battery thus it is always 1.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>

9 years agoCall unbind() hook of the usb gadget so that it can properly release its resources
Timo Juhani Lindfors [Tue, 28 Apr 2009 17:22:46 +0000 (12:22 -0500)]
Call unbind() hook of the usb gadget so that it can properly release its resources

Call unbind() hook of the gadget so that it can properly release its
resources. This fixes bug http://docs.openmoko.org/trac/ticket/2240
("removing/reloading g_ether not working"). All other instances of
usb_gadget_unregister_driver in Linux already call unbind() so it is
bit odd s3c2410_udc.c did not do so.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>

9 years agoUpdate status battery
Michael Trimarchi [Thu, 23 Apr 2009 07:12:14 +0000 (09:12 +0200)]
Update status battery

This patch adds the call to the worker in
bq27000_battery_external_power_changed. Now (un)plugging the USB cable
effects the battery status soon. I don't know if it is possible call
the status change directly.

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
Signed-off-by: Daniel Willmann <daniel@totalueberwachung.de>

9 years agoThis patch take the min platform data array size and keys array size.
Michael Trimarchi [Tue, 21 Apr 2009 16:23:42 +0000 (11:23 -0500)]
This patch take the min platform data array size and keys array size.

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>

9 years agoglamo_fb: make Xglamo workaround conditional
Nelson Castillo [Tue, 21 Apr 2009 16:18:43 +0000 (11:18 -0500)]
glamo_fb: make Xglamo workaround conditional

Distributions that use Xorg will not need the workaround at
all and now they can disable it.

Updated configurations to enable it by default.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>

9 years agoglamo_fb: Small cleanup
Nelson Castillo [Tue, 21 Apr 2009 16:18:33 +0000 (11:18 -0500)]
glamo_fb: Small cleanup

~ Cleanup of a redundant call I introduced before.
~ Removed useless assignation.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>

9 years agoMake Xglamo workaround opt-out. Fixes #2255.
Nelson Castillo [Tue, 21 Apr 2009 02:39:56 +0000 (21:39 -0500)]
Make Xglamo workaround opt-out. Fixes #2255.

To disable the workaround at run-time run:

echo 0 > /sys/class/i2c-adapter/i2c-0/0-0073/pcf50633-regltr.9/glamo3362.0/glamo-fb.0/xglamo_hack

I guess I should add a compile option now to completely disable the workaround but let's call
this an enhancement and let's close the bug now.

By default the workaround is enabled.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
Reported-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>

9 years agoDisable EXT4 / enable reiserfs
Nelson Castillo [Mon, 20 Apr 2009 06:33:29 +0000 (01:33 -0500)]
Disable EXT4 / enable reiserfs

Disable EXT4 in gta02_moredrivers_defconfig.
Enable reiserfs3 in gta02_moredrivers_defconfig and gta02_packaging_defconfig.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>
Reported-by: W.Kenworthy <billk@iinet.net.au>

9 years agoremove-ext4-from-gta02_packaging_defconfig.patch
Mike (mwester) [Mon, 20 Apr 2009 03:06:00 +0000 (22:06 -0500)]
remove-ext4-from-gta02_packaging_defconfig.patch

Removes ext4 support from the packaging defconfig; there is little
value in having this built into the kernel, and a bug in the current
2.6.29-rc3 kernel results in the kernel attempting to mount an ext2
rootfs as ext4, which fails.

Signed-off-by: Mike Westerhof <mwester@dls.net>

9 years agoRevert "Revert "Fixed the LCM driver state transition delay and pixel clock issue""
Nelson Castillo [Sun, 19 Apr 2009 19:41:33 +0000 (14:41 -0500)]
Revert "Revert "Fixed the LCM driver state transition delay and pixel clock issue""

This reverts commit aa2dbc74bed8cf60e591c654ba1882011b9a8ece.

Reverting the revert. Sorry for the noise.

Check:

http://lists.openmoko.org/pipermail/openmoko-kernel/2009-April/010023.html

9 years agoRevert "Fixed the LCM driver state transition delay and pixel clock issue"
Nelson Castillo [Sun, 19 Apr 2009 16:16:56 +0000 (11:16 -0500)]
Revert "Fixed the LCM driver state transition delay and pixel clock issue"

This reverts commit bd4b7e8e84ab43a13a4620b001d52d373c2122b3 which brought
WSOD back for some devices.

It was reported that the problem does not happen with Qi and it
seem it is good news. See:

https://docs.openmoko.org/trac/ticket/2274

Conflicts:

drivers/video/display/jbt6k74.c

9 years agoRevert "update gta01 config based on gta02 config"
Nelson Castillo [Thu, 16 Apr 2009 14:18:51 +0000 (09:18 -0500)]
Revert "update gta01 config based on gta02 config"

This reverts commit 962780e3631255fc5423192d0762f30a1fa45239.

Nothing really wrong with it but the resulting kernel was
too big for the GTA01 NAND flash.

GTA01 boots.

9 years agogta02: fix re-enabling backlight with <12 values
Paul Fertser [Thu, 16 Apr 2009 12:04:14 +0000 (16:04 +0400)]
gta02: fix re-enabling backlight with <12 values

If brightness value was set to anything less than 12, the backlight wasn't
re-enabled after unblanking the display. Closes ticket #2262.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years agoOHCI: Disabled additional debugging
Paul Fertser [Wed, 15 Apr 2009 21:37:55 +0000 (01:37 +0400)]
OHCI: Disabled additional debugging

Disabled additional debugging introduced
in 70b36104ab8c03f5be6d03344214d09447d9d4a8

9 years agomake touchscreen filter symbols const static in mach-gta01.c and mach-gta02.c
Nelson Castillo [Wed, 15 Apr 2009 05:21:33 +0000 (00:21 -0500)]
make touchscreen filter symbols const static in mach-gta01.c and mach-gta02.c

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>

9 years agoToo many info messages for apm battery support
Tim Niemeyer [Tue, 14 Apr 2009 17:07:26 +0000 (19:07 +0200)]
Too many info messages for apm battery support

Changing dev_info => dev_dbg.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>

9 years agobetter naming for filter_configuration
Tim Niemeyer [Tue, 14 Apr 2009 17:07:25 +0000 (19:07 +0200)]
better naming for filter_configuration

this affects gta01 and gta02, now we can enable both in the .config

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>

9 years agoupdate gta01 config based on gta02 config
Tim Niemeyer [Tue, 14 Apr 2009 17:07:27 +0000 (19:07 +0200)]
update gta01 config based on gta02 config

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>

9 years agoFix kernel oops when starting wpa_supplicant.
Mike Westerhof [Tue, 14 Apr 2009 07:10:02 +0000 (02:10 -0500)]
Fix kernel oops when starting wpa_supplicant.
This closes bug #2267.

Signed-off-by: Mike Westerhof <mwester@dls.net>

9 years agofbcon: Cleaned unnecessary debugging output (fix bug 2265)
Nicolas Dufresne [Mon, 13 Apr 2009 14:43:30 +0000 (10:43 -0400)]
fbcon: Cleaned unnecessary debugging output (fix bug 2265)

Cleaned unnecessary debugging output.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@gmail.com>

9 years agoRe-enable USBHOST attribute
Michael Trimarchi [Wed, 8 Apr 2009 13:50:02 +0000 (15:50 +0200)]
Re-enable USBHOST attribute

Re-enable usbmode attribute.
It was disabled by 70b36104ab8c03f5be6d03344214d09447d9d4a8.

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>

9 years agoCleanup USB host code of s3c2410
Michael Trimarchi [Wed, 8 Apr 2009 13:48:15 +0000 (15:48 +0200)]
Cleanup USB host code of s3c2410

Cleanup code of ohci-s3c2410.

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>

9 years agoCorrect platform s3c-ohci device name, makes bluetooth work
Paul Fertser [Tue, 7 Apr 2009 20:51:35 +0000 (00:51 +0400)]
Correct platform s3c-ohci device name, makes bluetooth work

Not sure what is the correct naming scheme and if MODULE_ALIAS in
drivers/usb/host/ohci-s3c2410.c is needed at all (if yes, probably it
should be modified too).

Signed-off-by: Paul Fertser <fercerpav@gmail.com>

9 years agoASoC: Clean up coding style issues in GTA02
Mark Brown [Fri, 3 Apr 2009 11:36:26 +0000 (12:36 +0100)]
ASoC: Clean up coding style issues in GTA02

No substantial changes, this just tidies up a bunch of coding style
issues that ought to be fixed up before merge (which I'll do when the
GTA02 machine support is queued for merge).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

9 years agoFixed the LCM driver state transition delay and pixel clock issue
Nicolas Dufresne [Sat, 4 Apr 2009 18:15:48 +0000 (14:15 -0400)]
Fixed the LCM driver state transition delay and pixel clock issue

    Space transition between sleep-in and sleep-out of at least
    120 ms as mentionned in the spec. Also, made sure the LCM
    is moved into sleep state before the pixel clock is turned off.
    To do so, I've modified glamo-fb to send FB_BLANK_POWERDOWN before
    turning off the pixel clock. Also fixed various violation of coding
    style. This patch should reduce the risk of white screen.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@gmail.com>

9 years agoAR6000: move low-level cleanup from ar6000_destroy to ar6000_close before-nelson-commits
Werner Almesberger [Thu, 2 Apr 2009 11:12:12 +0000 (08:12 -0300)]
AR6000: move low-level cleanup from ar6000_destroy to ar6000_close

A network device is supposed to disable its internals in the "close"
function. Doing so affords us protection against various races,
including the ioctl vs. rfkill conflict reported by Michael.

Signed-off-by: Werner Almesberger <werner@openmoko.org>
Reported-by: Michael Trimarch <michael@panicking.kicks-ass.org>

9 years agortc-pcf50606: Fix month off-by-one error
Werner Almesberger [Wed, 1 Apr 2009 02:23:05 +0000 (23:23 -0300)]
rtc-pcf50606: Fix month off-by-one error

According to the PCF50606 manual, the issues resoved by commit
cc1663fc922c03feb0d7bbb8b18d62fbac0128de also exists there.

Signed-off-by: Werner Almesberger <werner@openmoko.org>
Reported-by: Rask Ingemann Lambertsen <rask@sygehus.dk>

9 years agoAR6000: support GTA02-specific rfkill only if building for GTA02
Werner Almesberger [Tue, 31 Mar 2009 07:47:06 +0000 (04:47 -0300)]
AR6000: support GTA02-specific rfkill only if building for GTA02

This is loosely based on a patch by Ivan Petrov.

Signed-off-by: Werner Almesberger <werner@openmoko.org>
Reported-by: Ivan Petrov <ivan_p@hotbox.ru>

9 years agoThis patch brings suspend/resume back to GTA01
Tim Niemeyer [Fri, 27 Mar 2009 17:10:36 +0000 (18:10 +0100)]
This patch brings suspend/resume back to GTA01

"pdata" is NULL on GTA01 and you oops.
Revised patch, this time with if(..) instead of #ifdef

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>

9 years agoremove sysfs-links on remove
Tim Niemeyer [Fri, 27 Mar 2009 16:27:53 +0000 (17:27 +0100)]
remove sysfs-links on remove

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>

9 years agoAR6000: Corrected 'vendor/device IDs'.
Werner Almesberger [Tue, 31 Mar 2009 07:16:32 +0000 (04:16 -0300)]
AR6000: Corrected 'vendor/device IDs'.

IDs 0 and 1 are AR6002, not AR6001. This is based on a patch by
Ivan Petrov, but it differs in leaving the IDs in
include/linux/mmc/sdio_ids.h

Signed-off-by: Werner Almesberger <werner@openmoko.org>
Reported-by: Ivan Petrov <ivan_p@hotbox.ru>

9 years agoAR6000: revert MMC busy status check
Werner Almesberger [Tue, 31 Mar 2009 07:02:04 +0000 (04:02 -0300)]
AR6000: revert MMC busy status check

e2c0650efa751a6a2220618695fa41a2a5e7d23c introduced a platform-specific
hack to check if the MMC driver and hardware handle busy signaling from
the device properly.

Since this seems to be the case, we can revert this hack now.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoMinor AR6000 cleanup
Werner Almesberger [Tue, 31 Mar 2009 03:49:46 +0000 (00:49 -0300)]
Minor AR6000 cleanup

This patch cleans up a little after Ivan's netif_queue_stop fix.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoAR6000 netif_queue_stop non stop, Bug?
ivan_p@hotbox.ru [Thu, 26 Mar 2009 12:03:03 +0000 (15:03 +0300)]
AR6000 netif_queue_stop non stop, Bug?

This patch resolves the following issue:
http://lists.openmoko.org/pipermail/openmoko-kernel/2009-March/009643.html

Changed: prevent rescheduling network queue at interface opened/connected.
Removed: wake network queue at transmit complete.
Added: wake network queue at packet queue limit not reached.

Signed-off-by: Ivan Petrov <ivan_p@hotbox.ru>

9 years agoFix ar6000_do_activate return value
Werner Almesberger [Tue, 31 Mar 2009 00:06:02 +0000 (21:06 -0300)]
Fix ar6000_do_activate return value

... and check the return value in ar6000_activate.

[ Werner: changed ___FUNCTION__ to __func__ ]

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>
Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoFix cpu_is_s3c2442() returning false for an S3C2442B
Rask Ingemann Lambertsen [Mon, 30 Mar 2009 22:28:09 +0000 (00:28 +0200)]
Fix cpu_is_s3c2442() returning false for an S3C2442B

   An S3C2442B would be detected as S3C2440 by the cpu_is_s3cxxxx()
macros. This patch fixes it.

Signed-off-by: Rask Ingeman Lambertsen <rask@sygehus.dk>

9 years agoCodingStyle with copy-src also fixed
Werner Almesberger [Thu, 26 Mar 2009 07:56:25 +0000 (04:56 -0300)]
CodingStyle with copy-src also fixed

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>

9 years agoFix trivial whitespace slippage.
Werner Almesberger [Thu, 26 Mar 2009 07:52:29 +0000 (04:52 -0300)]
Fix trivial whitespace slippage.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoClean up pcf50606_client_dev_register
tim.niemeyer@mastersword.de [Tue, 24 Mar 2009 10:11:20 +0000 (11:11 +0100)]
Clean up pcf50606_client_dev_register

platform_device_add_data copies the data, so no need for
kmalloc.

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>

9 years agoretain gllin compatibility
tim.niemeyer@mastersword.de [Tue, 24 Mar 2009 10:11:21 +0000 (11:11 +0100)]
retain gllin compatibility

added bus link from neo1973-pm-gps.0 to gta01-pm-gps.0
added pwron attr wich is the same as power_on
also one typo fixed (3V instead of 3V3 in gps_power_3v_set)

[ Werner: Documentation/CodingStyle line 83, don't ignore the error if
  sysfs_create_group fails. ]

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>
Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoAdd forgotten PCF50606 Kconfig/Makefile entries
tim.niemeyer@mastersword.de [Tue, 24 Mar 2009 10:11:19 +0000 (11:11 +0100)]
Add forgotten PCF50606 Kconfig/Makefile entries

Watchdog and RTC entries were missing.

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>

9 years agoRemove double INPUT_PCF6333_PMU in Kconfig/Makefile
tim.niemeyer@mastersword.de [Tue, 24 Mar 2009 10:11:18 +0000 (11:11 +0100)]
Remove double INPUT_PCF6333_PMU in Kconfig/Makefile

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>

9 years agoReally clean up, as promised in 1350d5dfaac7dadf6cab9e812f0acfabcce60e58
Werner Almesberger [Thu, 26 Mar 2009 05:03:46 +0000 (02:03 -0300)]
Really clean up, as promised in 1350d5dfaac7dadf6cab9e812f0acfabcce60e58

Signed-off-by: Werner Almesberger <werner@openmoko.org>
Reported-by: Tim Niemeyer <tim.niemeyer@mastersword.de>

9 years agoChange disable serial driver for gta02 only
tim.niemeyer@mastersword.de [Sun, 22 Mar 2009 16:42:36 +0000 (17:42 +0100)]
Change disable serial driver for gta02 only

Change RTS and TXD pins on UART 0 to be inputs only on GTA02.
On GTA01 the UART 0 maybe used otherwise.

[ Werner: removed unexplained addition of DEBUG, Documentation/CodingStyle
  lines 105, 224, and 448. ]

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>
Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoextend work around boot-time ordering on GTA01
Tim Niemeyer [Thu, 26 Mar 2009 04:19:15 +0000 (01:19 -0300)]
extend work around boot-time ordering on GTA01

[ Werner: Documentation/CodingStyle lines 166 and 448, put blank line after
  local variables. ]

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>
Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agodisabling fast_charge is done with 0
tim.niemeyer@mastersword.de [Sun, 22 Mar 2009 16:42:34 +0000 (17:42 +0100)]
disabling fast_charge is done with 0

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>

9 years agolittle debug msg copied from gta02
tim.niemeyer@mastersword.de [Sun, 22 Mar 2009 16:42:33 +0000 (17:42 +0100)]
little debug msg copied from gta02

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>

9 years agoRemove debug-aux-key-probe-resume-death.patch
tim.niemeyer@mastersword.de [Sun, 22 Mar 2009 16:42:32 +0000 (17:42 +0100)]
Remove debug-aux-key-probe-resume-death.patch

Get resume by AUX to work.

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>

9 years agonew-style i2c driver doesn't work with inconsistent names.
tim.niemeyer@mastersword.de [Sun, 22 Mar 2009 16:42:30 +0000 (17:42 +0100)]
new-style i2c driver doesn't work with inconsistent names.

Signed-off-by: Tim Niemeyer <reddog@mastersword.de>

9 years agoGlamo fb: needs cfb_{fillrect,copyarea,imageblit} to link
Rask Ingemann Lambertsen [Thu, 19 Mar 2009 23:18:11 +0000 (00:18 +0100)]
Glamo fb: needs cfb_{fillrect,copyarea,imageblit} to link

   The kernel would fail to link because cfb_fillrect, cfb_copyarea and
cfb_imageblit weren't build. This patch fixes it.

Signed-off-by: Rask Ingemann Lambertsen <rask@sygehus.dk>

9 years agoZero packet length detection for RNDIS fix. Migrated from 2.6.24 series kernel
Aric D. Blumer [Mon, 16 Mar 2009 22:28:45 +0000 (16:28 -0600)]
Zero packet length detection for RNDIS fix. Migrated from 2.6.24 series kernel

This patch fixes the issues of RNDIS on the Openmoko Freerunner (and
subsequently Windows networking with the Freerunner). It arises from the
case where a stall is being issued by the upper level RNDIS driver to
the s3c2410_udc.c in the 2.6.28 series driver and it not being handled
correctly. This patch changes the RNDIS driver to send zero-length
packets instead of a stall, a condition that allowed the udc driver to
function correctly in 2.6.24 series kernels.

Further investigation into the udc driver is recommended. I am currently
looking into it to be able to use the Android ADB gadget driver, which
currently has stability issues using the underlying udc on both Linux
and Windows (although, it's possible that the Android ADB gadget has
problems).

Traces and logs of the USB traffic are available upon request. Thanks to
Aric at SDG Systems for all of his work on this matter.

Regards,
Brian Code

From de386af349bbfe1ad6d45c810185123975888d8d Mon Sep 17 00:00:00 2001
From: Aric D. Blumer <aric@sdgsystems.com>
Date: Mon, 16 Mar 2009 16:04:02 -0600
Subject: [PATCH] Zero packet length detection for RNDIS fix. Migrated from 2.6.24 series kernel

Signed-off-by: Aric D. Blumer <aric@sdgsystems.com>
Signed-off-by: Brian Code <Brian.Code@koolu.com>

9 years agoForced shutdown for GTA02
Ondrej Zary [Sun, 22 Mar 2009 18:42:02 +0000 (14:42 -0400)]
Forced shutdown for GTA02

Hello,
this patch adds "force-shutdown" feature for GTA02. When the power button is
held pressed for 8 seconds, the power is turned off. No need to remove the
battery anymore. Patch is against andy-tracking.

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@gmail.com>

9 years agoS3C64XX: Add gpio_to_irq method for external interrupt group.
Matt Hsu [Thu, 12 Mar 2009 14:38:25 +0000 (22:38 +0800)]
S3C64XX: Add gpio_to_irq method for external interrupt group.

Add to_irq method to convert gpio to irq
for external interrupt group (GPN).

Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>

9 years agoFewer HDQ errors on 3D7K
Werner Almesberger [Wed, 11 Mar 2009 15:23:40 +0000 (12:23 -0300)]
Fewer HDQ errors on 3D7K

If no battery is connected, we periodically get a burst of HDQ error
messages (at least on 3D7K), interrupting whatever we're doing on
the console.

This patch reduces this to only one message per sequence of errors,
and one more message if communication with HDQ is successful later.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoAdd proper audio route for headphone speaker in 3d7k. andy-latest
Matt Hsu [Wed, 11 Mar 2009 11:25:26 +0000 (11:25 +0000)]
Add proper audio route for headphone speaker in 3d7k.

The power mode of ROUT1 is always off which results
in the voice only comes from left channel (LOUT1).
This issues is fixed by adding dapm control for ROU1 channel.

Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>
Reported-by: Candy Chou <candy_chou@openmoko.com>

9 years agoEnable camera interface clock
Werner Almesberger [Wed, 11 Mar 2009 11:25:23 +0000 (11:25 +0000)]
Enable camera interface clock

This patch explicitly enabled to "camif" clock, to make the driver
work again with Qi commit a24b5fcf84d2cf633a3f660edd23fa4c2a3da231.

Note that this is not fully tested since the Qi change also broke
the LCM driver.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoAdd real CAMIF clock to S3C6410
Werner Almesberger [Wed, 11 Mar 2009 11:25:20 +0000 (11:25 +0000)]
Add real CAMIF clock to S3C6410

This patch adds the real "camif" clock (off HCLK.)

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoRename CAMERA clock
Werner Almesberger [Wed, 11 Mar 2009 11:25:17 +0000 (11:25 +0000)]
Rename CAMERA clock

Identifiers related to the "camera" clock were mis-named as camif.
This patch renames them.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agofix-hdq-suspend-level.patch
Andy Green [Wed, 11 Mar 2009 11:25:15 +0000 (11:25 +0000)]
fix-hdq-suspend-level.patch

Signed-off-by: Andy Green <andy@openmoko.com>

9 years agoadd primitive camera power control
Werner Almesberger [Tue, 10 Mar 2009 14:02:28 +0000 (14:02 +0000)]
add primitive camera power control

This dirty hack adds camera activation/deactivation on open/close.
This code will have to move to a machine/platform area later. The
general driver is the wrong place for it.

It also removes the unconditional activation and moves the domain
setting to the rest of the power control code. (Thanks, Andy !)

Note that opening the camera now always takes about 20 seconds
until the settings are downloaded, not just on the first open.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoAdd filter_chain object
Nelson Castillo [Tue, 10 Mar 2009 12:04:40 +0000 (12:04 +0000)]
Add filter_chain object

Filter chains should be completely opaque to the drivers that use it.
We fix this with this patch.

~ Make the "filter chain" a new object.
~ We can build with CONFIG_TOUCHSCREEN_FILTER=n with no problems in
  a cleaner way.
~ Update s3c2410_ts.c to use the filter_chain object.
~ Cleanups.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>

9 years agoExport symbols and make a few symbols constant.
Nelson Castillo [Tue, 10 Mar 2009 12:04:26 +0000 (12:04 +0000)]
Export symbols and make a few symbols constant.

~ Make a few symbols constant.
~ Export symbols explicitly.
~ Move ts_filter.c to ts_filter_chain.c (this will make sense later).

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>

9 years agoUse non-void configurations
Nelson Castillo [Tue, 10 Mar 2009 12:04:16 +0000 (12:04 +0000)]
Use non-void configurations

This patch defines a ts_filter_configuration structure to
avoid using void* in the filter initialization, fixing another
upstream correction. This also makes the initialization more readable.

Tested in GTA02/rev6.

Other changes:

 ~ Comment filter configuration structures.
 ~ ts_filter.c:ts_filter_chain_create improved.
 ~ Small cleanups.
 ~ More TODOs/FIXMEs.
 ~ Updated GTA02 filter configuration.
 ~ Updated GTA01 filter configuration.
 ~ Updated mach-s3c2410/include/mach/ts.h for the new ts. configuration
   structure.
 ~ Updated all the filters to use the new configuration structure.
 ~ Removed MAX_TS_FILTER_CHAIN constant that is no longer needed.

No more evil casts left it seems.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>

9 years agoImprove filter API and update filters
Nelson Castillo [Tue, 10 Mar 2009 12:04:05 +0000 (12:04 +0000)]
Improve filter API and update filters

This patch turns upstream feedback into API modifications and code
improvements. There will be more patches implementing upstream
corrections but this one is the that will make most of the invasive
changes and make the most important improvements to the API.

Tested in a GTA02/rev06.

The goals of this patch are:

* Replace recursive calls with iteration.
* General code improvements.
* Make ts_filter_mean.c a reference for the rest of the filters.
* Make the (almost)minimum number of changes to the other filters so
  that they compile and work, patches for cleaning these up will
  come next.
* Filters should do what they were doing before.

Some important changes:

* Move "struct ts_filter tsf" in the private structures to force
  a crash (or break things) if we forget to remove an open-coded cast.
* ts_filter.c/ts_filter.h
    ~ API modifications.
* s3c2410_ts.c:
    ~ Use the new API.
    ~ Cleanups.
* ts_filter_mean.c
    ~ Replace with a simple mean.
    ~ Use as a reference for the new API.
    ~ Move private structure from the .h to the .c.
* ts_filter_group.c
    ~ Update to use the new API.
* ts_filter_median.c
    ~ Update to use the new API.
* ts_filter_linear.c
    ~ Remove functions that are no longer needed.

Note:

I might leave some TODOs and FIXMEs with this patch. Most of them
will be removed shortly.

Signed-off-by: Nelson Castillo <arhuaco@freaks-unidos.net>

9 years agoconfig-om3d7k-ohci.patch
Andy Green [Tue, 10 Mar 2009 12:03:50 +0000 (12:03 +0000)]
config-om3d7k-ohci.patch

Signed-off-by: Andy Green <andy@openmoko.com>

9 years agoconfig-om3d7k-cpufreq.patch
Andy Green [Tue, 10 Mar 2009 12:03:37 +0000 (12:03 +0000)]
config-om3d7k-cpufreq.patch

Signed-off-by: Andy Green <andy@openmoko.com>

9 years agofix-3d7k-camif-disable-config.patch
Andy Green [Tue, 10 Mar 2009 09:59:22 +0000 (09:59 +0000)]
fix-3d7k-camif-disable-config.patch

This lets us turn off CONFIG_S3C_DEV_CAMIF and suppress it
turning on power (still seemed to issue clock though).

Signed-off-by: Andy Green <andy@openmoko.com>

9 years agoMERGE-andy-tracking-patchset-edits
merge [Tue, 10 Mar 2009 08:10:41 +0000 (08:10 +0000)]
MERGE-andy-tracking-patchset-edits

9 years agoFix the start condition of comparing setup mode in lp5521 device.
Matt Hsu [Tue, 10 Mar 2009 08:10:07 +0000 (08:10 +0000)]
Fix the start condition of comparing setup mode in lp5521 device.

Signed-off-by: Matt Hsu <matt_hsu@openmoko.org>

9 years agoClean up camera driver
Werner Almesberger [Mon, 9 Mar 2009 21:17:46 +0000 (21:17 +0000)]
Clean up camera driver

This patch does some light cleanup on the camera driver:

- removed unused return values or unused initializations
- remove backslashes at regular line ends (Python-style ?)
- removed redundant casts
- remove redundant parentheses
- wrapped long lines
- general whitespace cleanup
- fixed broken logic in s3c_camif_v4l2_g_input and s3c_camif_v4l2_g_output
- let mutex that really really wants to be a semaphore have its way

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoconfig-gta02-usb-host.patch
Andy Green [Mon, 9 Mar 2009 21:03:02 +0000 (21:03 +0000)]
config-gta02-usb-host.patch

Signed-off-by: Andy Green <andy@openmoko.com>

9 years agoAdjust MCLK for use with PLL
Werner Almesberger [Mon, 9 Mar 2009 21:02:36 +0000 (21:02 +0000)]
Adjust MCLK for use with PLL

The PLL converts a 26.6 MHz input clock to 87.8 MHz, which is later
divided by two and becomes PCLK. (See comments below for details.)

All this looks like a textbook example for platform stuff, but let's
take it one step a time.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoFix clock shift in s3c64xx_setrate_clksrc
Werner Almesberger [Mon, 9 Mar 2009 21:02:33 +0000 (21:02 +0000)]
Fix clock shift in s3c64xx_setrate_clksrc

s3c64xx_setrate_clksrc used the clock selection shift sclk->shift instead
of the divider shift sclk->divider_shift, causing clocks to be clobbered.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoFix division in s3c64xx_roundrate_clksrc
Werner Almesberger [Mon, 9 Mar 2009 21:02:30 +0000 (21:02 +0000)]
Fix division in s3c64xx_roundrate_clksrc

s3c64xx_roundrate_clksrc got the rate vs. parent order wrong.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoAdd CAMIF clock to S3C6410
Werner Almesberger [Mon, 9 Mar 2009 21:02:27 +0000 (21:02 +0000)]
Add CAMIF clock to S3C6410

[ Resending it. Seems that commit 9e723603e46500e2c9fbf09ac823de210bf05d31
  used one of the empty mails I got with formail :-( ]

Add camera interface clock to S3C6410.

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoClean up camera sensor driver
Werner Almesberger [Mon, 9 Mar 2009 21:02:24 +0000 (21:02 +0000)]
Clean up camera sensor driver

This patch does some light cleanup on the S5K4BA driver:

- change structure initializers from  field:  to  .field =  syntax
- exlicitly name fields in structure initializers
- added proper error handling to sensor_read
- use ARRAY_SIZE
- remove redundant parentheses and braces
- change // to /* ... */
- remove non-ASCII characters
- general whitespace cleanup
- removed an unused variable warning

(4xa_sensor.h is only partially cleaned up.)

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoClean up camera interface driver
Werner Almesberger [Mon, 9 Mar 2009 21:02:21 +0000 (21:02 +0000)]
Clean up camera interface driver

This patch does some cleanup on the camera interface driver:

- remove backslashes at regular line ends (Python-style ?)
- removed unused return values or unused initializations
- combined duplicated or otherwise highly redundant code
- remove redundant parentheses
- wrapped long lines
- general whitespace cleanup
- s3c_camif_input_msdma_codec, s3c_camif_input_msdma_preview,
  s3c_camif_set_target_format: fixed clearing of old register values

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agoClean up camera driver
Werner Almesberger [Mon, 9 Mar 2009 21:02:19 +0000 (21:02 +0000)]
Clean up camera driver

This patch does some light cleanup on the camera driver:

- removed unused return values or unused initializations
- remove backslashes at regular line ends (Python-style ?)
- removed redundant casts
- remove redundant parentheses
- wrapped long lines
- general whitespace cleanup
- fixed broken logic in s3c_camif_v4l2_g_input and s3c_camif_v4l2_g_output
- let mutex that really really wants to be a semaphore have its way

Signed-off-by: Werner Almesberger <werner@openmoko.org>

9 years agofix-s3c-cpu-detect-make-compatible-atag16.patch
Andy Green [Mon, 9 Mar 2009 21:02:16 +0000 (21:02 +0000)]
fix-s3c-cpu-detect-make-compatible-atag16.patch

The current version of CPU detection patch from Mark Brown and
Kyungmin Park takes a dump on system_rev.  This patch changes it
to retain the low 16 of system_rev from the bootloader ATAG, and
adds access #defines and changes to use them.

No doubt they'll issue a better version of the CPU detection
patch and then this can be reverted.

Signed-off-by: Andy Green <andy@openmoko.com>

9 years agoS3C64XX: Add DVFS support to the S3C64XX cpufreq driver
Mark Brown [Mon, 9 Mar 2009 21:02:13 +0000 (21:02 +0000)]
S3C64XX: Add DVFS support to the S3C64XX cpufreq driver

Use the regulator framework to provide optional support for DVFS in
the S3C64XX cpufreq driver. When a software controllable regulator
is configured the driver will use it to lower the supply voltage when
running at a lower frequency, giving improved power saving.

When regulator support is disabled or no regulator can be obtained
for VDDARM the driver will fall back to scaling only the frequency.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

9 years agoS3C64XX: Initial support for CPU frequency scaling
Mark Brown [Mon, 9 Mar 2009 21:02:09 +0000 (21:02 +0000)]
S3C64XX: Initial support for CPU frequency scaling

This patch provides initial support for CPU frequency scaling on the
Samsung S3C64XX series processors. Currently only S3C6410 processors
are supported, though addition of another data table with supported
clock rates should be sufficient to enable support for further CPUs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>