Commit Graph

348639 Commits

Author SHA1 Message Date
Sedat Dilek 7353f85ce8 mei: Fix some more kernel-doc typos in hw-me.c
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:59:53 -08:00
Tomas Hozza 0783d72fa4 tools: hv: Fix how ifcfg-* file is created
Fix for the daemon code and for hv_set_ifconfig.sh script, so
that the created ifcfg-* file is consistent with initscripts
documentation.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:47:21 -08:00
Jason Wang 00246d08be tools: hv: fix a typo in hv_set_ifconfig.sh
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:47:02 -08:00
Wei Yongjun f994a154c5 Drivers: hv: remove unused variable in vmbus_recvpacket_raw()
The variable userlen is initialized but never used
otherwise, so remove the unused variable.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:46:09 -08:00
K. Y. Srinivasan 3bacaf0ce1 Drivers: hv: Cleanup and consolidate reporting of build/version info
Now, cleanup and consolidate reporting of host and vmbus version numbers.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:41:50 -08:00
K. Y. Srinivasan 5fbebb2d20 Drivers: hv: Capture the host build information
Capture the host build information so it can be presented along with the
negotiated vmbus version information.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:41:49 -08:00
K. Y. Srinivasan c2b8e5202c Drivers: hv: Implement flow management on the send side
Implement flow management on the send side. When the sender is blocked, the reader
can potentially signal the sender to indicate there is now room to send.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:41:49 -08:00
K. Y. Srinivasan 2a5c43a821 Drivers: hv: Enable protocol negotiation with win8 hosts
Now that we have implemented all of the Win8 (WS2012) functionality, negotiate
Win8 protocol with the host.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:41:49 -08:00
K. Y. Srinivasan 5ab05951c5 Drivers: hv: Add a check to deal with spurious interrupts
We establish the handler before we have fully initialized the VMBUS state.
Deal with spurious interrupts.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:39:15 -08:00
K. Y. Srinivasan b0209501dc Drivers: hv: Handle vmbus interrupts concurrently on all cpus
Vmbus interrupts are unique in that while the interrupt is delivered on a
given vector, these can be handled concurrently on different CPUs. Handle the
vmbus interrupts concurrently on all the CPUs.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:39:15 -08:00
K. Y. Srinivasan db11f12a11 Drivers: hv: Manage event tasklets on per-cpu basis
Now that we can potentially take vmbus interrupts on any CPU, make the
tasklets per-CPU.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:39:15 -08:00
K. Y. Srinivasan 0198631328 Drivers: hv: Get rid of unnecessary request for offers
This call to seek offers is not necessary and just adds unnecessary delay.
Get rid of it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:39:15 -08:00
K. Y. Srinivasan 9acd6442c6 Drivers: hv: Get rid of the unused global signaling state
Now that we have implemented a per-connection signaling mechanism, get rid
of the global signaling state. For hosts that don't support per-connection
signaling handle, we have moved the global state to be a per-channel state.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:39:15 -08:00
K. Y. Srinivasan a119845f6e Drivers: hv: Add code to distribute channel interrupt load
Implement a simple policy for distributing incoming interrupt load.
We classify channels as (a) performance critical and (b) not
performance critical. All non-performance critical channels will
be bound to the boot cpu. Performance critical channels will be
bound to the remaining available CPUs on a round-robin basis.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:39:15 -08:00
K. Y. Srinivasan 6552ecd70c Drivers: hv: Modify the interrupt handling code to support win8 and beyond
Starting with Win8 (WS2012), the event page can be used to directly get the
channel ID that needs servicing. Modify the channel event handling code
to take advantage of this feature.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:39:15 -08:00
K. Y. Srinivasan abbf3b2aa0 Drivers: hv: Add state to manage incoming channel interrupt load
Add state to bind a channel to a specific VCPU. This will help us better
distribute incoming interrupt load.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:39:14 -08:00
K. Y. Srinivasan 917ea427c7 Drivers: hv: Setup a mapping for Hyper-V's notion cpu ID
On win8 (ws2012), incoming vmbus interrupt load can be spread across all
available VCPUs in the guest. On a per-channel basis, the interrupts can
be bound to specific CPUs. The Linux notion of cpu ID may be different
from that of the hypervisor's. Setup a mapping structure.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:34:37 -08:00
K. Y. Srinivasan 3be7777401 Drivers: hv: Cleanup vmbus_set_event() to support win7 and beyond
On win7 (ws2008 R2) and beyond, we have the notion of having dedicated interrupts on
a per-channel basis. When a channel has a dedicated interrupt assigned, there is no need
to set the interrupt bit in the shared page. Implement this optimization.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:34:37 -08:00
K. Y. Srinivasan b3bf60c7b4 Drivers: hv: Manage signaling state on a per-connection basis
The current code has a global handle for supporting signaling of the host
from guest. Make this a per-channel attribute as on some versions of the
host we can signal on per-channel handle.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:34:37 -08:00
K. Y. Srinivasan eafa7072e7 Drivers: hv: Move vmbus version definitions to hyperv.h
To support version specific optimization in various vmbus drivers,
move the vmbus definitions to the public header file.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:34:37 -08:00
K. Y. Srinivasan 21c3bef5db Drivers: hv: Change the signature of vmbus_set_event()
In preparation for supporting a per-connection signaling mechanism,
change the signature of vmbus_set_event(). This change is also
needed to implement other aspects of the signaling optimization.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:34:36 -08:00
K. Y. Srinivasan 1f42248d72 Drivers: hv: Change the signature for hv_signal_event()
In preparation for implementing a per-connection signaling framework,
change the signature of the function hv_signal_event(). The current
code uses a global handle for signaling the host.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:34:36 -08:00
K. Y. Srinivasan 37f7278b81 Drivers: hv: Save and export negotiated vmbus version
Export the negotiated vmbus version as this may be useful for
individual drivers.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:34:36 -08:00
K. Y. Srinivasan 29423b7e51 Drivers: hv: Extend/modify vmbus_channel_offer_channel for win7 and beyond
The "offfer" message sent by the host has been extended in win7 (ws2008 R2).
Add/modify state to reflect this extension. All these changes are backward
compatible.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:34:36 -08:00
K. Y. Srinivasan 2416603ef1 Drivers: hv: Update the ring buffer structure to match win8 functionality
Update the ringbuffer structure to support win8 functionality.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:34:36 -08:00
K. Y. Srinivasan 610071c384 Drivers: hv: Support handling multiple VMBUS versions
The current code hard coded the vmbus version independent of the host
it was running on. Add code to dynamically negotiate the most appropriate
version.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 11:34:36 -08:00
K. Y. Srinivasan 4fa152ce24 Drivers: hv: Get rid of hv_get_ringbuffer_interrupt_mask()
This function is no longer used; get rid of it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:46:39 -08:00
K. Y. Srinivasan 98fa8cf4bc Drivers: hv: Optimize the signaling on the write path
The host has already implemented the "read" side optimizations.
Leverage that to optimize "write" side signaling.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:46:39 -08:00
K. Y. Srinivasan f878f3d59e Drivers: hv: Optimize signaling in the read path
Now that we have the infratructure for correctly determining when we
should signal the host; optimize the signaling on the read side -
signaling the guest from the host.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:46:39 -08:00
K. Y. Srinivasan 7ae3e03519 Drivers: hv: Turn off batched reading for util drivers
Util driver is not a performance critical driver and furthermore some
util services such as KVP can only handle one outstanding message
from the host. Turn off batched reading for util drivers.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:46:39 -08:00
K. Y. Srinivasan 132368bd0b Drivers: hv: Add state to manage batched reading
For the "read" side signaling optimization, the reader has to completely
drain the queue before exiting. Add state to manage this "batched"
reading.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:46:39 -08:00
K. Y. Srinivasan 6fdf3b2143 Drivers: hv: Implement routines for read side signaling optimization
Implement functions that will support read-side signaling optimization.
By having the reader indicate the start of the "read" operation and the
"end" of the read operation we can more efficiently handle the signaling
protocol: while the read is in progress, there is no need for the "writer"
to signal the "reader" as new items are put on the read queue.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:46:39 -08:00
Ben Hutchings 0bffd25ce9 tools/hv: Fix permissions of created directory and files
It's silly to create directories without execute permission, or to
give permissions to 'other' but not the group-owner.

