]> git.neil.brown.name Git - gta04.git/log
gta04.git
8 years agoMerge branches 'dts', 'config', 'pwm-old', 'input', 'hacks', 'wifi', 'mmc', 'extcon... 4.2-gta04
NeilBrown [Tue, 28 Jul 2015 22:24:49 +0000 (08:24 +1000)]
Merge branches 'dts', 'config', 'pwm-old', 'input', 'hacks', 'wifi', 'mmc', 'extcon', 'uart_slave', 'audio', 'twl4030' and 'charger' into mainline

8 years agogta04: update defconfig for 4.2
NeilBrown [Tue, 28 Jul 2015 22:23:55 +0000 (08:23 +1000)]
gta04: update defconfig for 4.2

Signed-off-by: NeilBrown <neil@brown.name>
8 years agousb: phy: twl4030: test ID resistance to see if charger is present.
NeilBrown [Tue, 31 Mar 2015 02:25:35 +0000 (13:25 +1100)]
usb: phy: twl4030: test ID resistance to see if charger is present.

If an 'A' plug is inserted, ID should be pulled to ground.
If a 'B' plug, then ID should be floating.

If an Accessory Charger Adapter is inserted, then ID will
be neither grounded nor floating.  In this case tell the
USB subsystem that it is an A plug, and the battery
charging subsystem that it is a charger.

Fortunately, this will treat the Openmoko charger (and
other similar chargers) as a charger.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: find associated phy by more reliable means.
NeilBrown [Mon, 27 Apr 2015 02:05:37 +0000 (12:05 +1000)]
twl4030_charger: find associated phy by more reliable means.

twl4030_charger currently finds the associated phy
using usb_get_phy() which will return the first USB2 phy.
If your platform has multiple such phys (as mine does),
this is not reliable (and reliably fails on the GTA04).

Change to use devm_usb_get_phy_by_node(), having found the
node by looking for an appropriately named sibling in
device-tree.

This makes usb-charging dependent on correct device-tree
configuration.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: convert o module_platform_driver instead of ..._probe.
NeilBrown [Mon, 27 Apr 2015 02:05:36 +0000 (12:05 +1000)]
twl4030_charger: convert o module_platform_driver instead of ..._probe.

Drivers using module_platform_driver_probe cannot return
EPROBE_DEFER from the probe function, which makes them rather useless
these days...

Convert to module_platform_driver() so EPROBE_DEFER can be used.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agousb: phy: twl4030: allow charger to see usb current draw limits.
NeilBrown [Mon, 27 Apr 2015 02:05:31 +0000 (12:05 +1000)]
usb: phy: twl4030: allow charger to see usb current draw limits.

The charger needs to know when a USB gadget has been enumerated
and what the agreed maximum current was so that it can adjust
charging accordingly.

So define a "set_power()" function to record the permitted
draw, and pass a pointer to that when sending USB_EVENT_ENUMERATED
notification.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030-charger: register with extcon for USB cable notifications.
NeilBrown [Mon, 27 Jul 2015 04:49:03 +0000 (14:49 +1000)]
twl4030-charger: register with extcon for USB cable notifications.

The twl4030 usb phy reports cable events via extcon.
So register with extcon to receive those events and enable/disable
charging appropriately.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agophy: twl4030-usb: add extcon to report cable connections.
NeilBrown [Mon, 27 Jul 2015 04:49:02 +0000 (14:49 +1000)]
phy: twl4030-usb: add extcon to report cable connections.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agophy: twl4030-usb: add support for reading resistor on ID pin.
NeilBrown [Mon, 27 Jul 2015 04:49:02 +0000 (14:49 +1000)]
phy: twl4030-usb: add support for reading resistor on ID pin.

The twl4030 phy can measure, with low precision, the
resistance-to-ground of the ID pin.

Add a function to read the value, and export the result
via sysfs.

If the read fails, which it does sometimes, try again in 50msec.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: assume a 'charger' can supply maximum current.
NeilBrown [Sun, 12 Apr 2015 23:29:24 +0000 (09:29 +1000)]
twl4030_charger: assume a 'charger' can supply maximum current.

If it cannot, we will stop pulling more current when voltage drops.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: Increase current carefully while watching voltage.
NeilBrown [Sun, 12 Apr 2015 23:29:24 +0000 (09:29 +1000)]
twl4030_charger: Increase current carefully while watching voltage.

The USB Battery Charging spec (BC1.2) suggests a dedicated
charging port can deliver from 0.5 to 5.0A at between 4.75 and 5.25
volts.

To choose the "correct" current voltage setting requires a trial
and error approach: try to draw current and see if the voltage drops
too low.

Even with a configured Standard Downstream Port, it may not be possible
to reliably pull 500mA - depending on cable quality and source
quality I have reports of charging failure due to the voltage dropping
too low.

To address both these concerns, this patch introduce incremental
current setting.
The current pull from VBUS is increased in steps of 20mA every 100ms
until the target is reached or until the measure voltage drops below
4.75V.  If the voltage does go too low, the target current is reduced
by 20mA and kept there.

This applies to currents selected automatically, or to values
set via sysfs.  So setting a large value will cause the maximum
available to be used - up to the limit of 1.7A imposed by the
hardware.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: add ac/mode to match usb/mode
NeilBrown [Sun, 12 Apr 2015 23:29:23 +0000 (09:29 +1000)]
twl4030_charger: add ac/mode to match usb/mode

This allows AC charging to be turned off, much like usb charging.
"continuous" mode is not available though.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: add software controlled linear charging mode.
NeilBrown [Sun, 12 Apr 2015 23:29:23 +0000 (09:29 +1000)]
twl4030_charger: add software controlled linear charging mode.

Add a 'continuous' option for usb charging which enables
the "linear" charging mode of the twl4030.

Linear charging does a good job with not-so-reliable power sources.
Auto mode does not work well as it switches off when voltage drops
momentarily.  Care must be taken not to over-charge.

It was used with a bike hub dynamo since a year or so. In that case
there are automatically charging stops when the cyclist needs a break.

Orignal-by: Andreas Kemnade <andreas@kemnade.info>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: enable manual enable/disable of usb charging.
NeilBrown [Sun, 12 Apr 2015 23:29:22 +0000 (09:29 +1000)]
twl4030_charger: enable manual enable/disable of usb charging.

'off' or 'auto' to

 /sys/class/power/twl4030_usb/mode

will now enable or disable charging from USB port.  Normally this is
enabled on 'plug' and disabled on 'unplug'.
Unplug will still disable charging.  'plug' will only enable it if
'auto' if selected.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: only draw USB current as negotiated with host.
NeilBrown [Sun, 12 Apr 2015 23:29:22 +0000 (09:29 +1000)]
twl4030_charger: only draw USB current as negotiated with host.

If the phy has been told what current it can draw, it tells us
and now we use that number.

Note that 'vbus_draw' is in mA, while usb_cur is in uA.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: allow max_current to be managed via sysfs.
NeilBrown [Sun, 12 Apr 2015 23:29:22 +0000 (09:29 +1000)]
twl4030_charger: allow max_current to be managed via sysfs.

'max_current' sysfs attributes are created which allow the
max to be set.
Whenever a current source changes, the default is restored.
This will be followed by a uevent, so user-space can decide to
update again.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: distinguish between USB current and 'AC' current
NeilBrown [Sun, 12 Apr 2015 23:29:21 +0000 (09:29 +1000)]
twl4030_charger: distinguish between USB current and 'AC' current

The twl4030 charger has two current sources, 'USB' and 'AC'
(presumably "Accessory Charger").

If 'AC' is providing current, we should set the current limit
differently to when it isn't (and so USB is used).
So split 'cur' into 'usb_cur' and 'ac_cur' and use accordingly.

