replicant:kernel_goldelico_gta04.git
8 years agoomap_hsmmc: enable sdio_irq.
NeilBrown [Fri, 18 Oct 2013 09:06:43 +0000 (20:06 +1100)]
omap_hsmmc: enable sdio_irq.

There are some horrible hacks in here, particularly
the fact that we still poll.  surprisingly this adds
20% to throughput.

Signed-off-by: NeilBrown <neilb@suse.de>
Conflicts:
drivers/mmc/host/omap_hsmmc.c

8 years agogta04-audio: Jack detection thresholds for processed values
Paul Kocialkowski [Sat, 24 May 2014 11:15:14 +0000 (13:15 +0200)]
gta04-audio: Jack detection thresholds for processed values

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agotwl4030-madc: Request processed values in twl4030_get_madc_conversion
Paul Kocialkowski [Sat, 24 May 2014 11:08:29 +0000 (13:08 +0200)]
twl4030-madc: Request processed values in twl4030_get_madc_conversion

Not setting the raw parameter in the request causes it to be randomly
initialized to a value that might be different from zero or zero. This leads to
values that are randomly either raw or processed, making it very difficult to
make reliable use of the values.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoRevert "twl4030-madc: Return raw values from twl4030_get_madc_conversion"
Paul Kocialkowski [Sat, 24 May 2014 07:43:52 +0000 (09:43 +0200)]
Revert "twl4030-madc: Return raw values from twl4030_get_madc_conversion"

This reverts commit 12f9fdbbccadde55fb6d8441ac2f9744f16f0372.

8 years agogta04-audio: Wait for two consecutive button press values to report
Paul Kocialkowski [Sun, 11 May 2014 09:51:36 +0000 (11:51 +0200)]
gta04-audio: Wait for two consecutive button press values to report

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agogta04-audio: Reliable headphones, headset and button press detection
Paul Kocialkowski [Sat, 10 May 2014 23:33:49 +0000 (01:33 +0200)]
gta04-audio: Reliable headphones, headset and button press detection

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agotwl4030-madc: Return raw values from twl4030_get_madc_conversion
Paul Kocialkowski [Sat, 10 May 2014 23:32:53 +0000 (01:32 +0200)]
twl4030-madc: Return raw values from twl4030_get_madc_conversion

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoRevert "bq27x00: Poll for changes every minute"
Paul Kocialkowski [Sat, 3 May 2014 12:17:14 +0000 (14:17 +0200)]
Revert "bq27x00: Poll for changes every minute"

This reverts commit c8acb12fba2ebe49ed73eda32cdee7466dcd5cf0.

8 years agomusb: Allow vbus draw up to 200mA
Paul Kocialkowski [Fri, 2 May 2014 22:28:45 +0000 (00:28 +0200)]
musb: Allow vbus draw up to 200mA

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agogta04_defconfig: USB OTG wakelock
Paul Kocialkowski [Fri, 2 May 2014 22:27:58 +0000 (00:27 +0200)]
gta04_defconfig: USB OTG wakelock

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agousb: otg: otg-wakelock: Fix build for 3.12
Paul Kocialkowski [Fri, 2 May 2014 22:08:12 +0000 (00:08 +0200)]
usb: otg: otg-wakelock: Fix build for 3.12

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agousb: otg: otg-wakelock: Fix build for 3.7
Arve Hjønnevåg [Tue, 27 Nov 2012 00:09:13 +0000 (16:09 -0800)]
usb: otg: otg-wakelock: Fix build for 3.7

Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years agousb: otg: otg-wakelock: Fix build for 3.4
Benoit Goby [Thu, 10 May 2012 23:41:40 +0000 (16:41 -0700)]
usb: otg: otg-wakelock: Fix build for 3.4

Change-Id: I97e21e9e6645bf18522675039e512f85fe836794
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agousb: otg: otg-wakelock: fix build for 3.3
Colin Cross [Wed, 1 Feb 2012 22:23:15 +0000 (14:23 -0800)]
usb: otg: otg-wakelock: fix build for 3.3

Add missing module.h include

Change-Id: Ib0538ca569c9e0713ceefcd1f91c6bc089d2f2ba
Signed-off-by: Colin Cross <ccross@android.com>
8 years agousb: otg: Temporarily grab wakelock on charger and disconnect events
Todd Poynor [Tue, 27 Sep 2011 03:35:30 +0000 (20:35 -0700)]
usb: otg: Temporarily grab wakelock on charger and disconnect events

Change-Id: If995d4af4adcb08e8369009483f2956ad9627267
Signed-off-by: Todd Poynor <toddpoynor@google.com>
8 years agoUSB: OTG: Take wakelock when VBUS present
Todd Poynor [Sat, 2 Jul 2011 00:19:56 +0000 (17:19 -0700)]
USB: OTG: Take wakelock when VBUS present

Enabled by default, can disable with:
   echo N > /sys/module/otg_wakelock/parameters/enabled

Change-Id: I34974624c52ae23490852b44c270d2f326cf6116
Signed-off-by: Todd Poynor <toddpoynor@google.com>
8 years agogta04_deconfig: Android USB Gadget config
Paul Kocialkowski [Fri, 2 May 2014 21:01:49 +0000 (23:01 +0200)]
gta04_deconfig: Android USB Gadget config

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agousb: gadget: android: 3.12 fixes
Paul Kocialkowski [Fri, 2 May 2014 20:53:52 +0000 (22:53 +0200)]
usb: gadget: android: 3.12 fixes

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agodrivers: usb: gadget: 64-bit related type fixes
Greg Hackmann [Mon, 24 Feb 2014 18:19:13 +0000 (10:19 -0800)]
drivers: usb: gadget: 64-bit related type fixes

