pandora-kernel.git
15 years agoremove NAND driver to apply mainline version
Grazvydas Ignotas [Sat, 1 May 2010 20:01:48 +0000 (23:01 +0300)]
remove NAND driver to apply mainline version

15 years agoMerge branch 'master' of git://git.infradead.org/users/dedekind/ubifs-v2.6.27 into...
Grazvydas Ignotas [Sat, 1 May 2010 16:00:58 +0000 (19:00 +0300)]
Merge branch 'master' of git://git.infradead.org/users/dedekind/ubifs-v2.6.27 into pandora-27-omap1

15 years agoinput: rename pwrbutton and touchscreen
Grazvydas Ignotas [Mon, 26 Apr 2010 20:46:51 +0000 (23:46 +0300)]
input: rename pwrbutton and touchscreen

15 years agopandora: enable supplies on boot
Grazvydas Ignotas [Mon, 26 Apr 2010 12:29:34 +0000 (15:29 +0300)]
pandora: enable supplies on boot

We don't want to rely on bootloader for this, this would be unneeded
dependency.

15 years agoOMAP3 clock: lessen amount of noisy messages
Artem Bityutskiy [Tue, 12 May 2009 23:34:40 +0000 (17:34 -0600)]
OMAP3 clock: lessen amount of noisy messages

On our system we see the following messages:

Disabling unused clock "gpt2_ick"
Disabling unused clock "gpt3_ick"
Disabling unused clock "gpt4_ick"
Disabling unused clock "gpt5_ick"
...

The messages have KERN_INFO level and if you have serial
console, they normally go there. I do not think it is good
idea to print that much stuff there. Moreover, messages
are not properly prefixed and for mortals it is not
immeadietly clear where they come from.

Let's give them debugging level instead.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
[paul@pwsan.com: trimmed debugging output in patch description]

15 years agoinput: twl4030keypad: use generic name
Grazvydas Ignotas [Mon, 26 Apr 2010 11:53:53 +0000 (14:53 +0300)]
input: twl4030keypad: use generic name

15 years agoinput: vsense: mbuttons functionality, more /proc control, refactoring
Grazvydas Ignotas [Mon, 26 Apr 2010 11:24:21 +0000 (14:24 +0300)]
input: vsense: mbuttons functionality, more /proc control, refactoring

15 years agoupdate defconfig
Grazvydas Ignotas [Tue, 20 Apr 2010 15:16:56 +0000 (18:16 +0300)]
update defconfig

this defconfig is used for test kernels

15 years agoDSS2: update gamma for TD043MTEA1 panel
Grazvydas Ignotas [Tue, 20 Apr 2010 15:14:01 +0000 (18:14 +0300)]
DSS2: update gamma for TD043MTEA1 panel

15 years agopandora: platform data for wl1251
Grazvydas Ignotas [Tue, 20 Apr 2010 13:25:51 +0000 (16:25 +0300)]
pandora: platform data for wl1251

15 years agoAdd a very basic platform driver module to bring up the SDIO WiFi so that the platfor...
David-John Willis [Sun, 30 Aug 2009 18:31:31 +0000 (19:31 +0100)]
Add a very basic platform driver module to bring up the SDIO WiFi so that the platform stuff is no longer hacked into the WL1251 driver (TODO: Clean up and move somewhere more mainline friendly).

15 years agoSDIO patches to put some card into into platform devices (hack) to match WL1251 driver.
David-John Willis [Mon, 22 Jun 2009 19:49:31 +0000 (20:49 +0100)]
SDIO patches to put some card into into platform devices (hack) to match WL1251 driver.

15 years agousb otg: remove PM dependency
Grazvydas Ignotas [Thu, 8 Apr 2010 21:58:25 +0000 (00:58 +0300)]
usb otg: remove PM dependency

It can function fine without it.

15 years agoASoC: don't allow refcount to go below 0
Grazvydas Ignotas [Mon, 15 Mar 2010 19:28:25 +0000 (21:28 +0200)]
ASoC: don't allow refcount to go below 0

On certain underrun contitions we get exess stop triggers, which
were messing up state and causing new start triggers to be ignored.

15 years agoASoC: OMAP: Set minimum buffer size constraint for McBSP2 in OMAP3
Jarkko Nikula [Fri, 27 Mar 2009 13:32:01 +0000 (15:32 +0200)]
ASoC: OMAP: Set minimum buffer size constraint for McBSP2 in OMAP3

McBSP2 in OMAP3 has 1 ksample (1k x 32 bit) internal FIFO. During
initial playback startup, this FIFO is keeping the DMA request active
until the FIFO is full.

