1. 02 Apr, 2017 1 commit
    • simran singhal's avatar
      iio: light: lm3533-als: constify attribute_group structures · 98b6d2b6
      simran singhal authored
      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;
      
      As the attrs field of iio_info structures is also constant, so these
      attribute_group structures can also be declared constant. Done manually.
      
      File size before:
         text    data     bss     dec     hex filename
         5798    2376       0    8174    1fee drivers/iio/light/lm3533-als.o
      
      File size after:
         text	   data	    bss	    dec	    hex	filename
         5926	   2248	      0	   8174	   1fee	drivers/iio/light/lm3533-als.o
      Signed-off-by: default avatarsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      98b6d2b6
  2. 01 Apr, 2017 8 commits
    • Rick Altherr's avatar
      iio: Aspeed ADC · 57380323
      Rick Altherr authored
      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: default avatarRick Altherr <raltherr@google.com>
      Tested-by: default avatarXo Wang <xow@google.com>
      Reviewed-by: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      57380323
    • Rick Altherr's avatar
    • simran singhal's avatar
      staging: iio: light: tsl2x7x constify attribute_group structures · d952b4e6
      simran singhal authored
      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: default avatarsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      d952b4e6
    • simran singhal's avatar
      iio: adc: hx711: constify attribute_group structures · 4214dc18
      simran singhal authored
      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: default avatarsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      4214dc18
    • simran singhal's avatar
      iio: humidity: hdc100x: constify attribute_group structures · 757cff86
      simran singhal authored
      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: default avatarsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      757cff86
    • simran singhal's avatar
      iio: light: apds9960: constify attribute_group structures · 3ca437c0
      simran singhal authored
      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: default avatarsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      3ca437c0
    • simran singhal's avatar
      iio: light: bh1750: constify attribute_group structures · c2869498
      simran singhal authored
      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: default avatarsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      c2869498
    • simran singhal's avatar
      iio: proximity: as3935: constify attribute_group structures · 7ab89e1e
      simran singhal authored
      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: default avatarsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      7ab89e1e
  3. 30 Mar, 2017 4 commits
  4. 29 Mar, 2017 3 commits
    • simran singhal's avatar
      iio: adc: ad799x: constify attribute_group structures · 612dc0e2
      simran singhal authored
      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: default avatarsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      612dc0e2
    • simran singhal's avatar
      iio: adc: max1363: constify attribute_group structures · c94645b1
      simran singhal authored
      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: default avatarsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      c94645b1
    • simran singhal's avatar
      iio: dac: ad5504: constify attribute_group structures · e36020fd
      simran singhal authored
      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: default avatarsimran singhal <singhalsimran0@gmail.com>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      e36020fd
  5. 25 Mar, 2017 9 commits
  6. 23 Mar, 2017 9 commits
  7. 22 Mar, 2017 1 commit
    • Greg Kroah-Hartman's avatar
      Merge tag 'iio-for-4.12b' of... · c831c583
      Greg Kroah-Hartman authored
      Merge tag 'iio-for-4.12b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
      
      Jonathan writes:
      
      2nd set of new device support, features and cleanups for IIO in the 4.12 cycle
      
      A good collection of outreachy related patches in here - mostly staging
      driver cleanup. Also a fair number of patches added explicit OF device ID
      tables for i2c drivers - a precursor to dropping (eventually) the implicit
      probing.
      
      New Device Support
      * Allwinner SoC ADC.
        - So far covers the sun4i-a10, sun5i-a13 and sun6i-a31 general purpose ADCs,
        including thermal side of things.
        This missed the last cycle due to my incompetence, so good to get in now,
        particularly as various patches dependent on it are appearing.
      * ltc2632
        - new driver supporting ltc2632-l12, ltc2632-l10, ltc2632-l8, ltc2632-h12,
          ltc-2632-h10, ltc-2632-h8 dacs
      
      Cleanups
      * Documentation
        - drop a broken reference to i2c/trivial-devices
      * ad2s1200
        - drop & from function pointers for consistency.
      * ad2s1210
        - formatting fixes.
      * ad7152
        - octal permissions instead of symbolic.
        - drop & from function pointers for consistent usage.
      * ad7192
        - drop & from function pointers for consistent usage.
      * ad7280
        - replace core mlock usage with a local lock as mlock is intended only to
        protect the current device state (direct reads, or triggered and buffered)
      * ad7746
        - drop & from function pointers for consistent usage.
        - replace core mlock usage with a local lock as mlock is intended only to
        protect the current device state (direct reads, or triggered and buffered)
      * ad7754
        - move contents of header file into source file as not used anywhere else.
      * ad7759
        - move contents of header file into source file as not used anywhere else.
      * ad7780
        - drop & from function pointers for consistent usage.
      * ad7832
        - replace core mlock usage with a local lock as mlock is intended only to
        protect the current device state (direct reads, or triggered and buffered)
      * ad9834
        - replace core mlock usage with a local lock as mlock is intended only to
        protect the current device state (direct reads, or triggered and buffered)
        - drop an unnecessary goto in favour of direct return.
      * adis16060
        - drop & from function pointers as inconsistent.
      * adis16201
        - drop a local mutex as the adis core already protects everything necessary.
        - drop & from function pointers for consistent usage.
      * adis16203
        - drop & from function pointers for consistent usage.
      * adis16209
        - drop a local mutex as the adis core already protects everything necessary.
        - use an enum for scan index giving slightly nicer code.
        - drop & from function pointers for consistent usage.
      * adis16240
        - drop a local mutex as the adis core already protects everything necessary.
        - use an enum for scan index giving slightly nicer code.
        - drop & from function pointers for consistent usage.
      * apds9960
        - add OF device ID table.
      * bma180
        - add OF device ID table.
        - prefer unsigned int to bare use of unsigned.
      * bmc150_magn
        - add OF device ID table.
      * hmp03
        - add OF device ID table.
      * ina2xx
        - add OF device ID table.
      * itg3200
        - add OF device ID table.
      * mag3110
        - add OF device ID table.
      * max11100
        - remove .owner field as it is set by the spi core.
      * max5821
        - add .of_match_table set to the ID table which was present but not used.
      * mcp4725
        - add OF device ID table.
      * mlx96014
        - add OF device ID table.
      * mma7455
        - add OF device ID table.
      * mma7660
        - add OF device ID table.
      * mpl3115
        - add OF device ID table.
      * mpu6050
        - add OF device ID table.
      * pc104
        - mask pc104 drivers behind a global pc104 config option.
      * ti-ads1015
        - add OF device ID table.
      * tsl2563
        - add OF device ID table.
      * us5182d
        - add OF device ID table.
      c831c583
  8. 21 Mar, 2017 5 commits