Change-Id: I2f9b12e1e0cdfe64ffe20db78d319a6221821184
Signed-off-by: Greg Hackmann <ghackmann@google.com>
8 years agofix false disconnect due to a signal sent to the reading process
keunyoung [Wed, 29 Jan 2014 20:41:50 +0000 (12:41 -0800)]
fix false disconnect due to a signal sent to the reading process

- In the current implementation, when a signal is sent to the reading process,
  read is cancelled by calling usb_ep_dequeue, which lead into calling
  acc_complete_out with ECONNRESET, but the current logic treats it as
  disconnection, which makes the device inaccessible until cable is actually
  disconnected.
- The fix calls disconnect only when ESHUTDOWN error is passed.
- If data has already arrived while trying cancelling, the data is marked
  as available, and it will be read out on the next read. This is necessary
  as USB bulk is assumed to guarantee no data loss.

Signed-off-by: keunyoung <keunyoung@google.com>
8 years agousb: gadget: f_mtp: move userspace interface to uapi
Colin Cross [Thu, 7 Nov 2013 21:08:15 +0000 (13:08 -0800)]
usb: gadget: f_mtp: move userspace interface to uapi

Move the most of linux/usb/f_mtp.h header to uapi.  Move the only
remaining structure definition into f_mtp.c, the only place that
uses it.

Change-Id: I952c1a9dc15c36bf295a0eb4d74b6b1ad912ed03
Signed-off-by: Colin Cross <ccross@android.com>
8 years agousb: gadget: android: Remove device if probe fails
Benoit Goby [Sat, 19 Oct 2013 00:16:38 +0000 (17:16 -0700)]
usb: gadget: android: Remove device if probe fails

Make sure the android0 device is removed before we can destroy
the class.

Change-Id: Id584888c407beb80a1df4990f73fe31ccb9d4767
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agoUSB: remove duplicate out endpoint creation in MTP mode
Peter Oh [Thu, 12 Sep 2013 01:42:18 +0000 (01:42 +0000)]
USB: remove duplicate out endpoint creation in MTP mode

Android MTP gadget uses 3 endpoints which are 1 in endpoint,
1 out endpoint, and 1 interrupt endpoint. However when MTP
gadget creates its endpoints, it creates the out endpoint twice
and overwrites the first created out endpoint with the second one,
so that it causes a leak of endpoint resources.

Change-Id: Iba82950095610b26b362f4b10a67cedfb1fee366
Signed-off-by: Peter Oh <poh@broadcom.com>
Reviewed-on: http://mps-gerrit.broadcom.com/37744
Reviewed-by: Graham Williams <gwilli@broadcom.com>
Reviewed-by: John Garry <jgarry@broadcom.com>
Branch-Open: Branch Status <branch_status_noreply@broadcom.com>
Reviewed-by: Checkpatch Status <checkpatch_status_noreply@broadcom.com>
Reviewed-by: Joyjit Nath <joyjit@broadcom.com>
Tested-by: AutoSubmit Status <autosubmit_status_noreply@broadcom.com>
8 years agousb: gadget: android: 3.10 fixes
Arve Hjønnevåg [Fri, 17 May 2013 03:27:45 +0000 (20:27 -0700)]
usb: gadget: android: 3.10 fixes

Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years agousb: gadget: android: move init to late_initcall for now
Arve Hjønnevåg [Tue, 5 Mar 2013 03:14:10 +0000 (19:14 -0800)]
usb: gadget: android: move init to late_initcall for now

gserial_alloc_line crashes when called from module_init

Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years agousb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.9
Arve Hjønnevåg [Tue, 5 Mar 2013 01:41:34 +0000 (17:41 -0800)]
usb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.9

Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years agousb: gadget: Fix android gadget driver build
Benoit Goby [Tue, 6 Nov 2012 02:47:08 +0000 (18:47 -0800)]
usb: gadget: Fix android gadget driver build

Removed obsolete f_adb function

Change-Id: Idfb4110429bc0ea63f493c68ad667f49ca471987
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agoHACK: usb: gadget: Fix enumeration on boot
Benoit Goby [Thu, 1 Mar 2012 21:17:07 +0000 (13:17 -0800)]
HACK: usb: gadget: Fix enumeration on boot

The Android gadget driver disconnects the gadget on bind
and expects the gadget to stay disconnected until it calls
usb_gadget_connect when userspace is ready. Removed the call
to usb_gadget_connect in usb_gadget_probe_driver to avoid
enabling the pullup before userspace is ready.

Change-Id: I63707ac6e16a44eca52351a4bf80407d25fbd35e
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agousb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.8
Arve Hjønnevåg [Wed, 28 Nov 2012 03:29:04 +0000 (19:29 -0800)]
usb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.8

Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years agousb: gadget: accessory: Fix section mismatch (again)
Todd Poynor [Wed, 28 Nov 2012 21:03:40 +0000 (13:03 -0800)]
usb: gadget: accessory: Fix section mismatch (again)

create_bulk_endpoints should not be __init since it is called when
accessory is enabled.