Write the permissions in octal and 'ls -l' format since these are much
easier to read than the named macros.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Tomas Hozza <thozza@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:41:46 -08:00
Tomas Hozza 40424f5fff tools/hv: Fix /var subdirectory
Initial patch by Ben Hutchings <ben@decadent.org.uk>

We will install this in /usr, so it must use /var/lib for its state.
Only programs installed under /opt should use /var/opt.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:41:46 -08:00
Wei Yongjun 10d498b13f hv: hv_balloon: remove duplicated include from hv_balloon.c
Remove duplicated include.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:41:46 -08:00
Greg Kroah-Hartman 8292ac21f3 misc: lattice-ecp3-config.c: remove __dev* markings
These are now removed from the kernel, so remove them to allow the
driver to build properly.

Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:25:26 -08:00
Stefan Roese 781551df57 misc: Add Lattice ECP3 FPGA configuration via SPI
This patch adds support for bitstream configuration (programming /
loading) of the Lattice ECP3 FPGA's via the SPI bus.

Here an example on my custom MPC5200 based board:

$ echo 1 > /sys/class/firmware/spi0.0/loading
$ cat fpga_a4m2k.bit > /sys/class/firmware/spi0.0/data
$ echo 0 > /sys/class/firmware/spi0.0/loading

leads to these messages:

lattice-ecp3 spi0.0: FPGA Lattice ECP3-35 detected
lattice-ecp3 spi0.0: Configuring the FPGA...
lattice-ecp3 spi0.0: FPGA succesfully configured!

Signed-off-by: Stefan Roese <sr@denx.de>
Acked-by: Ming Lei <ming.lei@canonical.com>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:25:03 -08:00
Stephen Hemminger 93ce83b6e0 uio-howto: example bug
Bug in demo program, checking wrong return value

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:19:51 -08:00
channing 25c22d5bea misc: st_core: Error triggered by convert "char" to "int"
When st driver decodes protocol index received from raw data,
it does a value convert from "char" to "int". Because it's sign
extension from bit8 to bit32, the "int" value maybe minus, in
another word, the protocol index might be minus, but driver doesn't
filter such case and may continue access memory pointed by this
minus index.

This patch is to change the variable type of index from "int"
to "unsigned char", so that it avoids do such kind of type
conversion.

cc: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: channing <chao.bi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-17 10:19:42 -08:00
David Stevenson 867ff9880d w1_therm: Retries: remove old code add CRC
w1_therm includes some obsolete code to detect bad_roms, this is no
longer relevant.
The retry code is only used for this bad_rom test, however there is a
CRC check that detects a bad read, but does not trigger a retry. This
patch removes all the bad_rom code and uses the CRC check to trigger
retries.

Signed-off-by: David Stevenson <david@avoncliff.com>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 23:43:05 -08:00
Julia Lawall e5279ff6c9 drivers/w1/masters/mxc_w1.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.

At the same time, this fixes two faults.  First, mdev, the result of
kzalloc, was never freed.  Second, on failure of ioremap, 0 was returned.
This has been replaced by -EBUSY, which was the failure value for the call
to request_mem_region, with which the call to ioremap has been combined.

The warning message on failure of ioremap is dropped, because
devm_request_and_ioremap already gives such messages on failure.

Finally, the initial call to platform_get_resource is moved closer to the
call to devm_request_and_ioremap, which takes care of checking whether its
result is NULL, implying that a test on the result of this call to
platform_get_resource is not needed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 23:38:43 -08:00
Julia Lawall eea2172e69 drivers/w1/masters/ds1wm.c: use devm_ functions
The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 23:38:43 -08:00
Greg Kroah-Hartman feee830394 This is patch set of extcon for v3.9.
Update to max77693/max8997 extcon driver:
 - Using MHL_TA cable for charging.
 - Support JIG cable.
 - Support Dock-Audio device for playing music and button of device.
 - Support Dock-Smart device for desktop mode with mouse/keyboard.
 - Set default UART/USB path on probe().
 - Check the state/type of cable after completing initialization.
 - Code clean to remove duplicate code and bug fix related to sequence of interrupt.
 - Fix irq_flag of max8997/max77693 driver.
 
 Update to arizona extcon driver:
 - Headphone measurements.
 - Alternative detection mechanism for non-default system designs.
 - Microphone clamp integration.
 - Support for additional detection pin.
 - MICBIAS rise time configuration.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (GNU/Linux)
 
 iQIcBAABAgAGBQJQ9j8XAAoJEJzN3yze689TYMQQANhX0/WcRIvjddU8Ewf2SIR6
 e1iPcIe+a30dk1tQc4plpMnXMpOGGD2gGq7XaM6hxt2IZj6aGYlP1/pcpNko0VMq
 391s+fuG+TOGWv/y107QM9uoVnQ2xy9Av+qGacACPus9/u+MjUMg1VyVZE1OmjM5
 M+HlkWkYVllJPq+7iWHyteLOxyv3sfHjm1i6z+5UDV3Gn7VXtPOoOiZFSiTicnr5
 TvSnEH+4zA3ZKCuIfcj6eCaQLxNB4eUdDUXQKOMPKPat1QJU7byd9CUO088JDfry
 RKArUn3wcRrGykBQ9hnhOd+qdzzBkvw6v6RezfYzImcojrxuWnxYnV9mF8kETTeD
 zMa/u5kCVKF1Za1AnnWxdteeXdc2OYVz41+qVa5D7T8TxS/NK8PYpobLTCLqDs77
 zGaORY4rbt4u1mEmyhA/x4YP0xglbVdHQWG14FCdcxaw7bxLrBXzq8Op66z/wmI5
 FnrZWoFiLmIBQcWgxwyQ03bCf3chKGpXCQBOQk4nkV5C6qIvODnTvD0Wj6McsI6R
 sy+AILVat8HrruyXJoQsfkmKlxkQ/f/H2GZvzD36Mrpf1CvMQwaFoYlf6PY0t5lH
 +XqVAtlbCP94+CNwRrHv6kI0UX/pZ4DGIeaDq+azmH/9HwtZyiQEye+BCPR4McRT
 HR/G0lzzk8RJztmlXItX
 =YOtQ
 -----END PGP SIGNATURE-----