Now we must review the current setting on any interrupt or USB
event which might indicate that the charger-source has changed.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: allow fine control of charger current.
NeilBrown [Sun, 12 Apr 2015 23:29:21 +0000 (09:29 +1000)]
twl4030_charger: allow fine control of charger current.

The twl4030 allows control of the incoming current.
Part of this control is a 'CGAIN' setting which doubles
the range for half the precision.  This control affects
several different current setting, so all need to be updated
at once when CGAIN is changed.

With this patch, all of these current setting are managed
by the driver, but most are left at their default settings.

The current drawn is set to 500mA if the allow_usb module parameter is
set, and to 100mA otherwise.
More fine control will appear in later patches.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: split uA calculation into a function.
NeilBrown [Sun, 12 Apr 2015 23:29:20 +0000 (09:29 +1000)]
twl4030_charger: split uA calculation into a function.

We will need this calculation in other places, so
create functions to map between register value and uA value.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: trust phy to determine when USB power is available.
NeilBrown [Sun, 12 Apr 2015 23:29:20 +0000 (09:29 +1000)]
twl4030_charger: trust phy to determine when USB power is available.

The usb phy driver already determines when VBUS is available,
so repeating the test in the charger driver is pointless duplication.

On probe, process the last event from the phy, and from then on,
do whatever the phy tells us without double-checking.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030_charger: use runtime_pm to keep usb phy active while charging.
NeilBrown [Sun, 12 Apr 2015 23:29:20 +0000 (09:29 +1000)]
twl4030_charger: use runtime_pm to keep usb phy active while charging.

The twl4030 usb phy needs to be active while we are using
the USB VBUS as a current source for charging.
In particular, the usb3v1 regulator must be enabled and the
PHY_PWR_PHYPWD bit must be set to keep the phy powered.

commit ab37813f4093a5f59cb8e083cde277289dc72ed3
    twl4030_charger: Allow charger to control the regulator that feeds it

Gave the charger control over the regulator, but didn't resolve
the PHY_PWR_PHYPWD issue.

Now that both of these are controlled by runtime_pm in
phy-twl4030-usb, we can simply take a runtime_pm reference to the USB
phy whenever the charger wants to use it as a current source.

So this patch reverts the above commit, and adds the necessary
runtime_pm calls.

Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agopower: bq27x00_battery: allow reporting for capacity values when not calibrated.
NeilBrown [Mon, 27 Apr 2015 01:56:06 +0000 (11:56 +1000)]
power: bq27x00_battery: allow reporting for capacity values when not calibrated.

bq27000 devices can report if they have been calibrated yet
and the driver does not report capacity values in this circumstance
because they are unreliable.

It is sometimes convenient to see the values even though they
are not absolutely reliable - differences can be used to gauge power
usage.

So add a module parameter that allows the default to be reversed.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoOMAP3: give better error return from omap3_pm_suspend.
NeilBrown [Mon, 27 Apr 2015 01:56:01 +0000 (11:56 +1000)]
OMAP3: give better error return from omap3_pm_suspend.

The error from this function propagates all the way up
to user-space.  So we should only return an error
when we don't suspend..

Currently it returns ENOENT if not all modules entered the target
state, even if it did suspend.
With patch, it instead returns ENOENT if it never tried to enter
suspend.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoOMAP: don't init voltages until after cpufreq initialised.
NeilBrown [Mon, 27 Apr 2015 01:56:00 +0000 (11:56 +1000)]
OMAP: don't init voltages until after cpufreq initialised.

We need to init cpufreq for the opp tables to be loaded, else
init_voltages will fails.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoHSO: only disable net on suspend if enabled.
NeilBrown [Mon, 27 Apr 2015 01:55:59 +0000 (11:55 +1000)]
HSO: only disable net on suspend if enabled.

8 years agonet/wireless: get rid if a warning.
NeilBrown [Mon, 27 Apr 2015 01:55:58 +0000 (11:55 +1000)]
net/wireless: get rid if a warning.

This warning always triggers on shutdown of libertas.
It seems benign.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agomfd: twl4030: Remove IRQF_EARLY_SUSPEND for chained interrupts.
NeilBrown [Mon, 27 Jul 2015 04:37:11 +0000 (14:37 +1000)]
mfd: twl4030: Remove IRQF_EARLY_SUSPEND for chained interrupts.

This flag was  added by:

commit 8b41669ceba0c2d4c09d69ccb9a3458953dae784
    mfd: twl4030: Fix chained irq handling on resume from suspend

to prevent interrupt storms when the primary interrupt is enabled but
the chained (nested) interrupt is still disabled.
This is no longer needed since chained interrupts a no-longer
disabled across suspend, and it is not what IRQF_EARLY_RESUME
is really meant for.

So it can safely be removed.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoMerge git://git.infradead.org/battery-2.6 into hacks
NeilBrown [Mon, 27 Jul 2015 05:02:46 +0000 (15:02 +1000)]
Merge git://git.infradead.org/battery-2.6 into hacks

8 years agoMerge git://git.infradead.org/battery-2.6 into charger
NeilBrown [Mon, 27 Jul 2015 04:55:21 +0000 (14:55 +1000)]
Merge git://git.infradead.org/battery-2.6 into charger

8 years agoDisable wakeup on charger and AC attach.
NeilBrown [Mon, 27 Jul 2015 04:46:28 +0000 (14:46 +1000)]
Disable wakeup on charger and AC attach.

This ensures that the device doesn't turn on again once it has
been turned off.

Not sure this is really the right way to do it though.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoASoC: twl4030: enable routing audio to 'voice' interface.
NeilBrown [Mon, 27 Jul 2015 04:43:49 +0000 (14:43 +1000)]
ASoC: twl4030: enable routing audio to 'voice' interface.

When 'voice' is some external connection, we power up
the downlink when the downline amplifier is not muted,
and power up the uplink when a new switch "Voice Uplink" is
turned on.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoASoC: twl4030: allow voice port to be connected externally.
NeilBrown [Mon, 27 Jul 2015 04:43:48 +0000 (14:43 +1000)]
ASoC: twl4030: allow voice port to be connected externally.

If voice port on twl4030 is not connected to a McBSP (or similar)
then we cannot configure the format the way we normally do for a DAI.

In this case, allow the platform data/devicetree to specify a format
which is put into effect when the 'voice' mode is selected.

If there is a voice connection, then we keep the twl side tri-stated
when not being driven.  This allows for the device to also be
connected to a McBSP if desired.

This is needed if the 'voice' port directly connects to a mobile-phone
module.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoASoC: twl4030: don't report EBUSY if no change requested.
NeilBrown [Mon, 27 Jul 2015 04:43:48 +0000 (14:43 +1000)]
ASoC: twl4030: don't report EBUSY if no change requested.

"mode" must not be changed when active.
However if a request is received to set the mode to what it currently
is, that is also rejected when active, which causes confusing
error messages.

So check first and if no change is actually requested, don't report
an error.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotty/slaves: add a driver to power on/off UART attached devices.
NeilBrown [Mon, 27 Jul 2015 04:42:41 +0000 (14:42 +1000)]
tty/slaves: add a driver to power on/off UART attached devices.

If a platform has a particular device permanently attached to a UART,
there may be out-of-band signaling necessary to power the device
on and off.

This driver controls that signalling for a number of different devices.
It can
 - enable/disable a regulator
 - toggle a GPIO
 - register an 'rfkill' which can force the device to be off.

When the rfkill is absent or unblocked, the device will be on when the
associated tty device is open, and closed otherwise.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoTTY: add support for uart_slave devices.
NeilBrown [Mon, 27 Jul 2015 04:42:40 +0000 (14:42 +1000)]
TTY: add support for uart_slave devices.

A "uart slave" is a device permanently connected via UART.
Such a device may need its own driver, e.g. for powering
it up on tty open and powering it down on tty release.