Change-Id: Iac6e9f29d53c93760e926efd8e7603432632acb4
Signed-off-by: Todd Poynor <toddpoynor@google.com>
8 years agousb: gadget: f_fs: Fix enumeration in fullspeed mode
Benoit Goby [Thu, 20 Sep 2012 00:03:34 +0000 (17:03 -0700)]
usb: gadget: f_fs: Fix enumeration in fullspeed mode

ffs_func_eps_enable always take the highspeed usb_endpoint_descriptor
if it is available. Choose the correct usb_endpoint_descriptor
depending on the gadget speed instead.

Change-Id: I5b8444cfdf1b6fe1eef25525fb7a0a0f617a353e
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agoUSB: gadget: f_audio_source: New gadget driver for audio output
Mike Lockwood [Fri, 11 May 2012 16:01:08 +0000 (09:01 -0700)]
USB: gadget: f_audio_source: New gadget driver for audio output

This driver presents a standard USB audio class interface to the host
and an ALSA PCM device to userspace

Change-Id: If16b14a5ff27045f9cb2daaf1ae9195c5eeab7d0
Signed-off-by: Mike Lockwood <lockwood@google.com>
8 years agoUSB: gadget: f_accessory: Add support for HID input devices
Mike Lockwood [Mon, 26 Mar 2012 18:03:55 +0000 (11:03 -0700)]
USB: gadget: f_accessory: Add support for HID input devices

Change-Id: I4f1452db32508382df52acdc47c0eb395ae328c7
Signed-off-by: Mike Lockwood <lockwood@google.com>
8 years agoUSB: gadget: Add ACCESSORY_SET_AUDIO_MODE control request and ioctl
Mike Lockwood [Fri, 11 May 2012 16:00:40 +0000 (09:00 -0700)]
USB: gadget: Add ACCESSORY_SET_AUDIO_MODE control request and ioctl

The control request will be used by the host to enable/disable USB audio
and the ioctl will be used by userspace to read the audio mode

Change-Id: I81c38611b588451e80eacdccc417ca6e11c60cab
Signed-off-by: Mike Lockwood <lockwood@google.com>
8 years agousb: gadget: Fix usb string id allocation
Benoit Goby [Fri, 20 Jan 2012 22:42:41 +0000 (14:42 -0800)]
usb: gadget: Fix usb string id allocation

Don't reset next_string_id every time the gadget is enabled, this makes
the next strings allocated overwrite strings allocated at probe time.
Instead, fix rndis not to allocate new string ids on every config bind.

Change-Id: Ied28ee416bb6f00c434c34176fe5b7f0dcb2b2d4
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agousb: gadget: accessory: Fix section mismatch
Benoit Goby [Sat, 23 Jun 2012 01:17:10 +0000 (18:17 -0700)]
usb: gadget: accessory: Fix section mismatch

create_bulk_endpoints should not be __init since it is called when
accessory is enabled

Change-Id: If827a4531f0f6c15af938345163923186368e2a5
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agousb: gadget: android: Add FunctionFS
Benoit Goby [Fri, 30 Mar 2012 02:25:23 +0000 (19:25 -0700)]
usb: gadget: android: Add FunctionFS

Add support for FunctionFS (ffs) to implement usb functions in userspace.

The aliases property stores the list of functions that are implemented
using functionfs.

For example:
echo "adb,mtp" > /sys/class/android_usb/android0/f_ffs/aliases

Then when the function are enabled:
echo "adb,acm" > /sys/class/android_usb/android0/functions
Internally, ffs and acm will be used.

Change-Id: I44117b183d48a5a99ddbee3ef2cf8998be74598e
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agousb: gadget: android: Fix product name
Benoit Goby [Tue, 29 May 2012 20:57:27 +0000 (13:57 -0700)]
usb: gadget: android: Fix product name

Product names may contain spaces and scanf %s only matches the 1st word.
Use strlcpy instead.

Change-Id: Ie8703fea9775f7fc17fe615a42597ca3816d36b0
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agousb: gadget: composite: Fix corruption when changing configuration
Benoit Goby [Wed, 16 May 2012 03:44:33 +0000 (20:44 -0700)]
usb: gadget: composite: Fix corruption when changing configuration

Remove the config from the configs list before releasing the spinlock.
Otherwise the other cpu might be processing a SET_CONFIGURATION that
will switch to the configuration that is being released.

Change-Id: Id4da0d0e18ead63e20cb236cd1d3e8e6d116acce
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agousb: gadget: adb: Only enable the gadget when adbd is ready
Benoit Goby [Tue, 20 Mar 2012 01:56:52 +0000 (18:56 -0700)]
usb: gadget: adb: Only enable the gadget when adbd is ready

When adb is enabled, only connect the gadget when adbd is ready. If adbd
dies or is restarted (e.g. "adb root"), the gadget is disconnected when
the adb device is close, and it is re-connected once adb re-open the
device.

- Add callbacks to adb, similar to FunctionFs callbacks, to notify the
  gadget when the daemon is ready or closed.
- Refcount calls to android_enable/android_disable to enable the gadget
  only once all the function daemons are ready.
- Add enable/disble to android_usb_function to notify the function when
  it is added/removed from the list of enabled functions.

Change-Id: Id54ff85aec9cf8715c94b4f9bd6137a79ad58bfc
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agousb: gadget: adb: do not set error flag when dequeuing req
Colin Cross [Fri, 9 Mar 2012 01:57:51 +0000 (17:57 -0800)]
usb: gadget: adb: do not set error flag when dequeuing req