Merge tag 'extcon-for-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next

Chanwoo writes:
  This is patch set of extcon for v3.9.

  Update to max77693/max8997 extcon driver:
  - Using MHL_TA cable for charging.
  - Support JIG cable.
  - Support Dock-Audio device for playing music and button of device.
  - Support Dock-Smart device for desktop mode with mouse/keyboard.
  - Set default UART/USB path on probe().
  - Check the state/type of cable after completing initialization.
  - Code clean to remove duplicate code and bug fix related to sequence of interrupt.
  - Fix irq_flag of max8997/max77693 driver.

  Update to arizona extcon driver:
  - Headphone measurements.
  - Alternative detection mechanism for non-default system designs.
  - Microphone clamp integration.
  - Support for additional detection pin.
  - MICBIAS rise time configuration.
2013-01-15 23:26:35 -08:00
Samuel Iglesias Gonsalvez e0f8d323f3 ipack/devices/ipoctal: added shutdown callback
Added shutdown callback to disable RX and TX when there is no other client
accesing the device.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 18:24:39 -08:00
Samuel Iglesias Gonsalvez b0d17fbdac ipack/devices/ipoctal: add rx_enable flag
Thus, we don't enable RX when a termios setup has been called, as it could be
disabled previously.

As the control registers (Rx, Tx flags specifically) cannot be read from the
device, we keep this info in rx_enable.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 18:24:39 -08:00
Samuel Iglesias Gonsalvez b06073f963 ipack/devices/ipoctal: remove redundant tty_flip_buffer_push()
The function is already called in ipoctal_irq_rx()

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 18:24:38 -08:00
Samuel Iglesias Gonsalvez e7e664fd68 ipack/devices/ipoctal: protect the channel data processing with a spinlock
We protect important data such as TX buffer pointer, nb_bytes counter and status
registers of the device, from accessing several times at the same time.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 18:24:38 -08:00
Samuel Iglesias Gonsalvez 21d27ed461 ipack/devices/ipoctal: ack IRQ before processing it
Due to the IRQ processing, we can generate another IRQ that can come before we
end the previous one, so we lost it. E.g. when transmitting a character.

To allow the processing in SMP machines, we ack the IRQ at the beginning of the
IRQ handler.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 18:24:38 -08:00
Samuel Iglesias Gonsalvez a3882b7814 ipack/devices/ipoctal: avoid re-enable RX two times.
RX is enabled when the tty port is open, so no need to do it in initialization
time: it can allow the device to receive characters but no TTY client is
listening to them.

It produced an infinite number of IRQ as RxFIFO is not read to clear that
IRQ in the device, so it is still pending.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 18:24:38 -08:00
Samuel Iglesias Gonsalvez 9d01b6f064 ipack/devices/ipoctal: rework disable TX when the TX buffer is empty
Depending of the device, it disables the TX mode in different places when there
is no more data to transmit.

This patch reorder them and disable the TX mode in the same place.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-15 18:24:38 -08:00