When a device is connected to a UART by a 'standard' bus, such as
RS-232, signaling for power control typically uses "DTR".  When the
connection is permanent, as is common on "embedded" boards, separate
signaling may be needed and this requires a separate driver.

uart-slave is a new bus-type which drivers can be written and devices
created.

A "uart slave" device is declared as a child of the uart in
device-tree:

&uart1 {
    bluetooth {
        compatible = "wi2wi,w2cbw003";
        vdd-supply = <&vaux4>;
    };
};

This device will be inserted in the driver-model tree between the uart
and the tty.

The uart-slave driver can replace any of the tty_operations functions
so a call by the tty can be intercepted before being handled by the
uart.

When the tty port is initialized, the uart_slave device is created and
waits for a driver to be bound to it.  Once this happens the tty
device, which was previously initialized, will be added.  This slave
is now considered "finalized".

Any "finalized" slaves will be removed when the tty device is
unregistered.  e.g. by destruct_tty_driver.
While slaves are non-finalized they hold a reference to the tty driver
to prevent destruct_tty_driver from being called, as it cannot find
and free slave devices.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoTTY: split tty_register_device_attr into 'initialize' and 'add' parts.
NeilBrown [Mon, 27 Jul 2015 04:42:39 +0000 (14:42 +1000)]
TTY: split tty_register_device_attr into 'initialize' and 'add' parts.

This provides seperate
  tty_device_initialize_attr()
and
  tty_device_add_attr()

similar to device_initialize() and device_add().

Similiarly tty_port_initialize_device_attr() is added to match
tty_port_register_device_attr().

It will allow a client to separate initalization and adding of the
device.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoTTY: use class_find_device to find port in uart_suspend/resume.
NeilBrown [Mon, 27 Jul 2015 04:42:38 +0000 (14:42 +1000)]
TTY: use class_find_device to find port in uart_suspend/resume.

uart_{suspend,resume}_port search the children of a uart device
to find a particular tty device.
This requires all the ttys to be direct children of the uart.

A future patch will allow a 'tty_slave' to intervene between
the port and the uart, voiding this requirement.

So change to use class_find_device.  This is made possible by
exporting a "tty_find_device" from tty_io.c.

This new "tty_find_device" is very similar to the existing
tty_get_device() which has a single caller, so discard
tty_get_device() and just use tty_find_device().

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoextcon-gpio: add devicetree support.
NeilBrown [Mon, 27 Jul 2015 04:41:47 +0000 (14:41 +1000)]
extcon-gpio: add devicetree support.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agommc/host: switch to narrow bus when idle and SDIO irqs enable.
NeilBrown [Mon, 27 Jul 2015 04:40:40 +0000 (14:40 +1000)]
mmc/host: switch to narrow bus when idle and SDIO irqs enable.

The mmc controller remains powered on when bus is 4bit and
irqs are enabled.
To save power, switch to narrow bus when host is idle
and the wide bus keeping the controller powered.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agommc/core: add pm_runtime tracking to mmc_host devices.
NeilBrown [Mon, 27 Jul 2015 04:40:39 +0000 (14:40 +1000)]
mmc/core: add pm_runtime tracking to mmc_host devices.

Enable runtime pm for mmc_host devices, and take a
reference while the host is claimed.

Use an autosuspend timeout so that the device isn't
put to sleep until we have been idle for a while.

Set the parent to ignore children, so the PM status of
the host does not affect the controller at all.

This functionality will be used in a future patch to allow
commands to be sent to the device when the host is idle.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agommc: core: don't sleep in 4bit mode when sdio interrupts enabled.
NeilBrown [Mon, 27 Jul 2015 04:40:39 +0000 (14:40 +1000)]
mmc: core: don't sleep in 4bit mode when sdio interrupts enabled.

According to section 7.1.2 of

http://www.sandisk.com/media/File/OEM/Manuals/SD_SDIO_specsv1.pdf

    In the case where the interrupt mechanism is used to wake the host while
    the card is in a low power state (i.e. no clocks), Both the card and the
    host shall be placed into the 1-bit SD mode prior to stopping the clock.

This is particularly important for the Marvell "libertas" wifi chip
in the GTA04.  While in 4-bit mode it will only signal an interrupt
when the clock is running (which is why setting CLKEXTFREE is
important).
In 1-bit mode, the interrupt is asynchronous (explained in OMAP3
TRM description of the CIRQ flag to MMCHS_STAT:

  In 1-bit mode, interrupt source is asynchronous (can be a source of
  asynchronous wakeup).
  In 4-bit mode, interrupt source is sampled during the interrupt
  cycle.

)

So when SDIO interrupts are enabled and the bus is in 4-bit mode,
prevent the controller from entering runtime suspend by taking
a pm_runtime reference.

This may reduce power saving, but will be more correct.  A subsequent
patch will switch to 1-bit mode when idle, thus restoring the power
saving.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agommc: omap_hsmmc: factor out common "request_done" code.
NeilBrown [Mon, 27 Jul 2015 04:40:38 +0000 (14:40 +1000)]
mmc: omap_hsmmc: factor out common "request_done" code.

Every time that mmc_request_done() is called, we also call
pm_runtime_mark_last_busy and pm_runtime_put_autosuspend.

So create a new __omap_hsmmc_request_done() to package all
of those together.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agohso: fix refcnt leak in recent patch.
NeilBrown [Mon, 27 Apr 2015 01:57:13 +0000 (11:57 +1000)]
hso: fix refcnt leak in recent patch.

Prior to
commit 29bd3bc1194c624ce863cab2a7da9bc1f0c3b47b
    hso: fix crash when device disappears while serial port is open

a kref_get on serial->parent->ref would be taken on each open,
and it would be kref_put on each close.

Now the kref_put happens when the tty_struct is finally put (via
the 'cleanup') providing tty->driver_data has been set.
So the kref_get must be called exact once when tty->driver_data is
set.

With the current code, if the first open fails the kref_get() is never
called, but the kref_put() is called, leaving to a crash.

So change the kref_get call to happen exactly when ->driver_data is
changed from NULL to non-NULL.

Fixes: commit 29bd3bc1194c624ce863cab2a7da9bc1f0c3b47b
Cc: stable@vger.kernel.org (v4.0)
Cc: Olivier Sobrie <olivier@sobrie.be>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agohso: remove duplicate tty_unregister_device in error path.
NeilBrown [Mon, 27 Apr 2015 01:57:12 +0000 (11:57 +1000)]
hso: remove duplicate tty_unregister_device in error path.

If hso_serial_common_create() fails when called from
hso_create_mux_serial_device(), the latter will call
tty_unregister_device().

However this has already been done by hso_serial_common_create()
calling hso_serial_tty_unregister().

This duplication has been present since the driver was added to Linux.

So remove the extra call.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agommc: core: allow a reset gpio to be configured.
NeilBrown [Mon, 27 Jul 2015 04:39:06 +0000 (14:39 +1000)]
mmc: core: allow a reset gpio to be configured.

If the regulator supplying an SDIO device is shared
with another device, the turning the regulator 'on' and 'off'
will not actually cycle power and so will not reset
the device.

This is particularly a problem for some wi2si wireless modules which
have a BT module on chip and can share power lines.
Without the power-cycle, subsequent reset commands fail.

So allow a 'reset' gpio to be specified.  If provided, the
line is asserted during power-up.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoMMC sdio_irq: don't poll for interrupts when powered off.
NeilBrown [Mon, 27 Jul 2015 04:39:05 +0000 (14:39 +1000)]
MMC sdio_irq: don't poll for interrupts when powered off.

The sdio irq poll thread can continue polling while
the device is powered-off (e.g. during suspend/resume).
If it tries to talk to a card that isn't there, bad things
happen.
So simply avoid the poll unless MMC_POWER_ON.