When an ep_out req is dequeued because of userspace freezing,
don't set the error flag.

Change-Id: I680f1a1059b8ac2244aaa069e7d42dc44abf98e9
Signed-off-by: Colin Cross <ccross@android.com>
8 years agousb: gadget: adb: allow freezing in adb_read
Colin Cross [Mon, 5 Mar 2012 21:29:45 +0000 (13:29 -0800)]
usb: gadget: adb: allow freezing in adb_read

wait_event_interruptible in adb_read might return -ERESTARTSYS if
userspace is frozen during adb_read or another signal is delivered
to adb.  If so, don't set dev->error to avoid resetting the adb
connection.

Change-Id: I5a7baa013a9a3a3b5305de7e6a0d18546a560018
Signed-off-by: Colin Cross <ccross@android.com>
8 years agousb: gadget: accessory: Add Android Accessory function
Benoit Goby [Mon, 19 Dec 2011 22:39:37 +0000 (14:39 -0800)]
usb: gadget: accessory: Add Android Accessory function

USB accessory mode allows users to connect USB host hardware
specifically designed for Android-powered devices. The accessories
must adhere to the Android accessory protocol outlined in the
http://accessories.android.com documentation. This allows
Android devices that cannot act as a USB host to still interact with
USB hardware. When an Android device is in USB accessory mode, the
attached Android USB accessory acts as the host, provides power
to the USB bus, and enumerates connected devices.

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agousb: gadget: adb: Add ADB function
Benoit Goby [Mon, 19 Dec 2011 22:38:41 +0000 (14:38 -0800)]
usb: gadget: adb: Add ADB function

Android Debug Bridge (adb) is a command line tool that lets
users communicate with a Android-powered device. It is used
mainly to debug applications and tranfer files. f_adb implements
the transport layer between the ADB Server (on the host) and the
ADBD daemon (on the device).

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agousb: gadget: mtp: Add MTP/PTP function
Benoit Goby [Mon, 19 Dec 2011 22:37:50 +0000 (14:37 -0800)]
usb: gadget: mtp: Add MTP/PTP function

USB gadget function driver used by the Android framework to
implement the MTP and PTP protocols. It creates a character device
that provides an interface for fast transfer of files and
supports transferring files greater than 4GB.

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agousb: gadget: Add Android Composite Gadget driver
Benoit Goby [Mon, 12 Dec 2011 21:01:23 +0000 (13:01 -0800)]
usb: gadget: Add Android Composite Gadget driver

The Android Gadget driver is a composite driver that allows
userspace to change at runtime the list of functions enabled in
its configuration and to configure these functions. It supports
multiple functions: acm, adb, rndis, mtp/ptp, mass storage and
accessory.

It is usually controlled by a daemon that changes the configuration
based on user settings. For example, rndis is enabled when the user
enables sharing the phone data connection and adb (Android Debug
Bridge) is only enabled when the user wants to debug applications
for security reasons.

As an example on how to use it, the following shell commands will
make the gadget disconnect from the host and make it be re-enumerated
as a composite with 1 rndis and 2 acm interfaces, and a different
product id:

echo 0       > /sys/class/android_usb/android0/enable
echo rndis,acm > /sys/class/android_usb/android0/functions
echo 2       > /sys/class/android_usb/android0/f_acm/instances
echo 2d01    > /sys/class/android_usb/android0/idProduct
echo 1       > /sys/class/android_usb/android0/enable

The driver requires a gadget controller that supports software
control of the D+ pullup and the controller driver must support
disabling the pullup during composite_bind.

Signed-off-by: Mike Lockwood <lockwood@android.com>
Signed-off-by: Benoit Goby <benoit@android.com>
8 years agoRevert "Import Android gadget driver"
Paul Kocialkowski [Fri, 2 May 2014 18:40:35 +0000 (20:40 +0200)]
Revert "Import Android gadget driver"

This reverts commit c51e7924d64de814cfdeff2b415ab6b721d49254.

8 years agoRevert "gadget/android.c: fix compilation on 3.11"
Paul Kocialkowski [Fri, 2 May 2014 18:40:22 +0000 (20:40 +0200)]
Revert "gadget/android.c: fix compilation on 3.11"

This reverts commit 941b99efa3dd974009fbaa5e932825343d533f8a.

8 years agoRevert "Android Gadget: disable android_acm for now, to prevent kernel panic."
Paul Kocialkowski [Fri, 2 May 2014 18:40:08 +0000 (20:40 +0200)]
Revert "Android Gadget: disable android_acm for now, to prevent kernel panic."

This reverts commit d395bccb46686f961351d20d79b2e879d8650aec.

8 years agoRevert "usb: gadget: adb: Add ADB function"
Paul Kocialkowski [Fri, 2 May 2014 18:39:56 +0000 (20:39 +0200)]
Revert "usb: gadget: adb: Add ADB function"

This reverts commit 85a5ad272ffb64067b8dd3c72a631c54169b6153.

8 years agoRevert "Android Gadget: make ADB work"
Paul Kocialkowski [Fri, 2 May 2014 18:39:44 +0000 (20:39 +0200)]
Revert "Android Gadget: make ADB work"

This reverts commit 4f6caa8b5bda4c2d4103568bed5a25acf443924a.