So now if ALSA buffer size is smaller, DMA is looping around it while
filling up the HW FIFO, generating burst of interrupts as well and SW
doesn't have any change to fill enough data.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agoOMAP: Make sgx_fck programmable with clk_set_rate()
Grazvydas Ignotas [Sun, 28 Feb 2010 23:32:52 +0000 (01:32 +0200)]
OMAP: Make sgx_fck programmable with clk_set_rate()

The 3.01.00.02 SGX/PVR driver wants it to be configurable,
or else just fails.

15 years agoOMAP3 clock: use pr_debug() rather than pr_info() in some clock change code
Paul Walmsley [Tue, 12 May 2009 23:27:10 +0000 (17:27 -0600)]
OMAP3 clock: use pr_debug() rather than pr_info() in some clock change code

The CORE DPLL M2 frequency change code should use pr_debug(), not
pr_info(), for its debug messages.  Same with
omap2_clksel_round_rate_div().  While here, convert a few printk(KERN_ERR ..
into pr_err().

Signed-off-by: Paul Walmsley <paul@pwsan.com>
15 years agopandora input: change key mappings again, on ED's request
Grazvydas Ignotas [Sat, 27 Feb 2010 20:39:53 +0000 (22:39 +0200)]
pandora input: change key mappings again, on ED's request

When will this end? :(

15 years agopower_supply_sysfs: Handle -ENODATA in a special way
Anton Vorontsov [Wed, 2 Dec 2009 21:24:51 +0000 (00:24 +0300)]
power_supply_sysfs: Handle -ENODATA in a special way

There are cases when some device can not report any meaningful value,
e.g. TWL4030 charger can report voltage only when charging is
active.

In these cases drivers will return -ENODATA, and we shouldn't flood
kernel log with error messages.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
15 years agopower_supply: bq27x00: fix voltage and current units
Grazvydas Ignotas [Sat, 27 Feb 2010 14:15:40 +0000 (16:15 +0200)]
power_supply: bq27x00: fix voltage and current units

The chip returns voltage and current in mV and mA, but
power supply class uses uV and uA, so add missing conversion.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
15 years agopower_supply: bq27x00: add status and time properties
Grazvydas Ignotas [Sat, 27 Feb 2010 13:54:49 +0000 (15:54 +0200)]
power_supply: bq27x00: add status and time properties

The BQ27x00 series of chips can report time-to-empty and
time-to-full, so let's add corresponding properties.
Also report charge status based on status flag register.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
15 years agopandora input: allow changing game button keycodes
Grazvydas Ignotas [Thu, 25 Feb 2010 20:52:24 +0000 (22:52 +0200)]
pandora input: allow changing game button keycodes

Do this to allow toggling between keyboard-like and gamepad
keycodes as doing both simultaneouly confuses some programs.

15 years agogpio_keys: add ability to reserve keys
Grazvydas Ignotas [Thu, 25 Feb 2010 20:48:27 +0000 (22:48 +0200)]
gpio_keys: add ability to reserve keys

Allow reserving additional keys in case we want to change
some keycodes during runtime.

15 years agoomap_hsmmc: enable verbose errors
Grazvydas Ignotas [Wed, 17 Feb 2010 16:08:44 +0000 (18:08 +0200)]
omap_hsmmc: enable verbose errors

15 years agoomap_hsmmc: backport error handling fixes from mainline
Grazvydas Ignotas [Wed, 17 Feb 2010 15:59:01 +0000 (17:59 +0200)]
omap_hsmmc: backport error handling fixes from mainline

15 years agoASoC: Fix handling of DAPM suspend work
Mark Brown [Tue, 14 Oct 2008 12:58:36 +0000 (13:58 +0100)]
ASoC: Fix handling of DAPM suspend work

Since we can query the playback stream power state directly we do not
need to infer if it is powered up from the timer being scheduled.  Doing
this avoids problems that previously existed with streams being
incorrectly determined to be powered up caused when the timer is
scheduled when streams are closed after being partially set up.

Reported-by: Nobin Mathew <nobin.mathew@gmail.com>
Reported-by: Jukka Hynninen <ext-jukka.hynninen@vaisala.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
15 years agohook the bq27500 fuel gauge
Grazvydas Ignotas [Sat, 13 Feb 2010 16:36:49 +0000 (18:36 +0200)]
hook the bq27500 fuel gauge

15 years agopower_supply: bq27x00: add BQ27500 support
Grazvydas Ignotas [Fri, 12 Feb 2010 20:47:18 +0000 (22:47 +0200)]
power_supply: bq27x00: add BQ27500 support

BQ27500 is newer fuel gauge chip from TI with slightly changed
register layout and some different register semantics. Add new i2c
ID for it and handle differences where needed. Also rename bq27200
functions to bq27x00, as they are no longer bq27200 specific.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
15 years agopower_supply: bq27x00: fix temperature conversion
Grazvydas Ignotas [Fri, 12 Feb 2010 20:00:20 +0000 (22:00 +0200)]
power_supply: bq27x00: fix temperature conversion

The power supply class requires tenths of degree Celsius.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
15 years agopower_supply: bq27x00: remove unused struct fields
Grazvydas Ignotas [Fri, 12 Feb 2010 21:31:41 +0000 (23:31 +0200)]
power_supply: bq27x00: remove unused struct fields

These are probably leftover from old TI code.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
15 years agopower_supply: bq27x00: remove double endian swap
Grazvydas Ignotas [Fri, 12 Feb 2010 16:27:44 +0000 (18:27 +0200)]
power_supply: bq27x00: remove double endian swap

The bq27x00 registers are little endian, so just read them as such
and don't do double endian swap on LE machines.

This also gets rid of strange looking shift that was done after
reading 8bit register because endian swap in bq27x00_read() was
messing it up.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
15 years agotrivial: Fix misspelling of "Celsius".
Adam Buchbinder [Fri, 13 Mar 2009 16:15:26 +0000 (12:15 -0400)]
trivial: Fix misspelling of "Celsius".

A few comments say "Celcius"; this fixes them. No code changes.

Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
15 years agobq27x00_battery: use unaligned access helper
Harvey Harrison [Mon, 22 Sep 2008 21:53:50 +0000 (14:53 -0700)]
bq27x00_battery: use unaligned access helper

Remove hand-rolled get_unaligned_be16, this points to a possible bug as
bq27x00_read does another endian byteswap which sparse notices:

drivers/power/bq27x00_battery.c:81:14: warning: cast to restricted __be16
Which should probably be checked.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
15 years agopower_supply: Support for Texas Instruments BQ27200 battery managers
Rodolfo Giometti [Wed, 20 Aug 2008 23:52:58 +0000 (16:52 -0700)]
power_supply: Support for Texas Instruments BQ27200 battery managers

These battery managers came in two different packages: one for I2C
busses (BQ27200) and one for HDQ busses (BQ27000).

This driver currently supports only the I2C chip version but the code
is designed in order to easily allow the HDQ chip version integration.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: make things static, use kasprintf()]
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
15 years agoremoving old bq27x00 to apply mainline version
Grazvydas Ignotas [Fri, 12 Feb 2010 16:21:45 +0000 (18:21 +0200)]
removing old bq27x00 to apply mainline version

15 years agoinput: use lower keycodes for Fn-N and Fn-M
Grazvydas Ignotas [Mon, 1 Feb 2010 13:05:50 +0000 (15:05 +0200)]
input: use lower keycodes for Fn-N and Fn-M

this is done so that they could be used with standard loadkeys(1).

15 years agommc: add some NULL pointer checks
Grazvydas Ignotas [Sun, 31 Jan 2010 22:25:11 +0000 (00:25 +0200)]
mmc: add some NULL pointer checks

I've seen some crashes there on one of the boards.

15 years agoMerge branch 'keypad_test' into pandora-27-omap1
Grazvydas Ignotas [Sun, 31 Jan 2010 15:52:04 +0000 (17:52 +0200)]
Merge branch 'keypad_test' into pandora-27-omap1

15 years agoinput: vsense: un-invert Y axis
Grazvydas Ignotas [Sun, 31 Jan 2010 14:32:46 +0000 (16:32 +0200)]
input: vsense: un-invert Y axis

This makes it more like a typical controller.

15 years agoinput: change L and R keycodes
Grazvydas Ignotas [Sun, 31 Jan 2010 14:30:47 +0000 (16:30 +0200)]
input: change L and R keycodes

Use KEY_KP* (similar to ABXY) to get them picked up by X and SDL.

15 years agoinput: different joydev hack to get game buttons as joystick
Grazvydas Ignotas [Sat, 30 Jan 2010 23:17:25 +0000 (01:17 +0200)]
input: different joydev hack to get game buttons as joystick

Some nasty stuff, but we need that functionality.

15 years agoRevert "input: hack: get gpio-keys registered with joydev"
Grazvydas Ignotas [Sat, 30 Jan 2010 19:55:25 +0000 (21:55 +0200)]
Revert "input: hack: get gpio-keys registered with joydev"

This reverts commit d291e9666af54124aec15227c93710572962ef0b.

hacking gpio-keys was a bad idea, it confuses various things like
xf86-input-evdev, so different approach is needed.

15 years agoUBI: flush wl before clearing update marker
Sebastian Andrzej Siewior [Sun, 29 Nov 2009 18:46:02 +0000 (19:46 +0100)]
UBI: flush wl before clearing update marker

ubiupdatevol -t does the following:
- ubi_start_update()
  - set_update_marker()
  - for all LEBs ubi_eba_unmap_leb()
  - clear_update_marker()
  - ubi_wl_flush()

ubi_wl_flush() physically erases all PEB, once it returns all PEBs are
empty. clear_update_marker() has the update marker written after return.
If there is a power cut between the last two functions then the UBI
volume has no longer the "update" marker set and may have some valid
LEBs while some of them may be gone.
If that volume in question happens to be a UBIFS volume, then mount
will fail with

|UBIFS error (pid 1361): ubifs_read_node: bad node type (255 but expected 6)
|UBIFS error (pid 1361): ubifs_read_node: bad node at LEB 0:0
|Not a node, first 24 bytes:
|00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

if there is at least one valid LEB and the wear-leveling worker managed
to clear LEB 0.

The patch waits for the wl worker to finish prior clearing the "update"
marker on flash. The two new LEB which are scheduled for erasing after
clear_update_marker() should not matter because they are only visible to
UBI.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: stable@kernel.org
Cc: linux-kernel@vger.kernel.org
15 years agoupdate defconfig
Grazvydas Ignotas [Tue, 1 Dec 2009 09:36:43 +0000 (11:36 +0200)]
update defconfig

15 years agoadd TWL4030 PWM LED support
Grazvydas Ignotas [Mon, 30 Nov 2009 14:03:39 +0000 (16:03 +0200)]
add TWL4030 PWM LED support

15 years agoleds: simple driver for pwm driven LEDs
Luotao Fu [Wed, 11 Feb 2009 21:24:40 +0000 (13:24 -0800)]
leds: simple driver for pwm driven LEDs

Add a simple driver for pwm driver LEDs.  pwm_id and period can be defined
in board file.  It is developed for pxa, however it is probably generic
enough to be used on other platforms with pwm.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoUBIFS: add forgotten timer arming
Artem Bityutskiy [Fri, 27 Nov 2009 14:15:26 +0000 (16:15 +0200)]
UBIFS: add forgotten timer arming

I screwed this up when back-porting patches to the ancient kernel,
sorry.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agojoydev: update button hack for game button change
Grazvydas Ignotas [Wed, 25 Nov 2009 21:32:46 +0000 (23:32 +0200)]
joydev: update button hack for game button change

Also changes order so that game buttons go first.

15 years agoinput: change game button scancodes to KEY_KPx
Grazvydas Ignotas [Wed, 25 Nov 2009 21:28:41 +0000 (23:28 +0200)]
input: change game button scancodes to KEY_KPx

Craig et al. decided to drop SNES layout, using independend
keycodes instead.

15 years agoset up charger LED trigger
Grazvydas Ignotas [Tue, 24 Nov 2009 15:06:05 +0000 (17:06 +0200)]
set up charger LED trigger

15 years agoBCI: don't set OTG_EN
Grazvydas Ignotas [Tue, 24 Nov 2009 13:47:30 +0000 (15:47 +0200)]
BCI: don't set OTG_EN

This was already done by caller - USB code. Also avoids setting up
clock for i2c needlessly.

15 years agoBCI: USB charging fixes, charge current setup for AC/USB
Grazvydas Ignotas [Tue, 24 Nov 2009 13:34:00 +0000 (15:34 +0200)]
BCI: USB charging fixes, charge current setup for AC/USB

15 years agoLED: make triggers track their state
Grazvydas Ignotas [Tue, 24 Nov 2009 12:24:45 +0000 (14:24 +0200)]
LED: make triggers track their state

Sometimes events trigger before LEDs are registered, but simple
triggers don't track their state and LED starts as if nothing
happened.

Add some state tracking to simple triggers.

15 years agomusb: hack to get host device hotplug working
Grazvydas Ignotas [Tue, 24 Nov 2009 12:21:05 +0000 (14:21 +0200)]
musb: hack to get host device hotplug working

It is now possible to hotplug USB devices on OTG port. Still
sometimes several replugs are needed though (due to bugs).

15 years agotwl4030-usb: changes for VBUS/ID detection on OTG port
Grazvydas Ignotas [Tue, 24 Nov 2009 12:18:20 +0000 (14:18 +0200)]
twl4030-usb: changes for VBUS/ID detection on OTG port

Some hackish code involving VUSB3V1 regulator power source
switching to get VBUS/ID detection working better.

15 years agotwl4030-usb: remove unneeded code
Grazvydas Ignotas [Sun, 22 Nov 2009 22:12:53 +0000 (00:12 +0200)]
twl4030-usb: remove unneeded code

This code was removed from later versions of the driver
(part of it is leftover from OMAP1, part is non-functional
because i2c access is disabled when it's called).

15 years agousb: musb: remove dead code from procfs
Felipe Balbi [Thu, 11 Sep 2008 08:53:25 +0000 (11:53 +0300)]
usb: musb: remove dead code from procfs

When removing the procfs file, I forgot to remove some
code that created and removed that file. Here's a patch
to fix it. Ideally this patch will be melded into the patch
removing the procfs file, don't know if it's possible still.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
15 years agoBCI: fix current calculation and CGAIN bit set procedure
Grazvydas Ignotas [Fri, 20 Nov 2009 10:18:57 +0000 (12:18 +0200)]
BCI: fix current calculation and CGAIN bit set procedure

Use TI formula for current calculation and a bit cleaner
way to set CGAIN bit.

15 years agovsense: change reset handling
Grazvydas Ignotas [Fri, 20 Nov 2009 10:10:50 +0000 (12:10 +0200)]
vsense: change reset handling

Leave reset on first use and stay that way - the nub
firmware has power management of it's own (powers itself down
when not in use).

15 years agoASoC: change powerdown default to 1 minute
Grazvydas Ignotas [Thu, 19 Nov 2009 12:40:37 +0000 (14:40 +0200)]
ASoC: change powerdown default to 1 minute

15 years agosome hackish Fn handling for testing
Grazvydas Ignotas [Thu, 5 Nov 2009 10:52:23 +0000 (12:52 +0200)]
some hackish Fn handling for testing

15 years agoinput: hacks+updates for mainline twl4030 driver
Grazvydas Ignotas [Thu, 5 Nov 2009 10:44:01 +0000 (12:44 +0200)]
input: hacks+updates for mainline twl4030 driver

This includes some differing #includes and col/row swap
in the KEY() macro.

15 years agoInput: add twl4030_keypad driver
David Brownell [Tue, 3 Nov 2009 13:53:51 +0000 (15:53 +0200)]
Input: add twl4030_keypad driver

Add a driver for the keypad controller on TWL4030 family chips.
These support up to an 8x8 key matrix.  The TWL4030 multifunction
chips are mostly used on OMAP3 (or OMAP 2430) based boards.

[dtor@mail.ru: switch to matrix-keypad framework, fix changing
keymap from userspace]
Reviewed-by: Trilok Soni <soni.trilok@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Conflicts:

drivers/input/keyboard/Kconfig
drivers/input/keyboard/Makefile

15 years agoInput: matrix-keypad - add function to build device keymap
Dmitry Torokhov [Tue, 3 Nov 2009 13:49:37 +0000 (15:49 +0200)]
Input: matrix-keypad - add function to build device keymap

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
(cherry picked from commit 77a53fd21870c726b670c0d8179294ac1ea33468)

Conflicts:

drivers/input/keyboard/w90p910_keypad.c

15 years agoInput: matrix_keypad - make matrix keymap size dynamic
Eric Miao [Wed, 5 Aug 2009 08:24:41 +0000 (01:24 -0700)]
Input: matrix_keypad - make matrix keymap size dynamic

Remove assumption on the shift and size of rows/columns form
matrix_keypad driver.

Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
(cherry picked from commit d82f1c35348cebe2fb2d4a4d31ce0ab0769e3d93)

15 years agoInput: add support for generic GPIO-based matrix keypad
Eric Miao [Tue, 3 Nov 2009 13:43:49 +0000 (15:43 +0200)]
Input: add support for generic GPIO-based matrix keypad

Original patch by Marek Vasut, modified by Eric in:

1. use delayed work to simplify the debouncing
2. combine col_polarity/row_polarity into a single active_low field
3. use a generic bit array based XOR algorithm to detect key
   press/release, which should make the column assertion time
   shorter and code a bit cleaner
4. remove the ALT_FN handling, which is no way generic, the ALT_FN
   key should be treated as no different from other keys, and
   translation will be done by user space by commands like 'loadkeys'.
5. explicitly disable row IRQs and flush potential pending work,
   and schedule an immediate scan after resuming as suggested
   by Uli Luckas
6. incorporate review comments from many others

Patch tested on Littleton/PXA310 (though PXA310 has a dedicate keypad
controller, I have to configure those pins as generic GPIO to use this
driver, works quite well, though), and Sharp Zaurus model SL-C7x0
and SL-C1000.

[dtor@mail.ru: fix error unwinding path, support changing keymap
 from userspace]
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Reviewed-by: Trilok Soni <soni.trilok@gmail.com>
Reviewed-by: Uli Luckas <u.luckas@road.de>
Reviewed-by: Russell King <linux@arm.linux.org.uk>
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Conflicts:

drivers/input/keyboard/Kconfig
drivers/input/keyboard/Makefile

15 years agoinput: remove old twl4030keypad to replace it with mainline version
Grazvydas Ignotas [Tue, 3 Nov 2009 13:15:00 +0000 (15:15 +0200)]
input: remove old twl4030keypad to replace it with mainline version

15 years agovsense: use shorter data transfers
Grazvydas Ignotas [Wed, 28 Oct 2009 14:31:16 +0000 (16:31 +0200)]
vsense: use shorter data transfers

The nub controller supports terminating transfer early,
so read only data we need for quicker transfers.

15 years agodrop i2c bus speed to 100kHz so that bq27500 works reliably
Grazvydas Ignotas [Wed, 28 Oct 2009 14:29:07 +0000 (16:29 +0200)]
drop i2c bus speed to 100kHz so that bq27500 works reliably

15 years agobci_battery: avoid clearing unrelated REG_GPBR1 bits
Grazvydas Ignotas [Tue, 20 Oct 2009 13:19:40 +0000 (16:19 +0300)]
bci_battery: avoid clearing unrelated REG_GPBR1 bits

15 years agobacklight: fix register writes
Grazvydas Ignotas [Tue, 20 Oct 2009 13:12:52 +0000 (16:12 +0300)]
backlight: fix register writes

Use read-modify-write procedure to avoid trashing other bits.
Also use some delays to avoid hiting 1-wire mode in LED driver chip.

15 years agohack: enable 32kHz during boot so that BT works
Grazvydas Ignotas [Wed, 7 Oct 2009 10:53:36 +0000 (13:53 +0300)]
hack: enable 32kHz during boot so that BT works

15 years agoadd bci stuff to defconfig
Grazvydas Ignotas [Wed, 12 Aug 2009 09:05:49 +0000 (12:05 +0300)]
add bci stuff to defconfig

15 years agobci: test code from linux-omap list
Grazvydas Ignotas [Wed, 12 Aug 2009 09:01:24 +0000 (12:01 +0300)]
bci: test code from linux-omap list

15 years agopandora: setup data for madc and bci, allow bci driver to compile
Grazvydas Ignotas [Wed, 12 Aug 2009 08:58:33 +0000 (11:58 +0300)]
pandora: setup data for madc and bci, allow bci driver to compile

15 years agomadc: populate madc->dev to avoid a crash
Grazvydas Ignotas [Wed, 12 Aug 2009 08:54:57 +0000 (11:54 +0300)]
madc: populate madc->dev to avoid a crash

15 years agoUBI: fix backward compatibility
Artem Bityutskiy [Wed, 30 Sep 2009 07:01:28 +0000 (10:01 +0300)]
UBI: fix backward compatibility

Commit 32bc4820287a1a03982979515949e8ea56eac641 did not fully fix
the backward compatibility issues. We still fail to properly handle
situations when the first PEB contains non-zero image sequence
number, but one of the following PEBs contains zero image sequence
number. For example, this may happen if we mount a new image with
an old kernel, and then try to mount it in the new kernel.

This patch should fix the issue.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBIFS: fix debugging dump
Artem Bityutskiy [Thu, 17 Sep 2009 12:08:31 +0000 (15:08 +0300)]
UBIFS: fix debugging dump

In 'dbg_check_space_info()' we want to dump current lprops statistics,
but actually dump old statistics. Fix this.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBIFS: improve lprops dump
Artem Bityutskiy [Sun, 28 Dec 2008 08:17:23 +0000 (10:17 +0200)]
UBIFS: improve lprops dump

Improve 'dbg_dump_lprop()' and print dark and dead space there,
decode flags, and journal heads.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBIFS: various minor commentary fixes
Artem Bityutskiy [Tue, 15 Sep 2009 14:09:24 +0000 (17:09 +0300)]
UBIFS: various minor commentary fixes

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBIFS: improve journal head debugging prints
Artem Bityutskiy [Tue, 15 Sep 2009 12:03:51 +0000 (15:03 +0300)]
UBIFS: improve journal head debugging prints

Convert the journal head integer into the head name when printing
debugging information.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBIFS: define journal head numbers in ubifs-media.h
Artem Bityutskiy [Tue, 15 Sep 2009 11:44:06 +0000 (14:44 +0300)]
UBIFS: define journal head numbers in ubifs-media.h

The journal head names and numbers are part of the UBIFS format, so
they should be in the ubifs-media.h.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBIFS: amend commentaries
Artem Bityutskiy [Tue, 1 Sep 2009 14:06:43 +0000 (17:06 +0300)]
UBIFS: amend commentaries

This patch amends and nicifies commentaries in file.c, as well as
fixes some spelling problems.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBIFS: check ubifs_scan error codes better
Artem Bityutskiy [Tue, 25 Aug 2009 13:22:53 +0000 (16:22 +0300)]
UBIFS: check ubifs_scan error codes better

The 'ubifs_scan()' function returns -EUCLEAN if something is corrupted
and recovery is needed, otherwise it returns other error codes. However,
in few places UBIFS does not check the error codes and runs recovery.
This patch changes this behavior and makes UBIFS start recovery only
on -EUCLEAN errors.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: Adrian Hunter <Adrian.Hunter@nokia.com>
15 years agoUBIFS: do not print scary error messages needlessly
Artem Bityutskiy [Tue, 25 Aug 2009 12:00:55 +0000 (15:00 +0300)]
UBIFS: do not print scary error messages needlessly

At the moment UBIFS print large and scary error messages and
flash dumps in case of nearly any corruption, even if it is
a recoverable corruption. For example, if the master node is
corrupted, ubifs_scan() prints error dumps, then UBIFS recovers
just fine and goes on.

This patch makes UBIFS print scary error messages only in
real cases, which are not recoverable. It adds 'quiet' argument
to the 'ubifs_scan()' function, so the caller may ask 'ubi_scan()'
not to print error messages if the caller is able to do recovery.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: Adrian Hunter <Adrian.Hunter@nokia.com>
15 years agoUBIFS: add inode size debugging check
Artem Bityutskiy [Thu, 27 Aug 2009 13:34:19 +0000 (16:34 +0300)]
UBIFS: add inode size debugging check

Add one more check to UBIFS - a check that makes sure that there
are no data nodes beyond inode size. And few commantaries fixes
along the line.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Reviewed-by: Adrian Hunter <Adrian.Hunter@nokia.com>
15 years agoUBIFS: constify file and inode operations
Artem Bityutskiy [Sat, 15 Aug 2009 10:57:48 +0000 (13:57 +0300)]
UBIFS: constify file and inode operations

This patch adds 'const' qualifier to UBIFS xattr inode and file
operations.

Pointed-out-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agokbuild: fix C libary confusion in unifdef.c due to getline()
Justin P. Mattock [Sat, 7 Mar 2009 12:31:29 +0000 (13:31 +0100)]
kbuild: fix C libary confusion in unifdef.c due to getline()

This fixes an error when compiling the kernel.

  CHK     include/linux/version.h
  HOSTCC  scripts/unifdef
scripts/unifdef.c:209: error: conflicting types for 'getline'
/usr/include/stdio.h:651: note: previous declaration of 'getline' was here
make[1]: *** [scripts/unifdef] Error 1
make: *** [__headers] Error 2

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
15 years agoUBIFS: remove unused functions
Subrata Modak [Fri, 17 Jul 2009 15:28:12 +0000 (18:28 +0300)]
UBIFS: remove unused functions

Remove 'xent_key_init_hash()' and 'data_key_init_flash()' functions,
as they are unot used anywhere.

Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBIFS: suppress compilation warning
Subrata Modak [Wed, 15 Jul 2009 02:19:03 +0000 (07:49 +0530)]
UBIFS: suppress compilation warning

Fix "using uninitialized variable" compilation warning by using
the "unititialized_var()" helper.

Signed-off-by: Subrata Modak<subrata@linux.vnet.ibm.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: improve NOR flash erasure quirk
Artem Bityutskiy [Fri, 24 Jul 2009 13:18:04 +0000 (16:18 +0300)]
UBI: improve NOR flash erasure quirk

More testing of NOR flash against power cuts showed that sometimes
eraseblocks may be unwritable, and we cannot really invalidate
them before erasure. But in this case the eraseblock probably
contains garbage anyway, and we do not have to invalidate the
headers. This assumption might be not true, but this is at least
what I have observed. So if we cannot invalidate the headers,
we make sure that the PEB does not contain valid VID header.
If this is true, everything is fine, otherwise we panic.

15 years agoUBI: introduce flash dump helper
Artem Bityutskiy [Fri, 24 Jul 2009 12:31:33 +0000 (15:31 +0300)]
UBI: introduce flash dump helper

Useful for debugging problems, compiled in only if UBI debugging
is enabled. This patch also makes the UBI writing function dump
the flash if it fails to write.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: compatible fallback in absense of sequence numbers
Adrian Hunter [Fri, 24 Jul 2009 16:16:04 +0000 (19:16 +0300)]
UBI: compatible fallback in absense of sequence numbers

Fall back onto thinking everything's OK if either of the sequence
numbers we are asked to compare is zero, which is what was used
before sequence numbers were introduced.

[ Artem: modified the patch to be applicable to upstream UBI, added
        big comment ]

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: fix double free on error path
Adrian Hunter [Fri, 24 Jul 2009 14:05:00 +0000 (17:05 +0300)]
UBI: fix double free on error path

If we fail in 'ubi_eba_init_scan()', we free
'ubi->volumes[i]->eba_tbl' in there, but also later free it
in 'free_internal_volumes()'. Fix this by assigning NULL
to 'ubi->volumes[i]->eba_tbl' after it is freed.

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: eliminate possible undefined behaviour
Phil Carmody [Thu, 23 Jul 2009 13:29:10 +0000 (15:29 +0200)]
UBI: eliminate possible undefined behaviour

The assignment to pos when rb is finally NULL is undefined behaviour.
Upon seeing that assignment, GCC may assume that rb is not NULL, and
the loop condition ``rb'' may be optimised away.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: print a warning if too many PEBs are corrupted
Artem Bityutskiy [Sun, 19 Jul 2009 11:33:14 +0000 (14:33 +0300)]
UBI: print a warning if too many PEBs are corrupted

There was a bug report recently where UBI prints:

UBI error: ubi_attach_mtd_dev: failed to attach by scanning, error -22

error messages and refuses to attach a PEB. It turned out to be a
buggy flash driver which returned garbage to almost every UBI read.
This patch makes UBI print a better message in such cases. Namely,
if UBI finds 8 or more corrupted PEBs, it prints a warning and
lists the corrupted PEBs.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: amend NOR flash pre-erase quirk
Artem Bityutskiy [Sun, 19 Jul 2009 11:09:46 +0000 (14:09 +0300)]
UBI: amend NOR flash pre-erase quirk

In case of NOR flash, UBI zeroes EC and VID headers' magic,
in order to detect interrupted erasures. It first zeroes out
the EC magic, then VID magic. However, if a power cut happens
in between, we'll end up with a corrupted EC header and a valid
VID header, in which case UBI accepts the PEB, but prints a
warning. This patch makes sure we first zero out the VID
magic, then the EC magic, not vice versa. This is just a
small amendment to prevent warning messages.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: print a message if ECH is corrupted and VIDH is ok
Artem Bityutskiy [Sun, 19 Jul 2009 11:03:16 +0000 (14:03 +0300)]
UBI: print a message if ECH is corrupted and VIDH is ok

If the EC header is corrupted, but the VID header is OK, UBI accepts the
PEB and treats it as "used". However, generally this should not happen.
Print a warning if this happens.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agoUBI: fix bug in image sequence number handling
Holger Brunck [Mon, 13 Jul 2009 14:47:57 +0000 (16:47 +0200)]
UBI: fix bug in image sequence number handling

This patch fixes a bug in the image seq. number handling in the
scanning level. The assignment of the image_seq was incorrect.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
15 years agomtd: blkdevs: do not for get to get MTD devices
Artem Bityutskiy [Fri, 10 Jul 2009 14:02:17 +0000 (17:02 +0300)]
mtd: blkdevs: do not for get to get MTD devices

Nowadays MTD devices have to be "get" before they can be
used. This has to be done with 'put_mtd_device()'. The
'blktrans_open()' function did not do this and instead
used 'try_module_get()'. Fixe this.

Since 'put_mtd_device()' already gets the module, extra
'try_module_get()' is not needed.

This fixes oops when one tries to use mtdbloc on tope of
gluebi.

Reported-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>