Without this, sdio_irq_thread hangs in mmc_wait_for_req
from process_sdio_pending_irqs during resume, and
nothing else can claim the host.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agolibertas/sdio: simplify suspend/resume.
NeilBrown [Mon, 27 Jul 2015 04:39:04 +0000 (14:39 +1000)]
libertas/sdio: simplify suspend/resume.

The current suspend/resume code is wrong.
Returning -ENOSYS does not cause the device to be powered
off, it causes the suspend to fail.

If the card is currently active (interface is 'up'), we do
need to power-off the card, and then power-on again at resume.

This doesn't handle WoW, and is currently just a hack.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agolibertas/sdio: make power management dependant on MMC_CAP_POWER_OFF_CARD
NeilBrown [Mon, 27 Jul 2015 04:39:04 +0000 (14:39 +1000)]
libertas/sdio: make power management dependant on MMC_CAP_POWER_OFF_CARD

If this flag isn't set, then one runtime_pm reference will have
been taken, so dropping the ref in if_sdio_finish_power_on()
causes the count to go negative.

So make all runtime_pm conditional on the flag.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotsc2007: allow system suspend while screen is being touched.
NeilBrown [Mon, 27 Jul 2015 04:36:25 +0000 (14:36 +1000)]
tsc2007: allow system suspend while screen is being touched.

While there is any pressure detected on the touchscreen,
tsc2007_soft_irq() will loop to report events.

When the system enters suspend, suspend_device_irqs() will
call synchronize_irq() which will wait for the irq thread to
go idle.  This blocks as long as the touchscreen is being touched,
which isn't ideal.

To fix this we:
 - abort the loop when suspended, and in that case don't
   report an 'up' event.
 - add a suspend callback which marks the device as suspended
   and wakes the loop so it can exit, and
 - add a resume callback which clears the 'suspended' flag and
   wakes the thread so it can check if there is anything more to do.

With this, suspend is not blocked by a touch on the screen, and
a user-space process will see corrupt up/down events.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agogpio-keys: ensure we don't miss key-presses during resume.
NeilBrown [Mon, 27 Jul 2015 04:36:25 +0000 (14:36 +1000)]
gpio-keys: ensure we don't miss key-presses during resume.

If the latency of resume means we don't poll the key status until
after it has been released, we can lose the keypress which woke the
device.

So on each interrupt, record that a press is pending, and in that
case, report both the up and down event.  One might be swallowed by
the input layer if there was no change, but the result will be that
every interrupt will produce at least one event.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agotwl4030 power button: don't lose presses.
NeilBrown [Mon, 27 Jul 2015 04:36:25 +0000 (14:36 +1000)]
twl4030 power button: don't lose presses.

If we press and release the power button before the press interrupt is
handled (can happen on resume) we lose the press event so the release
event is ignored and we don't know what happened to cause the wakeup.

So make sure that each interrupt handled does generate an event -
possibly two.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agopwm-bl: always enable pwm at power-on.
NeilBrown [Mon, 27 Jul 2015 04:35:29 +0000 (14:35 +1000)]
pwm-bl: always enable pwm at power-on.

Some pwms (omap-pwm) need to disable the pwm before setting
configuration.
They rely on pwm_enable() being called after pwm_config.
Prior to:

  commit 97c38437115aa0c3fb2d50c488814b503ba529e0
  Author: Thierry Reding <treding@nvidia.com>
  Date:   Wed Oct 2 18:01:02 2013 +0200

      pwm-backlight: Track enable state

This would always happen.  Now it doesn't.
Using the ->enabled state to protect calls to pwm_enable/disable
is pointless as pwm already has it's own 'enabled' state.

So when pwm_backlight_power_on is called, always call pwn_enable().
This ensures that if pwm_config() needed to disable the pwm, it will
be re-enabled.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agopwm: omap: Add PWM support using dual-mode timers
NeilBrown [Mon, 27 Jul 2015 04:35:29 +0000 (14:35 +1000)]
pwm: omap: Add PWM support using dual-mode timers

This patch is based on an earlier patch by Grant Erickson
which provided PWM devices using the 'legacy' interface.

This driver instead uses the new framework interface.

Platform data must be provided to identify which dmtimer to use.

Lots of cleanup and inprovements thanks to Thierry Reding
and Jon Hunter.

Cc: Grant Erickson <marathon96@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoARM: dts: omap3-gta04: add voicefmt info to codec
NeilBrown [Mon, 27 Apr 2015 01:49:21 +0000 (11:49 +1000)]
ARM: dts: omap3-gta04: add voicefmt info to codec

This allow routing voice from gsm modem.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoARM: dts: omap3-gta04: add dts config for GPS.
NeilBrown [Mon, 27 Apr 2015 01:49:20 +0000 (11:49 +1000)]
ARM: dts: omap3-gta04: add dts config for GPS.

GPS is a slave of UART2, needs a regulator to power the
antenna, and reconfigures the RX line as a GPIO when idle.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoARM: dts: omap3-gta04: add bluetooth slave-tty device to DTS
NeilBrown [Mon, 27 Apr 2015 01:49:19 +0000 (11:49 +1000)]
ARM: dts: omap3-gta04: add bluetooth slave-tty device to DTS

This needs vaux4 to be turned on when the tty is opened.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoARM: dts: omap3-gta04: add extcon to detect antenna status
NeilBrown [Mon, 27 Apr 2015 01:49:18 +0000 (11:49 +1000)]
ARM: dts: omap3-gta04: add extcon to detect antenna status

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoARM: dts: omap3-gta04: add reset line for wifi in mmc1
NeilBrown [Mon, 27 Apr 2015 01:49:17 +0000 (11:49 +1000)]
ARM: dts: omap3-gta04: add reset line for wifi in mmc1

This ensures it gets reset properly.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoARM: dts: omap3-gta04: add gpio-keys for 'incoming' signal from Option module.
NeilBrown [Mon, 27 Apr 2015 01:49:16 +0000 (11:49 +1000)]
ARM: dts: omap3-gta04: add gpio-keys for 'incoming' signal from Option module.

So we can wake up when a phone call or SMS arrives.

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoARM: dts: omap3-gta04: add backlight to dts
NeilBrown [Mon, 27 Jul 2015 04:32:23 +0000 (14:32 +1000)]
ARM: dts: omap3-gta04: add backlight to dts

Signed-off-by: NeilBrown <neilb@suse.de>
8 years agoARM: dts: omap3-gta04: uart4 is not connected, so mark it "disabled"
NeilBrown [Mon, 27 Jul 2015 04:32:22 +0000 (14:32 +1000)]
ARM: dts: omap3-gta04: uart4 is not connected, so mark it "disabled"

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoARM: dts: omap3-gta04: add support for sdio interrupts.
NeilBrown [Mon, 27 Jul 2015 04:32:21 +0000 (14:32 +1000)]
ARM: dts: omap3-gta04: add support for sdio interrupts.

We need to arrange for the DAT1 line to become GPIO
when the mmc host is asleep, so interrupts can wake
the device.

Signed-off-by: NeilBrown <neil@brown.name>
8 years agoLinux 4.2-rc4
Linus Torvalds [Sun, 26 Jul 2015 19:26:21 +0000 (12:26 -0700)]
Linux 4.2-rc4