8 years agoRevert "PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock"
Paul Kocialkowski [Fri, 2 May 2014 18:25:28 +0000 (20:25 +0200)]
Revert "PM / Sleep: Require CAP_BLOCK_SUSPEND to use wake_lock/wake_unlock"

This reverts commit 11388c87d2abca1f01975ced28ce9eacea239104.

8 years agogta04: bq27000-battery supplicant for twl4030 charger
Paul Kocialkowski [Sun, 20 Apr 2014 22:17:37 +0000 (00:17 +0200)]
gta04: bq27000-battery supplicant for twl4030 charger

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agotwl4030 charger: Declare supplicants from platform data
Paul Kocialkowski [Sun, 20 Apr 2014 22:17:04 +0000 (00:17 +0200)]
twl4030 charger: Declare supplicants from platform data

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agobq27x00: Poll for changes every minute
Paul Kocialkowski [Sun, 20 Apr 2014 22:12:49 +0000 (00:12 +0200)]
bq27x00: Poll for changes every minute

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agobq27x00: Always report charge information
Paul Kocialkowski [Sun, 20 Apr 2014 22:11:42 +0000 (00:11 +0200)]
bq27x00: Always report charge information

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agobq27x00: Shortly retry more often to update data after inconsistent states
Paul Kocialkowski [Sun, 20 Apr 2014 22:03:06 +0000 (00:03 +0200)]
bq27x00: Shortly retry more often to update data after inconsistent states

This is especially relevant when an external power supply is plugged:
bq27x00_external_power_changed will trigger bq27x00_battery_poll immediately,
though the battery might not have yet detected the change and will still
report discharging status. This makes the driver try to reach a consistent
state for a few seconds by polling the battery every 2 seconds.

The same issue happens when an external power is unplugged: the battery
will still report charging status.

Since the bq27x00 is not driven by interrupt, this change makes it possible to
detect the status change as soon as possible while still giving up shortly if
it cannot reach a consistent state.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoomapfb: Default to 16 bits per pixel
Paul Kocialkowski [Sun, 20 Apr 2014 21:52:25 +0000 (23:52 +0200)]
omapfb: Default to 16 bits per pixel

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agogta04: Keep leds turned off as default
Paul Kocialkowski [Sun, 20 Apr 2014 21:51:55 +0000 (23:51 +0200)]
gta04: Keep leds turned off as default

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoStandalone recovery defconfig for gta04
Paul Kocialkowski [Sun, 20 Apr 2014 21:50:01 +0000 (23:50 +0200)]
Standalone recovery defconfig for gta04

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agogta04_deconfig: Builtin bq27x00 driver, without I2C support
Paul Kocialkowski [Sun, 20 Apr 2014 21:37:44 +0000 (23:37 +0200)]
gta04_deconfig: Builtin bq27x00 driver, without I2C support

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agogta04_deconfig: Builtin block devices drivers
Paul Kocialkowski [Sun, 20 Apr 2014 21:37:16 +0000 (23:37 +0200)]
gta04_deconfig: Builtin block devices drivers

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agogta04_deconfig: VT console, no logo
Paul Kocialkowski [Sun, 20 Apr 2014 21:34:30 +0000 (23:34 +0200)]
gta04_deconfig: VT console, no logo

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agogta04_deconfig: Ramdisk initramfs
Paul Kocialkowski [Sun, 20 Apr 2014 21:32:55 +0000 (23:32 +0200)]
gta04_deconfig: Ramdisk initramfs

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
8 years agoGTA04b3/L7004: fixed flipped y axis of touch
H. Nikolaus Schaller [Thu, 17 Apr 2014 20:48:23 +0000 (22:48 +0200)]
GTA04b3/L7004: fixed flipped y axis of touch

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
8 years agofixed GTA04b3 (L7004) panel
H. Nikolaus Schaller [Thu, 17 Apr 2014 20:17:22 +0000 (22:17 +0200)]
fixed GTA04b3 (L7004) panel

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
8 years agogpio_keys, twl4030-pwrbutton: stay awake for 1sec on resume
Lukas Märdian [Fri, 4 Apr 2014 09:34:40 +0000 (11:34 +0200)]
gpio_keys, twl4030-pwrbutton: stay awake for 1sec on resume

This gives the userspace a chance to fully handle the pm_wakeup_event,
before autosleep suspends the system alltogether again.

This fixes suspend/resume on the OpenPhoenux GTA04, in combination with
the Replicant 4.2.2 userspace, which needs to execute this to stay
awake: 'echo on > /sys/power/state'

Signed-off-by: Lukas Märdian <lukas@goldelico.com>
8 years agoRevert "Android: tsc2007-gta04: rename driver to 'tsc2007', to make android recognize...
Lukas Märdian [Fri, 4 Apr 2014 09:27:25 +0000 (11:27 +0200)]
Revert "Android: tsc2007-gta04: rename driver to 'tsc2007', to make android recognize it as an absolute input device"

This reverts commit eba4e11ef2e49b8b7e2bee4773bb581e823b9948.

* This is now handeled in userspace, by deploying
  TSC2007_Touchscreen.idc instead of tsc2007.idc

8 years agoRevert "bq27x00 - don't report power-supply change so often."
Lukas Märdian [Tue, 1 Apr 2014 08:52:54 +0000 (10:52 +0200)]
Revert "bq27x00 - don't report power-supply change so often."

