Merge tag 'iio-for-3.14a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 02:42:40 +0000 (18:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2013 02:42:40 +0000 (18:42 -0800)
Jonathan writes:

First set of new features, drivers and cleanups for IIO in the 3.14 cycle.
This mostly consists of patches that didn't quite make the last cycle. Lots
of interesting things under review currently.

Core:
- Add devm_iio_device_register/unregister.  I took some convincing on whether
  there would be many devices that really were simple enough to need no
  explicit actions on removal.  Turns out there are some.
- Move some stray docs to above the relevant implemenation.
- Drop a redundant repeated check on the fact the trigger has actually changed
  when there is a userspace attempt change it.

Drivers:
New drivers
- Freescale MPL3115A2 Pressure / temperature sensor

New functionality
- hid_sensors: add sensitivity support.

DT bindings
- tsl2563
- hmc5843

Cleanups
- Drop unused scan_type from viperboard adc driver.
- devm_iio_device_register used in viperboard, ad5421, ad5755, adis16130,
  adxrs450, vcnl4000, adis16220, ad7816, lpc32xx, adt7316, adis16060, isl29018
  and ad2s1200.  Note that this was proposed in a number of other drivers
  and this revealed a number of missorderings in remove functions.  Also for
  now I have blocked this on any device that any hardware suspend suport on
  the basis that we probably want to power down devices if they have no driver
  support loaded.

1  2 
Documentation/devicetree/bindings/vendor-prefixes.txt
Documentation/driver-model/devres.txt
drivers/iio/industrialio-event.c

index ce95ed1c6d3e26578eaca876aa0f7caf26fa101d,b65a44041ec168dc46b9470a9a99bafc7055fe66..8c75d8506c42788514655fb3589e8d6bc367f506
@@@ -9,18 -9,16 +9,19 @@@ aeroflexgaisler       Aeroflex Gaisler A
  ak    Asahi Kasei Corp.
  altr  Altera Corp.
  amcc  Applied Micro Circuits Corporation (APM, formally AMCC)
+ amstaos       AMS-Taos Inc.
  apm   Applied Micro Circuits Corporation (APM)
  arm   ARM Ltd.
  atmel Atmel Corporation
 +auo   AU Optronics Corporation
  avago Avago Technologies
  bosch Bosch Sensortec GmbH
  brcm  Broadcom Corporation
  capella       Capella Microsystems, Inc
  cavium        Cavium, Inc.
 +cdns  Cadence Design Systems Inc.
  chrp  Common Hardware Reference Platform
 +chunghwa      Chunghwa Picture Tubes Ltd.
  cirrus        Cirrus Logic, Inc.
  cortina       Cortina Systems, Inc.
  dallas        Maxim Integrated Products (formerly Dallas Semiconductor)
@@@ -49,8 -47,6 +50,8 @@@ nintendo      Nintend
  nvidia        NVIDIA
  nxp   NXP Semiconductors
  onnn  ON Semiconductor Corp.
 +panasonic     Panasonic Corporation
 +phytec        PHYTEC Messtechnik GmbH
  picochip      Picochip Ltd
  powervr       PowerVR (deprecated, use img)
  qca   Qualcomm Atheros, Inc.
@@@ -70,12 -66,12 +71,12 @@@ snps       Synopsys, Inc
  st    STMicroelectronics
  ste   ST-Ericsson
  stericsson    ST-Ericsson
 -toumaz        Toumaz
  ti    Texas Instruments
  toshiba       Toshiba Corporation
 +toumaz        Toumaz
  v3    V3 Semiconductor
  via   VIA Technologies, Inc.
 +winbond Winbond Electronics corp.
  wlf   Wolfson Microelectronics
  wm    Wondermedia Technologies, Inc.
 -winbond Winbond Electronics corp.
  xlnx  Xilinx
index 5bdc8cb5fc2855047004cf673d735fa23c561fb8,ffeab1dded0ac8cfd4e477854339495ad9cd339e..4f7897e99cba8a8fc7b5a33343825cfb94ce2d68
@@@ -242,6 -242,8 +242,8 @@@ II
    devm_iio_device_free()
    devm_iio_trigger_alloc()
    devm_iio_trigger_free()
+   devm_iio_device_register()
+   devm_iio_device_unregister()
  
  IO region
    devm_request_region()
@@@ -283,7 -285,6 +285,7 @@@ REGULATO
    devm_regulator_get()
    devm_regulator_put()
    devm_regulator_bulk_get()
 +  devm_regulator_register()
  
  CLOCK
    devm_clk_get()
@@@ -303,6 -304,3 +305,6 @@@ PH
  
  SLAVE DMA ENGINE
    devm_acpi_dma_controller_register()
 +
 +SPI
 +  devm_spi_register_master()
index c10eab64bc0524eca6caa476d224c370fcd49262,32b2c2d8d2376a7e200db2cbd1e25a17b3ebdb60..bc043fab4cd12cbcd86f182e67d69b4da78f8a07
@@@ -42,6 -42,12 +42,12 @@@ struct iio_event_interface 
        struct attribute_group  group;
  };
  
+ /**
+  * iio_push_event() - try to add event to the list for userspace reading
+  * @indio_dev:                IIO device structure
+  * @ev_code:          What event
+  * @timestamp:                When the event occurred
+  **/
  int iio_push_event(struct iio_dev *indio_dev, u64 ev_code, s64 timestamp)
  {
        struct iio_event_interface *ev_int = indio_dev->event_interface;
@@@ -56,7 -62,7 +62,7 @@@
                ev.id = ev_code;
                ev.timestamp = timestamp;
  
 -              copied = kfifo_put(&ev_int->det_events, &ev);
 +              copied = kfifo_put(&ev_int->det_events, ev);
                if (copied != 0)
                        wake_up_locked_poll(&ev_int->wait, POLLIN);
        }