1. 14 4月, 2017 3 次提交
  2. 09 4月, 2017 6 次提交
    • L
      iio: imu: st_lsm6dsx: use i2c/spi device name for iio_dev name · 510c0106
      Lorenzo Bianconi 提交于
      Use the correct chip name (e.g. lsm6dsm) as suffix for iio_dev name
      instead of a generic one (lsm6dsx)
      Signed-off-by: NLorenzo Bianconi <lorenzo.bianconi@st.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      510c0106
    • L
      iio: adc: add a driver for Qualcomm PM8xxx HK/XOADC · 63c3ecd9
      Linus Walleij 提交于
      The Qualcomm PM8xxx PMICs contain a simpler ADC than its
      successors (already in the kernel as qcom-spmi-vadc.c):
      the HK/XO ADC (Housekeeping/Chrystal oscillator ADC).
      
      As far as I can understand this is equal to the PMICs
      using SSBI transport and encompass PM8018, PM8038,
      PM8058, and PM8921, so this is shortly named PM8xxx.
      
      This ADC monitors a bunch of on-board voltages and the die
      temperature of the PMIC itself, but it can also be routed
      to convert a few external MPPs (multi-purpose pins). On
      the APQ8060 DragonBoard this feature is used to let this
      ADC convert an analog ALS (Ambient Light Sensor) voltage
      signal from a Capella CM3605 ALS into a LUX value.
      
      Developed and tested with APQ8060 DragonBoard based on
      Ivan's driver and Rama Krishna's patches. The SPMI VADC
      driver is quite different, but share enough minor
      functionality that I have split out to the common file
      in a previous patch.
      
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-arm-msm@vger.kernel.org
      Cc: Ivan T. Ivanov <iivanov.xz@gmail.com>
      Cc: Andy Gross <andy.gross@linaro.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Cc: Rama Krishna Phani A <rphani@codeaurora.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      63c3ecd9
    • L
      iio: adc: break out common code from SPMI VADC · e932d4f0
      Linus Walleij 提交于
      The SPMI VADC and the earlier XOADC share a subset of
      common code, so to be able to use the same code in both
      drivers, we break out a separate file with the common code,
      prefix exported functions that are no longer static with
      qcom_* and bake an object qcom-spmi-vadc.o that contains both
      files: qcom-vadc-common.o and qcom-spmi-vadc-core.o.
      
      As we need to follow the procedure for making a kernel module
      or compiled in object from several files, but still want to
      produce the same module name, rename the qcom-spmi-vadc.c
      file to qcom-spmi-vadc-core.c so we can bake the two objects
      into qcom-spmi-vadc.o
      
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-arm-msm@vger.kernel.org
      Cc: Ivan T. Ivanov <iivanov.xz@gmail.com>
      Cc: Andy Gross <andy.gross@linaro.org>
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Cc: Rama Krishna Phani A <rphani@codeaurora.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      e932d4f0
    • Q
      iio: adc: sun4i-gpadc-iio: add support for A33 thermal sensor · 808a8b73
      Quentin Schulz 提交于
      This adds support for the Allwinner A33 thermal sensor.
      
      Unlike the A10, A13 and A31, the Allwinner A33 only has one channel
      which is dedicated to the thermal sensor. Moreover, its thermal sensor
      does not generate interruptions, thus we only need to directly read the
      register storing the temperature value.
      
      The MFD used by the A10, A13 and A31, was created to avoid breaking the
      DT binding, but since the nodes for the ADC weren't there for the A33,
      it is not needed.
      
      Though the A33 does not have an internal ADC, it has a thermal sensor
      which shares the same registers with GPADC of the already supported SoCs
      and almost the same bits, for the same purpose (thermal sensor).
      
      The thermal sensor behaves exactly the same (except the presence of
      interrupts or not) on the different SoCs.
      Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com>
      Acked-by: NLee Jones <lee.jones@linaro.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      808a8b73
    • Q
      iio: adc: sun4i-gpadc-iio: move code used in MFD probing to new function · e3f6e726
      Quentin Schulz 提交于
      This moves code used in MFD probing to a new sun4i_gpadc_probe_mfd
      function.
      
      This driver was initially written for A10, A13 and A31 SoCs which
      already had a DT binding for this IP, thus we needed to use an MFD to
      probe the different drivers without changing the DT binding of these
      SoCs.
      
      For SoCs that will require to create a DT binding for this IP, we can
      avoid using an MFD, thus we need two separate functions: one for probing
      via MFD and one for probing without MFD.
      
      This split the code specific to MFD probing in a function separated from
      the driver probe function.
      Signed-off-by: NQuentin Schulz <quentin.schulz@free-electrons.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      e3f6e726
    • J
      iio: adc: Add Maxim max9611 ADC driver · 69780a3b
      Jacopo Mondi 提交于
      Add iio driver for Maxim max9611 and max9612 current-sense amplifiers
      with 12-bits ADC interface.
      
      Datasheet publicly available at:
      https://datasheets.maximintegrated.com/en/ds/MAX9611-MAX9612.pdfSigned-off-by: NJacopo Mondi <jacopo+renesas@jmondi.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      69780a3b
  3. 08 4月, 2017 1 次提交
  4. 04 4月, 2017 2 次提交
  5. 02 4月, 2017 13 次提交
  6. 01 4月, 2017 7 次提交
    • R
      iio: Aspeed ADC · 57380323
      Rick Altherr 提交于
      Aspeed BMC SoCs include a 16 channel, 10-bit ADC. Low and high threshold
      interrupts are supported by the hardware but are not currently implemented.
      Signed-off-by: NRick Altherr <raltherr@google.com>
      Tested-by: NXo Wang <xow@google.com>
      Reviewed-by: NJoel Stanley <joel@jms.id.au>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      57380323
    • S
      staging: iio: light: tsl2x7x constify attribute_group structures · d952b4e6
      simran singhal 提交于
      As the event_attrs field of iio_info structures is constant, so these
      attribute_group structures can also be declared constant.
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
        15064	   1528	      0	  16592	   40d0
      drivers/staging/iio/light/tsl2x7x_core.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
        15192	   1400	      0	  16592	   40d0
      drivers/staging/iio/light/tsl2x7x_core.o
      Signed-off-by: Nsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      d952b4e6
    • S
      iio: adc: hx711: constify attribute_group structures · 4214dc18
      simran singhal 提交于
      Check for attribute_group structures that are only stored in the
      attrs filed of iio_info structure. As the attrs field of iio_info
      structures is constant, so these attribute_group structures can also be
      declared constant.
      Done using coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct attribute_group i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct iio_info x;
      @@
      x.attrs=&i@p;
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      static
      +const
      struct attribute_group i={...};
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct attribute_group i;
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         3042	    480	      0	   3522	    dc2	drivers/iio/adc/hx711.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
         3098	    416	      0	   3514	    dba	drivers/iio/adc/hx711.o
      Signed-off-by: Nsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      4214dc18
    • S
      iio: humidity: hdc100x: constify attribute_group structures · 757cff86
      simran singhal 提交于
      Check for attribute_group structures that are only stored in the
      attrs filed of iio_info structure. As the attrs field of iio_info
      structures is constant, so these attribute_group structures can also be
      declared constant.
      Done using coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct attribute_group i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct iio_info x;
      @@
      x.attrs=&i@p;
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      static
      +const
      struct attribute_group i={...};
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct attribute_group i;
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         3459	    488	      0	   3947	    f6b	drivers/iio/humidity/hdc100x.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
         3507	    424	      0	   3931	    f5b	drivers/iio/humidity/hdc100x.o
      Signed-off-by: Nsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      757cff86
    • S
      iio: light: apds9960: constify attribute_group structures · 3ca437c0
      simran singhal 提交于
      Check for attribute_group structures that are only stored in the
      attrs filed of iio_info structure. As the attrs field of iio_info
      structures is constant, so these attribute_group structures can also be
      declared constant.
      Done using coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct attribute_group i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct iio_info x;
      @@
      x.attrs=&i@p;
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      static
      +const
      struct attribute_group i={...};
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct attribute_group i;
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         8503	    488	      0	   8991	   231f	drivers/iio/light/apds9960.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
         8567	    424	      0	   8991	   231f	drivers/iio/light/apds9960.o
      Signed-off-by: Nsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      3ca437c0
    • S
      iio: light: bh1750: constify attribute_group structures · c2869498
      simran singhal 提交于
      Check for attribute_group structures that are only stored in the
      attrs filed of iio_info structure. As the attrs field of iio_info
      structures is constant, so these attribute_group structures can also be
      declared constant.
      Done using coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct attribute_group i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct iio_info x;
      @@
      x.attrs=&i@p;
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      static
      +const
      struct attribute_group i={...};
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct attribute_group i;
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         2276	    352	      0	   2628	    a44	drivers/iio/light/bh1750.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
         2340	    320	      0	   2660	    a64	drivers/iio/light/bh1750.o
      Signed-off-by: Nsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      c2869498
    • S
      iio: proximity: as3935: constify attribute_group structures · 7ab89e1e
      simran singhal 提交于
      Check for attribute_group structures that are only stored in the
      attrs filed of iio_info structure. As the attrs field of iio_info
      structures is constant, so these attribute_group structures can also be
      declared constant.
      Done using coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct attribute_group i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct iio_info x;
      @@
      x.attrs=&i@p;
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      static
      +const
      struct attribute_group i={...};
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct attribute_group i;
      
      File size before:
         text	   data	    bss	    dec	    hex	filename
         4037	    288	      0	   4325	   10e5	drivers/iio/proximity/as3935.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
         4101	    256	      0	   4357	   1105	drivers/iio/proximity/as3935.o
      Signed-off-by: Nsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      7ab89e1e
  7. 31 3月, 2017 4 次提交
  8. 30 3月, 2017 3 次提交
    • S
      iio: adc: ad799x: constify attribute_group structures · 612dc0e2
      simran singhal 提交于
      Check for attribute_group structures that are only stored in the
      event_attrs filed of iio_info structure. As the event_attrs field of
      iio_info structures is constant, so these attribute_group structures can
      also be declared constant.
      Done using coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct attribute_group i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct iio_info x;
      @@
      x.event_attrs=&i@p;
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      static
      +const
      struct attribute_group i={...};
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct attribute_group i;
      
      File size before:
         text    data     bss     dec     hex filename
        26051     464       0   26515    6793 drivers/iio/adc/ad799x.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
        26115	    400	      0	  26515	   6793	drivers/iio/adc/ad799x.o
      Signed-off-by: Nsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      612dc0e2
    • S
      iio: adc: max1363: constify attribute_group structures · c94645b1
      simran singhal 提交于
      Check for attribute_group structures that are only stored in the
      event_attrs filed of iio_info structure. As the event_attrs field of
      iio_info structures is constant, so these attribute_group structures can
      also be declared constant. Done using coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct attribute_group i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct iio_info x;
      @@
      x.event_attrs=&i@p;
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      static
      +const
      struct attribute_group i={...};
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct attribute_group i;
      
      File size before:
         text    data     bss     dec     hex filename
        36951     448       0   37399    9217 drivers/iio/adc/max1363.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
        37015	    384	      0	  37399	   9217	drivers/iio/adc/max1363.o
      Signed-off-by: Nsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      c94645b1
    • S
      iio: dac: ad5504: constify attribute_group structures · e36020fd
      simran singhal 提交于
      Check for attribute_group structures that are only stored in the
      event_attrs filed of iio_info structure. As the event_attrs field of
      iio_info structures is constant, so these attribute_group structures can
      also be declared constant. Done using coccinelle:
      
      @r1 disable optional_qualifier @
      identifier i;
      position p;
      @@
      static struct attribute_group i@p = {...};
      
      @ok1@
      identifier r1.i;
      position p;
      struct iio_info x;
      @@
      x.event_attrs=&i@p;
      
      @bad@
      position p!={r1.p,ok1.p};
      identifier r1.i;
      @@
      i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      static
      +const
      struct attribute_group i={...};
      
      @depends on !bad disable optional_qualifier@
      identifier r1.i;
      @@
      +const
      struct attribute_group i;
      
      File size before:
         text    data     bss     dec     hex filename
         3046     360       0    3406     d4e drivers/iio/dac/ad5504.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
         3110	    296	      0	   3406	    d4e	drivers/iio/dac/ad5504.o
      Signed-off-by: Nsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      e36020fd
  9. 29 3月, 2017 1 次提交