This reverts commit ca8f1c8e2cdbb8a475a397e37c066972dfaeae7c.

* We want to stick to the mainline linux caching mechanism,
  to receive capacity updates from the battery via uevents.

8 years agoAndroid: netfilter qtaguid integration
Lukas Märdian [Thu, 27 Feb 2014 14:27:40 +0000 (15:27 +0100)]
Android: netfilter qtaguid integration

Based on a patch by Alexandre Roumiantsev

8 years agoRevert "Android: evdev: use monotonic clock, to make Android recognize touch events"
Lukas Märdian [Thu, 27 Feb 2014 11:04:06 +0000 (12:04 +0100)]
Revert "Android: evdev: use monotonic clock, to make Android recognize touch events"

This reverts commit eb6de65f31324562132f2b90ca3d71745ca6b59e.

It is not needed anymore since replicant-4.2 and reduces our delta to mainline linux.

9 years agoMerge branch 'suspend' into 3.12-replicant4
H. Nikolaus Schaller [Thu, 21 Nov 2013 14:50:12 +0000 (15:50 +0100)]
Merge branch 'suspend' into 3.12-replicant4

9 years agoRevert "Reapply "OMAP:HACK - don't let CORE go to off-mode the first time.""
H. Nikolaus Schaller [Sat, 16 Nov 2013 15:28:03 +0000 (16:28 +0100)]
Revert "Reapply "OMAP:HACK - don't let CORE go to off-mode the first time.""

9 years agolibertas - hack to fix suspend.
NeilBrown [Fri, 18 Oct 2013 09:05:01 +0000 (20:05 +1100)]
libertas - hack to fix suspend.

Something is wrong with suspend and libertas.
This seems to avoid the problem.

Signed-off-by: NeilBrown <neilb@suse.de>
9 years agoRevert "OMAP:HACK - don't let CORE go to off-mode the first time."
H. Nikolaus Schaller [Thu, 14 Nov 2013 16:59:55 +0000 (17:59 +0100)]
Revert "OMAP:HACK - don't let CORE go to off-mode the first time."
this hack has the problem that it may break normal suspend and
the device may not resume at all.

This reverts commit 032fed6940159fdcc293814bcfe4bc74a39f536c.

9 years agofixed enabling/disabling voice interface for hw/sw routing
H. Nikolaus Schaller [Thu, 14 Nov 2013 16:06:15 +0000 (17:06 +0100)]
fixed enabling/disabling voice interface for hw/sw routing

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
9 years agofixed misconfiguration where we do have our gta04 specific twl4030 audio driver and...
H. Nikolaus Schaller [Thu, 14 Nov 2013 12:28:42 +0000 (13:28 +0100)]
fixed misconfiguration where we do have our gta04 specific twl4030 audio driver and the generic one

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
9 years agoremoved duplicate #include
H. Nikolaus Schaller [Thu, 14 Nov 2013 12:26:13 +0000 (13:26 +0100)]
removed duplicate #include

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
9 years agouse twl4030_voice_set_tristate() for tristating the TWL4030 voice PCM
H. Nikolaus Schaller [Wed, 13 Nov 2013 15:52:26 +0000 (16:52 +0100)]
use twl4030_voice_set_tristate() for tristating the TWL4030 voice PCM

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
9 years agorenamed to explain that it is an EOC gpio or irq
H. Nikolaus Schaller [Sat, 9 Nov 2013 11:41:55 +0000 (12:41 +0100)]
renamed to explain that it is an EOC gpio or irq

9 years agofixed issue with 100HZ jiffies where a waiting time of 1 may
H. Nikolaus Schaller [Sat, 9 Nov 2013 09:19:06 +0000 (10:19 +0100)]
fixed issue with 100HZ jiffies where a waiting time of 1 may
be equivalent to no wait at all.

Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
9 years agofixed minor issue preventing us to push to goldelico/master
H. Nikolaus Schaller [Mon, 4 Nov 2013 09:54:17 +0000 (10:54 +0100)]
fixed minor issue preventing us to push to goldelico/master

9 years agoThis is now Linux-3.12.0 for the GTA04!
H. Nikolaus Schaller [Mon, 4 Nov 2013 09:10:39 +0000 (10:10 +0100)]
This is now Linux-3.12.0 for the GTA04!

Merge remote-tracking branch 'linus/master'

9 years agoLinux 3.12
Linus Torvalds [Sun, 3 Nov 2013 23:41:51 +0000 (15:41 -0800)]
Linux 3.12

9 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sun, 3 Nov 2013 19:36:41 +0000 (11:36 -0800)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
 "Three fixes across arch/mips with the most complex one being the GIC
  interrupt fix - at nine lines still not monster.  I'm confident this
  are the final MIPS patches even if there should go for an rc8"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
  MIPS: ralink: fix return value check in rt_timer_probe()
  MIPS: malta: Fix GIC interrupt offsets
  MIPS: Perf: Fix 74K cache map

9 years agoipc, msg: forbid negative values for "msg{max,mnb,mni}"
Mathias Krause [Sun, 3 Nov 2013 11:36:28 +0000 (12:36 +0100)]
ipc, msg: forbid negative values for "msg{max,mnb,mni}"

Negative message lengths make no sense -- so don't do negative queue
lenghts or identifier counts. Prevent them from getting negative.