8 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 26 Jul 2015 18:46:32 +0000 (11:46 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fix from Thomas Gleixner:
 "A single fix for the intel cqm perf facility to prevent IPIs from
  interrupt context"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf/x86/intel/cqm: Return cached counter value from IRQ context

8 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 26 Jul 2015 18:14:04 +0000 (11:14 -0700)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
 "This update contains:

   - the manual revert of the SYSCALL32 changes which caused a
     regression

   - a fix for the MPX vma handling

   - three fixes for the ioremap 'is ram' checks.

   - PAT warning fixes

   - a trivial fix for the size calculation of TLB tracepoints

   - handle old EFI structures gracefully

  This also contains a PAT fix from Jan plus a revert thereof.  Toshi
  explained why the code is correct"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mm/pat: Revert 'Adjust default caching mode translation tables'
  x86/asm/entry/32: Revert 'Do not use R9 in SYSCALL32' commit
  x86/mm: Fix newly introduced printk format warnings
  mm: Fix bugs in region_is_ram()
  x86/mm: Remove region_is_ram() call from ioremap
  x86/mm: Move warning from __ioremap_check_ram() to the call site
  x86/mm/pat, drivers/media/ivtv: Move the PAT warning and replace WARN() with pr_warn()
  x86/mm/pat, drivers/infiniband/ipath: Replace WARN() with pr_warn()
  x86/mm/pat: Adjust default caching mode translation tables
  x86/fpu: Disable dependent CPU features on "noxsave"
  x86/mpx: Do not set ->vm_ops on MPX VMAs
  x86/mm: Add parenthesis for TLB tracepoint size calculation
  efi: Handle memory error structures produced based on old versions of standard

8 years agox86/mm/pat: Revert 'Adjust default caching mode translation tables'
Thomas Gleixner [Sun, 26 Jul 2015 08:27:37 +0000 (10:27 +0200)]
x86/mm/pat: Revert 'Adjust default caching mode translation tables'

Toshi explains:

"No, the default values need to be set to the fallback types,
 i.e. minimal supported mode.  For WC and WT, UC is the fallback type.

 When PAT is disabled, pat_init() does update the tables below to
 enable WT per the default BIOS setup.  However, when PAT is enabled,
 but CPU has PAT -errata, WT falls back to UC per the default values."

Revert: ca1fec58bc6a 'x86/mm/pat: Adjust default caching mode translation tables'
Requested-by: Toshi Kani <toshi.kani@hp.com>
Cc: Jan Beulich <jbeulich@suse.de>
Link: http://lkml.kernel.org/r/1437577776.3214.252.camel@hp.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
8 years agoperf/x86/intel/cqm: Return cached counter value from IRQ context
Matt Fleming [Tue, 21 Jul 2015 14:55:09 +0000 (15:55 +0100)]
perf/x86/intel/cqm: Return cached counter value from IRQ context

Peter reported the following potential crash which I was able to
reproduce with his test program,

[  148.765788] ------------[ cut here ]------------
[  148.765796] WARNING: CPU: 34 PID: 2840 at kernel/smp.c:417 smp_call_function_many+0xb6/0x260()
[  148.765797] Modules linked in:
[  148.765800] CPU: 34 PID: 2840 Comm: perf Not tainted 4.2.0-rc1+ #4
[  148.765803]  ffffffff81cdc398 ffff88085f105950 ffffffff818bdfd5 0000000000000007
[  148.765805]  0000000000000000 ffff88085f105990 ffffffff810e413a 0000000000000000
[  148.765807]  ffffffff82301080 0000000000000022 ffffffff8107f640 ffffffff8107f640
[  148.765809] Call Trace:
[  148.765810]  <NMI>  [<ffffffff818bdfd5>] dump_stack+0x45/0x57
[  148.765818]  [<ffffffff810e413a>] warn_slowpath_common+0x8a/0xc0
[  148.765822]  [<ffffffff8107f640>] ? intel_cqm_stable+0x60/0x60
[  148.765824]  [<ffffffff8107f640>] ? intel_cqm_stable+0x60/0x60
[  148.765825]  [<ffffffff810e422a>] warn_slowpath_null+0x1a/0x20
[  148.765827]  [<ffffffff811613f6>] smp_call_function_many+0xb6/0x260
[  148.765829]  [<ffffffff8107f640>] ? intel_cqm_stable+0x60/0x60
[  148.765831]  [<ffffffff81161748>] on_each_cpu_mask+0x28/0x60
[  148.765832]  [<ffffffff8107f6ef>] intel_cqm_event_count+0x7f/0xe0
[  148.765836]  [<ffffffff811cdd35>] perf_output_read+0x2a5/0x400
[  148.765839]  [<ffffffff811d2e5a>] perf_output_sample+0x31a/0x590
[  148.765840]  [<ffffffff811d333d>] ? perf_prepare_sample+0x26d/0x380
[  148.765841]  [<ffffffff811d3497>] perf_event_output+0x47/0x60
[  148.765843]  [<ffffffff811d36c5>] __perf_event_overflow+0x215/0x240
[  148.765844]  [<ffffffff811d4124>] perf_event_overflow+0x14/0x20
[  148.765847]  [<ffffffff8107e7f4>] intel_pmu_handle_irq+0x1d4/0x440
[  148.765849]  [<ffffffff811d07a6>] ? __perf_event_task_sched_in+0x36/0xa0
[  148.765853]  [<ffffffff81219bad>] ? vunmap_page_range+0x19d/0x2f0
[  148.765854]  [<ffffffff81219d11>] ? unmap_kernel_range_noflush+0x11/0x20
[  148.765859]  [<ffffffff814ce6fe>] ? ghes_copy_tofrom_phys+0x11e/0x2a0
[  148.765863]  [<ffffffff8109e5db>] ? native_apic_msr_write+0x2b/0x30
[  148.765865]  [<ffffffff8109e44d>] ? x2apic_send_IPI_self+0x1d/0x20
[  148.765869]  [<ffffffff81065135>] ? arch_irq_work_raise+0x35/0x40
[  148.765872]  [<ffffffff811c8d86>] ? irq_work_queue+0x66/0x80
[  148.765875]  [<ffffffff81075306>] perf_event_nmi_handler+0x26/0x40
[  148.765877]  [<ffffffff81063ed9>] nmi_handle+0x79/0x100
[  148.765879]  [<ffffffff81064422>] default_do_nmi+0x42/0x100
[  148.765880]  [<ffffffff81064563>] do_nmi+0x83/0xb0
[  148.765884]  [<ffffffff818c7c0f>] end_repeat_nmi+0x1e/0x2e
[  148.765886]  [<ffffffff811d07a6>] ? __perf_event_task_sched_in+0x36/0xa0
[  148.765888]  [<ffffffff811d07a6>] ? __perf_event_task_sched_in+0x36/0xa0
[  148.765890]  [<ffffffff811d07a6>] ? __perf_event_task_sched_in+0x36/0xa0
[  148.765891]  <<EOE>>  [<ffffffff8110ab66>] finish_task_switch+0x156/0x210
[  148.765898]  [<ffffffff818c1671>] __schedule+0x341/0x920
[  148.765899]  [<ffffffff818c1c87>] schedule+0x37/0x80
[  148.765903]  [<ffffffff810ae1af>] ? do_page_fault+0x2f/0x80
[  148.765905]  [<ffffffff818c1f4a>] schedule_user+0x1a/0x50
[  148.765907]  [<ffffffff818c666c>] retint_careful+0x14/0x32
[  148.765908] ---[ end trace e33ff2be78e14901 ]---

The CQM task events are not safe to be called from within interrupt
context because they require performing an IPI to read the counter value
on all sockets. And performing IPIs from within IRQ context is a
"no-no".

Make do with the last read counter value currently event in
event->count when we're invoked in this context.

Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vikas Shivappa <vikas.shivappa@intel.com>
Cc: Kanaka Juvva <kanaka.d.juvva@intel.com>
Cc: Will Auld <will.auld@intel.com>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/1437490509-15373-1-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
8 years agoMerge tag 'usb-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Sun, 26 Jul 2015 03:11:12 +0000 (20:11 -0700)]
Merge tag 'usb-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here's a few USB and PHY fixes for 4.2-rc4.

  Nothing major, the shortlog has the full details.

  All of these have been in linux-next successfully"

* tag 'usb-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (21 commits)
  USB: OHCI: fix bad #define in ohci-tmio.c
  cdc-acm: Destroy acm_minors IDR on module exit
  usb-storage: Add ignore-device quirk for gm12u320 based usb mini projectors
  usb-storage: ignore ZTE MF 823 card reader in mode 0x1225
  USB: OHCI: Fix race between ED unlink and URB submission
  usb: core: lpm: set lpm_capable for root hub device
  xhci: do not report PLC when link is in internal resume state
  xhci: prevent bus_suspend if SS port resuming in phase 1
  xhci: report U3 when link is in resume state
  xhci: Calculate old endpoints correctly on device reset
  usb: xhci: Bugfix for NULL pointer deference in xhci_endpoint_init() function
  xhci: Workaround to get D3 working in Intel xHCI
  xhci: call BIOS workaround to enable runtime suspend on Intel Braswell
  usb: dwc3: Reset the transfer resource index on SET_INTERFACE
  usb: gadget: udc: core: Fix argument of dma_map_single for IOMMU
  usb: gadget: mv_udc_core: fix phy_regs I/O memory leak
  usb: ulpi: ulpi_init should be executed in subsys_initcall
  phy: berlin-usb: fix divider for BG2
  phy: berlin-usb: fix divider for BG2CD
  phy/pxa: add HAS_IOMEM dependency
  ...

8 years agoMerge tag 'tty-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Linus Torvalds [Sun, 26 Jul 2015 03:05:07 +0000 (20:05 -0700)]
Merge tag 'tty-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty/serial driver fixes from Greg KH:
 "Here are a number of small serial and tty fixes for reported issues.

  All have been in linux-next successfully"

* tag 'tty-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  tty: vt: Fix !TASK_RUNNING diagnostic warning from paste_selection()
  serial: core: Fix crashes while echoing when closing
  m32r: Add ioreadXX/iowriteXX big-endian mmio accessors
  Revert "serial: imx: initialized DMA w/o HW flow enabled"
  sc16is7xx: fix FIFO address of secondary UART
  sc16is7xx: fix Kconfig dependencies
  serial: etraxfs-uart: Fix release etraxfs_uart_ports
  tty/vt: Fix the memory leak in visual_init
  serial: amba-pl011: Fix devm_ioremap_resource return value check
  n_tty: signal and flush atomically

8 years agoMerge tag 'staging-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 26 Jul 2015 03:03:10 +0000 (20:03 -0700)]
Merge tag 'staging-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver fixes from Greg KH:
 "Here are a number of iio and staging driver fixes for reported issues
  for 4.2-rc4.

  All have been in linux-next for a while with no problems"

* tag 'staging-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (34 commits)
  iio:light:stk3310: make endianness independent of host
  iio:light:stk3310: move device register to end of probe
  iio: mma8452: use iio event type IIO_EV_TYPE_MAG
  iio: mcp320x: Fix NULL pointer dereference
  iio: adc: vf610: fix the adc register read fail issue
  iio: mlx96014: Replace offset sign
  iio: magnetometer: mmc35240: fix SET/RESET sequence
  iio: magnetometer: mmc35240: Fix SET/RESET mask
  iio: magnetometer: mmc35240: Fix crash in pm suspend
  iio:magnetometer:bmc150_magn: output intended variable
  iio:magnetometer:bmc150_magn: add regmap dependency
  staging: vt6656: check ieee80211_bss_conf bssid not NULL
  staging: vt6655: check ieee80211_bss_conf bssid not NULL
  iio: tmp006: Check channel info on write
  iio: sx9500: Add missing init in sx9500_buffer_pre{en,dis}able()
  iio:light:ltr501: fix regmap dependency
  iio:light:ltr501: fix variable in ltr501_init
  iio: sx9500: fix bug in compensation code
  iio: sx9500: rework error handling of raw readings
  iio: magnetometer: mmc35240: fix available sampling frequencies
  ...

8 years agoMerge tag 'char-misc-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sun, 26 Jul 2015 02:50:59 +0000 (19:50 -0700)]
Merge tag 'char-misc-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc driver fixes from Greg KH:
 "Here are some char and misc driver fixes for reported issues.

  One parport patch is reverted as it was incorrect, thanks to testing
  by the 0-day bot"

* tag 'char-misc-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  parport: Revert "parport: fix memory leak"
  mei: prevent unloading mei hw modules while the device is opened.
  misc: mic: scif bug fix for vmalloc_to_page crash
  parport: fix freeing freed memory
  parport: fix memory leak
  parport: fix error handling

8 years agoparport: Revert "parport: fix memory leak"
Sudip Mukherjee [Sat, 25 Jul 2015 07:49:40 +0000 (13:19 +0530)]
parport: Revert "parport: fix memory leak"

This reverts commit 23c405912b88 ("parport: fix memory leak")

par_dev->state was already being removed in parport_unregister_device().

Reported-by: Ying Huang <ying.huang@intel.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoMerge tag 'trace-v4.2-rc2-fix3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 25 Jul 2015 18:42:54 +0000 (11:42 -0700)]
Merge tag 'trace-v4.2-rc2-fix3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull ftrace fix from Steven Rostedt:
 "Back in 3.16 the ftrace code was redesigned and cleaned up to remove
  the double iteration list (one for registered ftrace ops, and one for
  registered "global" ops), to just use one list.  That simplified the
  code but also broke the function tracing filtering on pid.

  This updates the code to handle the filtering again with the new
  logic"

* tag 'trace-v4.2-rc2-fix3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  ftrace: Fix breakage of set_ftrace_pid

8 years agoMerge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw...
Linus Torvalds [Sat, 25 Jul 2015 18:36:12 +0000 (11:36 -0700)]
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm

Pull libnvdimm fix from Dan Williams:
 "A minor fix for the libnvdimm subsystem.

  This is not critical.  The problem can be worked around in userspace
  by putting the namespace temporarily into raw mode
  (ndctl_namespace_set_raw_mode() from libndctl), but that is awkward
  for management utilities.

* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm:
  libnvdimm: fix namespace seed creation

8 years agoMerge tag 'md/4.2-fixes' of git://neil.brown.name/md
Linus Torvalds [Sat, 25 Jul 2015 18:24:58 +0000 (11:24 -0700)]
Merge tag 'md/4.2-fixes' of git://neil.brown.name/md

Pull md fixes from Neil Brown:
 "Some md fixes for 4.2

  Several are tagged for -stable.
  A few aren't because they are not very, serious or because they are in
  the 'experimental' cluster code"

* tag 'md/4.2-fixes' of git://neil.brown.name/md:
  md/raid5: clear R5_NeedReplace when no longer needed.
  Fix read-balancing during node failure
  md-cluster: fix bitmap sub-offset in bitmap_read_sb
  md: Return error if request_module fails and returns positive value
  md: Skip cluster setup in case of error while reading bitmap
  md/raid1: fix test for 'was read error from last working device'.
  md: Skip cluster setup for dm-raid
  md: flush ->event_work before stopping array.
  md/raid10: always set reshape_safe when initializing reshape_position.
  md/raid5: avoid races when changing cache size.

8 years agoMerge tag 'for-linus-20150724' of git://git.infradead.org/linux-mtd
Linus Torvalds [Sat, 25 Jul 2015 18:19:38 +0000 (11:19 -0700)]
Merge tag 'for-linus-20150724' of git://git.infradead.org/linux-mtd

Pull MTD fixes from Brian Norris:
 "Two trivial updates.  I meant to send these much earlier, but I've
  been preoccupied.

   - Add MAINTAINERS entry for diskonchip g3 driver

   - Fix an overlooked conflict in bitfield value assignments

  The latter update is a bit overdue, but there's no reason to wait any
  longer"

* tag 'for-linus-20150724' of git://git.infradead.org/linux-mtd:
  mtd: nand: Fix NAND_USE_BOUNCE_BUFFER flag conflict
  MAINTAINERS: mtd: docg3: add docg3 maintainer

8 years agolibnvdimm: fix namespace seed creation
Dan Williams [Sat, 25 Jul 2015 03:42:34 +0000 (23:42 -0400)]
libnvdimm: fix namespace seed creation

A new BLK namespace "seed" device is created whenever the current seed
is successfully probed.  However, if that namespace is assigned to a BTT
it may never directly experience a successful probe as it is a
subordinate device to a BTT configuration.

The effect of the current code is that no new namespaces can be
instantiated, after the seed namespace, to consume available BLK DPA
capacity.  Fix this by treating a successful BTT probe event as a
successful probe event for the backing namespace.

Reported-by: Nicholas Moulin <nicholas.w.moulin@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
8 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Sat, 25 Jul 2015 00:00:04 +0000 (17:00 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "Four smaller fixes for the current series.  This contains:

   - A fix for clones of discard bio's, that can cause data corruption.
     From Martin.

   - A fix for null_blk, where in certain queue modes it could access a
     request after it had been freed.  From Mike Krinkin.

   - An error handling leak fix for blkcg, from Tejun.

   - Also from Tejun, export of the functions that a file system needs
     to implement cgroup writeback support"

* 'for-linus' of git://git.kernel.dk/linux-block:
  block: Do a full clone when splitting discard bios
  block: export bio_associate_*() and wbc_account_io()
  blkcg: fix gendisk reference leak in blkg_conf_prep()
  null_blk: fix use-after-free problem

8 years agoMerge branch 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Fri, 24 Jul 2015 23:54:59 +0000 (16:54 -0700)]
Merge branch 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata

Pull libata fixes from Tejun Heo:
 "A couple important fixes.

   - A block layer change which removed restriction on max transfer size
     led to silent data corruption on some devices.  A new quirk is
     added to restore the old size limit for the reported device.  If it
     gets reported on more devices, we might have to consider restoring
     the restriction for ATA devices by default.

   - There finally is a SSD which is confirmed to cause data corruption
     on TRIM regardless of which flavor is used.  A new quirk is added
     and the device is blacklisted

   - Other device-specific workarounds"

* 'for-4.2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata:
  libata: Do not blacklist M510DC
  libata: increase the timeout when setting transfer mode
  libata: add ATA_HORKAGE_MAX_SEC_1024 to revert back to previous max_sectors limit
  libata: force disable trim for SuperSSpeed S238
  libata: add ATA_HORKAGE_NOTRIM
  libata: add ATA_HORKAGE_BROKEN_FPDMA_AA quirk for HP 250GB SATA disk VB0250EAVER
  ata: pmp: add quirk for Marvell 4140 SATA PMP

8 years agoMerge tag 'mmc-4.2-rc3' of git://git.linaro.org/people/ulf.hansson/mmc
Linus Torvalds [Fri, 24 Jul 2015 23:43:16 +0000 (16:43 -0700)]
Merge tag 'mmc-4.2-rc3' of git://git.linaro.org/people/ulf.hansson/mmc

Pull MMC fixes from Ulf Hansson:
 "Here are some mmc fixes intended for v4.2 rc4.

  Note, most of the changes are for the sdhci-esdhc-imx controller,
  which also required us to modify some related DTS files.  Those
  changes have been acked by the SoC maintainer.

  MMC core:
   - Fix a reference inbalance issue for power_ro_lock_show() sysfs handler

  MMC host:
   - omap_hsmmc: Fix IRQ errorhandling for CD, DTO, and CRC
   - sdhci: Prevent a kernel panic while using DMA
   - mtk-sd: Let it depend on HAS_DMA to prevent build errors
   - sdhci-esdhc: Make 8BIT bus work
   - sdhci-esdhc-imx: Fix some regressions for DT based platforms
   - sdhci-pxav3: Fix a regression for DT based platforms"

* tag 'mmc-4.2-rc3' of git://git.linaro.org/people/ulf.hansson/mmc:
  mmc: sdhci-pxav3: fix platform_data is not initialized
  dts: mmc: fsl-imx-esdhc: remove fsl,cd-controller support
  mmc: sdhci-esdhc-imx: clear f_max in boarddata
  mmc: sdhci-esdhc-imx: remove duplicated dts parsing
  mmc: sdhci: make max-frequency property in device tree work
  mmc: sdhci-esdhc-imx: move all non dt probe code into one function
  mmc: sdhci-esdhc-imx: fix cd regression for dt platform
  dts: imx7: fix sd card gpio polarity specified in device tree
  dts: imx25: fix sd card gpio polarity specified in device tree
  dts: imx6: fix sd card gpio polarity specified in device tree
  dts: imx53: fix sd card gpio polarity specified in device tree
  dts: imx51: fix sd card gpio polarity specified in device tree
  mmc: sdhci-esdhc: Make 8BIT bus work
  mmc: block: Add missing mmc_blk_put() in power_ro_lock_show()
  mmc: MMC_MTK should depend on HAS_DMA
  mmc: sdhci check parameters before call dma_free_coherent
  mmc: omap_hsmmc: Handle BADA, DEB and CEB interrupts
  mmc: omap_hsmmc: Fix DTO and DCRC handling

8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Linus Torvalds [Fri, 24 Jul 2015 23:33:11 +0000 (16:33 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:
 "A fix for the warnings/oops when handling HID devices with "unnamed"
  LEDs and couple of other driver fixups""

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: goodix - fix touch coordinates on WinBook TW100 and TW700
  Input: LEDs - skip unnamed LEDs
  Input: usbtouchscreen - avoid unresponsive TSC-30 touch screen
  Input: elantech - force resolution of 31 u/mm
  Input: zforce - don't overwrite the stack

8 years agoMerge tag 'regulator-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Fri, 24 Jul 2015 20:14:06 +0000 (13:14 -0700)]
Merge tag 'regulator-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "As well as some driver specific fixes there's several fixes here for
  the core support for regulators supplying other regulators fixing both
  an issue with ACPI support (which had never been tested before) and
  some error handling and device removal issues that Javier noticed"

* tag 'regulator-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: core: Fix memory leak in regulator_resolve_supply()
  regulator: core: Increase refcount for regulator supply's module
  regulator: core: Handle full constraints systems when resolving supplies
  regulator: 88pm800: fix LDO vsel_mask value
  regulator: max8973: Fix up control flag option for bias control
  regulator: s2mps11: Fix GPIO suspend enable shift wrapping bug

8 years agoMerge tag 'spi-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Linus Torvalds [Fri, 24 Jul 2015 20:13:28 +0000 (13:13 -0700)]
Merge tag 'spi-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A small collection of pretty much unremarkable driver specific fixes
  here plus the addition of a new device ID to spidev which requires no
  other code changes"

* tag 'spi-fix-v4.2-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: imx: Fix small DMA transfers
  spi: zynq: missing break statement
  spi: SPI_ZYNQMP_GQSPI should depend on HAS_DMA
  spi: spidev: add compatible value for LTC2488
  spi: img-spfi: fix support for speeds up to 1/4th input clock

8 years agoMerge tag 'sound-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Fri, 24 Jul 2015 19:50:19 +0000 (12:50 -0700)]
Merge tag 'sound-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "This has been a calm week again: one minor lockdep fix for PCM core,
  and the most of the rest are HD-audio quirks and fixups for various
  chips and machines"

* tag 'sound-4.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Add headset mic pin quirk for a Dell device
  ALSA: hda - remove one pin from ALC292_STANDARD_PINS
  ALSA: hda - Add new GPU codec ID 0x10de007d to snd-hda
  ALSA: hda: add new AMD PCI IDs with proper driver caps
  ALSA: hda - Fix Skylake codec timeout
  ALSA: hda - Add headset mic support for Acer Aspire V5-573G
  ALSA: sparc: Add missing kfree in error path
  ALSA: pcm: Fix lockdep warning with nonatomic PCM ops

8 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
Linus Torvalds [Fri, 24 Jul 2015 19:44:24 +0000 (12:44 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

Pull HID fixes from Jiri Kosina:

 - kernel crash fixes for multitouch and wacom drivers, by Brent Adam
   and Dan Carpenter

 - cp2112 data packet race condition corruption fix, by Antonio Borneo

 - a few new device IDs for wacom and microsoft drivers

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: cp2112: fix to force single data-report reply
  HID: wacom: Enable pad device for older Bamboo Touch tablets
  HID: multitouch: Fix fields from pen report ID being interpreted for multitouch
  HID: microsoft: Add quirk for MS Surface Type/Touch cover
  HID: wacom: NULL dereferences on error in probe()

8 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Fri, 24 Jul 2015 19:37:29 +0000 (12:37 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Aome amdgpu, one i915, one ttm and one hlcdc, nothing too scary.

  All seems fine for about this time"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/ttm: recognize ARM64 arch in ioprot handler
  drm/amdgpu/cz/dpm: properly report UVD and VCE clock levels
  drm/amdgpu/cz: implement voltage validation properly
  drm/amdgpu: add VCE harvesting instance query
  drm/amdgpu: implement VCE 3.0 harvesting support (v4)
  drm/amdgpu/dce10: Re-set VBLANK interrupt state when enabling a CRTC
  drm/amdgpu/dce11: Re-set VBLANK interrupt state when enabling a CRTC
  drm: Stop resetting connector state to unknown
  drm/i915: Use two 32bit reads for select 64bit REG_READ ioctls
  drm: atmel-hlcdc: fix vblank initial state

8 years agoMerge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux...
Linus Torvalds [Fri, 24 Jul 2015 19:31:30 +0000 (12:31 -0700)]
Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile

Pull arch/tile bugfix from Chris Metcalf:
 "This fixes a bug in freeing the initramfs memory"

* 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  tile: use free_bootmem_late() for initrd

8 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Fri, 24 Jul 2015 19:23:06 +0000 (12:23 -0700)]
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fixes from Paolo Bonzini:
 "Everything related to the new quirks and memory type features:

   - small improvements to the quirks API

   - extending one of the quirks from just AMD to Intel as well, because
     4.2 can show the same problem with problematic firmware on Intel
     too"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: x86: rename quirk constants to KVM_X86_QUIRK_*
  KVM: vmx: obey KVM_QUIRK_CD_NW_CLEARED
  KVM: x86: introduce kvm_check_has_quirk
  KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type
  KVM: MTRR: fix memory type handling if MTRR is completely disabled

8 years agoftrace: Fix breakage of set_ftrace_pid
Steven Rostedt (Red Hat) [Fri, 24 Jul 2015 14:38:12 +0000 (10:38 -0400)]
ftrace: Fix breakage of set_ftrace_pid

Commit 4104d326b670 ("ftrace: Remove global function list and call function
directly") simplified the ftrace code by removing the global_ops list with a
new design. But this cleanup also broke the filtering of PIDs that are added
to the set_ftrace_pid file.

Add back the proper hooks to have pid filtering working once again.

Cc: stable@vger.kernel.org # 3.16+
Reported-by: Matt Fleming <matt@console-pimps.org>
Reported-by: Richard Weinberger <richard.weinberger@gmail.com>
Tested-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agoInput: goodix - fix touch coordinates on WinBook TW100 and TW700
Bastien Nocera [Fri, 24 Jul 2015 16:08:53 +0000 (09:08 -0700)]
Input: goodix - fix touch coordinates on WinBook TW100 and TW700

The touchscreen on the WinBook TW100 and TW700 don't match the default
display, with 0,0 touches being reported when touching at the bottom
right of the screen.

  1280,800             0,800
         +-------------+
         |             |
         |             |
         |             |
         +-------------+
    1280,0             0,0

It's unfortunately impossible to detect this problem with data from the
DSDT, or other auxiliary metadata, so fallback to quirking this specific
model of tablet instead.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 years agoInput: LEDs - skip unnamed LEDs
Dmitry Torokhov [Wed, 22 Jul 2015 21:56:39 +0000 (14:56 -0700)]
Input: LEDs - skip unnamed LEDs

Devices may declare more LEDs than what is known to input-leds
(HID does this for some devices). Instead of showing ugly warnings
on connect and, even worse, oopsing on disconnect, let's simply
ignore LEDs that are not known to us.

Reported-and-tested-by: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
8 years agopower: bq27x00_battery: Checkpatch fixes
Andrew F. Davis [Wed, 22 Jul 2015 21:51:56 +0000 (16:51 -0500)]
power: bq27x00_battery: Checkpatch fixes

Remove space before tab.
Remove unnecessary line continuations.
Add braces to else statement.
Remove unnecessary parentheses.
Remove unneeded blank lines.
Remove unnecessary 'out of memory' message.
Add missing line after declarations.
Change use of printk to pr_err.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
8 years agopower: bq27x00_battery: Fix function parameter alignment
Andrew F. Davis [Wed, 22 Jul 2015 21:51:55 +0000 (16:51 -0500)]
power: bq27x00_battery: Fix function parameter alignment

Fix the alignment of function parameters on new lines.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
8 years agopower: bq27x00_battery: Fix lines over 80 characters long
Andrew F. Davis [Wed, 22 Jul 2015 21:51:54 +0000 (16:51 -0500)]
power: bq27x00_battery: Fix lines over 80 characters long

Shorted lines over 80 characters long by reducing tab count.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
8 years agopower: bq27x00_battery: Add manufacturer property
Andrew F. Davis [Wed, 22 Jul 2015 21:51:53 +0000 (16:51 -0500)]
power: bq27x00_battery: Add manufacturer property

Add the manufacturer property to the bq27x00 driver.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Dan Murphy <dmurphy@ti.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
8 years agopower/reset: zx: Register restart handler
Jun Nie [Wed, 15 Jul 2015 03:25:58 +0000 (11:25 +0800)]
power/reset: zx: Register restart handler

Register with kernel restart handler instead of setting arm_pm_restart
directly.

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
8 years agoMerge remote-tracking branches 'spi/fix/gqspi', 'spi/fix/imx', 'spi/fix/mg-spfi'...
Mark Brown [Fri, 24 Jul 2015 15:19:50 +0000 (16:19 +0100)]
Merge remote-tracking branches 'spi/fix/gqspi', 'spi/fix/imx', 'spi/fix/mg-spfi' and 'spi/fix/spidev' into spi-linus

8 years agoMerge remote-tracking branches 'regulator/fix/88pm800', 'regulator/fix/max8973',...
Mark Brown [Fri, 24 Jul 2015 15:19:25 +0000 (16:19 +0100)]
Merge remote-tracking branches 'regulator/fix/88pm800', 'regulator/fix/max8973', 'regulator/fix/s2mps11' and 'regulator/fix/supply' into regulator-linus

8 years agoMerge remote-tracking branch 'regulator/fix/core' into regulator-linus
Mark Brown [Fri, 24 Jul 2015 15:19:25 +0000 (16:19 +0100)]
Merge remote-tracking branch 'regulator/fix/core' into regulator-linus

8 years agospi: imx: Fix small DMA transfers
Sascha Hauer [Fri, 24 Jul 2015 13:01:08 +0000 (15:01 +0200)]
spi: imx: Fix small DMA transfers

DMA transfers must be greater than the watermark level size. spi_imx->rx_wml
and spi_imx->tx_wml contain the watermark level in 32bit words whereas struct
spi_transfer contains the transfer len in bytes. Fix the check if DMA is
possible for a transfer accordingly. This fixes transfers with sizes between
33 and 128 bytes for which previously was claimed that DMA is possible.

Fixes: f62caccd12c17e4 (spi: spi-imx: add DMA support)
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>