Also change the underlying data types to be unsigned to avoid hairy
surprises with sign extensions in cases where those variables get
evaluated in unsigned expressions with bigger data types, e.g size_t.

In case a user still wants to have "unlimited" sizes she could just use
INT_MAX instead.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agousb: various hacks related to otg
Andreas Kemnade [Fri, 1 Nov 2013 15:29:06 +0000 (16:29 +0100)]
usb: various hacks related to otg

- start switch to b_host role via sysfs
- control vbus output power
  - can be used to start charging when a charger with ID
    grounded is first connected to the device and then to the
    wall outlet
  - enable/disable pulldown resistors via sysfs,
    can be used to emulate a connection to a usb host,
    useful for switching to b_host when using y-cables
  - script for entering b_host mode

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
9 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty...
Linus Torvalds [Sat, 2 Nov 2013 17:27:29 +0000 (10:27 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/rusty/linux

Pull ARM kallsyms fix from Rusty Russell:
 "Last minute perf unbreakage for ARM modules; spent a day in
  linux-next"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  scripts/kallsyms: filter symbols not in kernel address space

9 years agoARC: Incorrect mm reference used in vmalloc fault handler
Vineet Gupta [Sat, 2 Nov 2013 12:17:49 +0000 (17:47 +0530)]
ARC: Incorrect mm reference used in vmalloc fault handler

A vmalloc fault needs to sync up PGD/PTE entry from init_mm to current
task's "active_mm".  ARC vmalloc fault handler however was using mm.

A vmalloc fault for non user task context (actually pre-userland, from
init thread's open for /dev/console) caused the handler to deref NULL mm
(for mm->pgd)

The reasons it worked so far is amazing:

1. By default (!SMP), vmalloc fault handler uses a cached value of PGD.
   In SMP that MMU register is repurposed hence need for mm pointer deref.

2. In pre-3.12 SMP kernel, the problem triggering vmalloc didn't exist in
   pre-userland code path - it was introduced with commit 20bafb3d23d108bc
   "n_tty: Move buffers into n_tty_data"

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: Noam Camus <noamc@ezchip.com>
Cc: stable@vger.kernel.org #3.10 and 3.11
Cc: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoscripts/kallsyms: filter symbols not in kernel address space
Ming Lei [Fri, 1 Nov 2013 22:41:33 +0000 (09:11 +1030)]
scripts/kallsyms: filter symbols not in kernel address space

This patch uses CONFIG_PAGE_OFFSET to filter symbols which
are not in kernel address space because these symbols are
generally for generating code purpose and can't be run at
kernel mode, so we needn't keep them in /proc/kallsyms.

For example, on ARM there are some symbols which may be
linked in relocatable code section, then perf can't parse
symbols any more from /proc/kallsyms, this patch fixes the
problem (introduced b9b32bf70f2fb710b07c94e13afbc729afe221da)

Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@vger.kernel.org
9 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 1 Nov 2013 19:54:51 +0000 (12:54 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Two fixes:

   - Fix 'NMI handler took too long to run' false positives

     [ Genuine NMI overhead speedups will come for v3.13, this commit
       only fixes a measurement bug ]

   - Fix perf ring-buffer missed barrier causing (rare) ring-buffer data
     corruption on ppc64"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86: Fix NMI measurements
  perf: Fix perf ring buffer memory ordering

9 years agoMerge tag 'usb-3.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Fri, 1 Nov 2013 19:23:56 +0000 (12:23 -0700)]
Merge tag 'usb-3.12-rc8' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here is a set of patches that revert all of the changes done to the
  pl2303 USB serial driver in the 3.12-rc timeframe, as it turns out
  they break some devices that work just fine on 3.11.  As it's not a
  good idea to break working systems, drop them all and they will be
  reworked for future kernel versions such that there is no breakage.

  I've also included a MAINTAINERS update for the USB serial subsystem
  and a new device id for the ftdi_sio driver as well"

* tag 'usb-3.12-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: serial: ftdi_sio: add id for Z3X Box device
  USB: Maintainers change for usb serial drivers
  Revert "USB: pl2303: restrict the divisor based baud rate encoding method to the "HX" chip type"
  Revert "usb: pl2303: fix+improve the divsor based baud rate encoding method"
  Revert "usb: pl2303: do not round to the next nearest standard baud rate for the divisor based baud rate encoding method"
  Revert "usb: pl2303: remove 500000 baud from the list of standard baud rates"
  Revert "usb: pl2303: move the two baud rate encoding methods to separate functions"
  Revert "usb: pl2303: increase the allowed baud rate range for the divisor based encoding method"
  Revert "usb: pl2303: also use the divisor based baud rate encoding method for baud rates < 115200 with HX chips"
  Revert "usb: pl2303: add two comments concerning the supported baud rates with HX chips"
  Revert "pl2303: simplify the else-if contruct for type_1 chips in pl2303_startup()"
  Revert "pl2303: improve the chip type information output on startup"
  Revert "pl2303: improve the chip type detection/distinction"
  Revert "USB: pl2303: distinguish between original and cloned HX chips"

9 years agoMerge tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 1 Nov 2013 19:23:22 +0000 (12:23 -0700)]
Merge tag 'sound-3.12' of git://git./linux/kernel/git/tiwai/sound

Pull more sound fixes from Takashi Iwai:
 "The fixes for random bugs that have been reported lately in the game:
  a few fixes in ASoC dpam and wm_hubs bugs spotted by Coverity, a
  one-liner HD-audio fixup, and a fix for Oops with DPCM.

  They are not so critically urgent bugs, but all small and safe"

* tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: fix oops in snd_pcm_info() caused by ASoC DPCM
  ASoC: wm_hubs: Add missing break in hp_supply_event()
  ALSA: hda - Add a fixup for ASUS N76VZ
  ASoC: dapm: Return -ENOMEM in snd_soc_dapm_new_dai_widgets()
  ASoC: dapm: Fix source list debugfs outputs

9 years agoMerge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux
Linus Torvalds [Fri, 1 Nov 2013 19:22:47 +0000 (12:22 -0700)]
Merge tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux

Pull clock subsystem fixes from Mike Turquette.

* tag 'clk-fixes-for-linus' of git://git.linaro.org/people/mturquette/linux:
  clk: fixup argument order when setting VCO parameters
  clk: socfpga: Fix incorrect sdmmc clock name
  clk: armada-370: fix tclk frequencies
  clk: nomadik: set all timers to use 2.4 MHz TIMCLK

9 years agomemcg: remove incorrect underflow check
Greg Thelen [Fri, 1 Nov 2013 19:16:59 +0000 (12:16 -0700)]
memcg: remove incorrect underflow check

When a memcg is deleted mem_cgroup_reparent_charges() moves charged
memory to the parent memcg.  As of v3.11-9444-g3ea67d0 "memcg: add per
cgroup writeback pages accounting" there's bad pointer read.  The goal
was to check for counter underflow.  The counter is a per cpu counter
and there are two problems with the code:

 (1) per cpu access function isn't used, instead a naked pointer is used
     which easily causes oops.
 (2) the check doesn't sum all cpus

Test:
  $ cd /sys/fs/cgroup/memory
  $ mkdir x
  $ echo 3 > /proc/sys/vm/drop_caches
  $ (echo $BASHPID >> x/tasks && exec cat) &
  [1] 7154
  $ grep ^mapped x/memory.stat
  mapped_file 53248
  $ echo 7154 > tasks
  $ rmdir x
  <OOPS>

The fix is to remove the check.  It's currently dangerous and isn't
worth fixing it to use something expensive, such as
percpu_counter_sum(), for each reparented page.  __this_cpu_read() isn't
enough to fix this because there's no guarantees of the current cpus
count.  The only guarantees is that the sum of all per-cpu counter is >=
nr_pages.

Fixes: 3ea67d06e467 ("memcg: add per cgroup writeback pages accounting")
Reported-and-tested-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Greg Thelen <gthelen@google.com>
Reviewed-by: Sha Zhengju <handai.szj@taobao.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoUSB: serial: ftdi_sio: add id for Z3X Box device
Алексей Крамаренко [Fri, 1 Nov 2013 13:26:38 +0000 (17:26 +0400)]
USB: serial: ftdi_sio: add id for Z3X Box device

Custom VID/PID for Z3X Box device, popular tool for cellphone flashing.

Signed-off-by: Alexey E. Kramarenko <alexeyk13@yandex.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoUSB: Maintainers change for usb serial drivers
Greg KH [Wed, 30 Oct 2013 18:07:31 +0000 (11:07 -0700)]
USB: Maintainers change for usb serial drivers

Johan has been conned^Wgracious in accepting the maintainership of the
USB serial drivers, especially as he's been doing all of the real work
for the past few years.

At the same time, remove a bunch of old entries for USB serial drivers
that don't make sense anymore, given that the developers are no longer
around, and individual driver maintainerships for tiny things like this
is pretty pointless.

Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoRevert "USB: pl2303: restrict the divisor based baud rate encoding method to the...
Greg Kroah-Hartman [Fri, 1 Nov 2013 16:19:56 +0000 (09:19 -0700)]
Revert "USB: pl2303: restrict the divisor based baud rate encoding method to the "HX" chip type"

This reverts commit b8bdad608213caffa081a97d2e937e5fe08c4046.

Revert all of the pl2303 changes that went into 3.12-rc1 and -rc2 as
they cause regressions on some versions of the chip.  This will all be
revisited for later kernel versions when we can figure out how to handle
this in a way that does not break working devices.

Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoRevert "usb: pl2303: fix+improve the divsor based baud rate encoding method"
Greg Kroah-Hartman [Fri, 1 Nov 2013 16:19:45 +0000 (09:19 -0700)]
Revert "usb: pl2303: fix+improve the divsor based baud rate encoding method"

This reverts commit 57ce61aad748ceaa08c859da04043ad7dae7c15e.

Revert all of the pl2303 changes that went into 3.12-rc1 and -rc2 as
they cause regressions on some versions of the chip.  This will all be
revisited for later kernel versions when we can figure out how to handle
this in a way that does not break working devices.

Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoRevert "usb: pl2303: do not round to the next nearest standard baud rate for the...
Greg Kroah-Hartman [Fri, 1 Nov 2013 16:19:34 +0000 (09:19 -0700)]
Revert "usb: pl2303: do not round to the next nearest standard baud rate for the divisor based baud rate encoding method"

This reverts commit 75417d9f99f89ab241de69d7db15af5842b488c4.

Revert all of the pl2303 changes that went into 3.12-rc1 and -rc2 as
they cause regressions on some versions of the chip.  This will all be
revisited for later kernel versions when we can figure out how to handle
this in a way that does not break working devices.

Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Frank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>