1. 02 2月, 2013 4 次提交
  2. 04 1月, 2013 1 次提交
    • G
      Drivers: iio: remove __dev* attributes. · fc52692c
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, and __devexit
      from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Jonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fc52692c
  3. 02 1月, 2013 2 次提交
  4. 27 12月, 2012 1 次提交
    • G
      iio: (max1363) Fix probe error path · 678fb42e
      Guenter Roeck 提交于
      Instantiating the driver with no available regulator results in:
      
      [39711.686393] i2c i2c-7: new_device: Instantiated device max1139 at 0x35
      [39711.688687] BUG: unable to handle kernel paging request at fffffffffffffe13
      [39711.688734] IP: [<ffffffff813e835b>] regulator_disable+0x1b/0x80
      [39711.688788] PGD 1c0e067 PUD 1c0f067 PMD 0
      [39711.688835] Oops: 0000 [#1] SMP
      
      Caused by bad probe error path. Fix it.
      
      Driver should also not attempt to free the interrupt in its error path if
      none was allocated. Fix that problem as well.
      
      Finally, testing if the regulator was allocated is not necessary in the
      remove function, since the probe function bails out if this is the case.
      Remove that check.
      Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      678fb42e
  5. 10 11月, 2012 6 次提交
  6. 04 9月, 2012 1 次提交
  7. 28 8月, 2012 1 次提交
    • L
      staging:iio: Add missing __devinit and __devexit annotations · 8e828752
      Lars-Peter Clausen 提交于
      Autogenerated using the following coccinelle semantic patch:
      
      // <smpl>
      @r1@
      identifier driver;
      identifier fn;
      position p;
      type T;
      @@
      T driver = {
       .remove =
      (
       fn@p
      |
       __devexit_p(fn@p)
      )
      };
      
      @r2@
      identifier r1.fn;
      position p != r1.p;
      @@
      fn@p
      
      @r3@
      identifier r1.fn;
      position r1.p;
      @@
      (
       __devexit_p(fn@p)
      |
      -fn@p
      +__devexit_p(fn)
      )
      
      @depends on !r2@
      identifier r1.fn;
      @@
       static
      -int fn
      +int __devexit fn
       (...) { ... }
      
      @r11@
      identifier driver;
      identifier fn;
      position p;
      type T;
      @@
      T driver = {
      	.probe = fn@p
      };
      
      @r12@
      identifier r11.fn;
      position p != r11.p;
      @@
      fn@p
      
      @depends on !r12@
      identifier r11.fn;
      @@
       static
      -int fn
      +int __devinit fn
       (...) { ... }
      // </smpl>
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      8e828752
  8. 15 8月, 2012 1 次提交
    • L
      staging:iio: Constify static iio_chan_spec arrays · f4e4b955
      Lars-Peter Clausen 提交于
      The per driver iio_chan_spec arrays are usually shared between multiple device
      instances. So a single device instance may not modify the iio_chan_spec array
      since this would also affect the other device instances. To make this restriction
      explicit mark the per driver iio_chan_spec arrays as const.
      
      Conversion was done automatically using the following coccinelle semantic patch:
      
      // <smpl>
      @disable optional_qualifier@
      identifier channels;
      @@
      static
      +const
      struct iio_chan_spec channels[] = ...;
      // </smpl>
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      f4e4b955
  9. 15 5月, 2012 1 次提交
  10. 30 4月, 2012 1 次提交
    • L
      staging:iio: Streamline API function naming · 7cbb7537
      Lars-Peter Clausen 提交于
      Currently we use two different naming schemes in the IIO API, iio_verb_object
      and iio_object_verb. E.g iio_device_register and iio_allocate_device. This
      patches renames instances of the later to the former. The patch also renames allocate to
      alloc as this seems to be the preferred form throughout the kernel.
      
      In particular the following renames are performed by the patch:
      	iio_put_device -> iio_device_put
      	iio_allocate_device -> iio_device_alloc
      	iio_free_device -> iio_device_free
      	iio_get_trigger -> iio_trigger_get
      	iio_put_trigger -> iio_trigger_put
      	iio_allocate_trigger -> iio_trigger_alloc
      	iio_free_trigger -> iio_trigger_free
      
      The conversion was done with the following coccinelle patch with manual fixes to
      comments and documentation.
      
      <smpl>
      @@
      @@
      -iio_put_device
      +iio_device_put
      @@
      @@
      -iio_allocate_device
      +iio_device_alloc
      @@
      @@
      -iio_free_device
      +iio_device_free
      @@
      @@
      -iio_get_trigger
      +iio_trigger_get
      @@
      @@
      -iio_put_trigger
      +iio_trigger_put
      @@
      @@
      -iio_allocate_trigger
      +iio_trigger_alloc
      @@
      @@
      -iio_free_trigger
      +iio_trigger_free
      </smpl>
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Acked-by: NJonathan Cameron <jic23@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7cbb7537
  11. 26 4月, 2012 1 次提交
  12. 19 4月, 2012 1 次提交
  13. 11 4月, 2012 2 次提交
  14. 03 3月, 2012 1 次提交
  15. 25 2月, 2012 1 次提交
  16. 14 2月, 2012 1 次提交
  17. 09 12月, 2011 4 次提交
  18. 27 11月, 2011 3 次提交
    • J
      staging:iio:treewide only use shared to decide on interfaces · c8a9f805
      Jonathan Cameron 提交于
      Internally the fact that say scale is shared across channels is
      actually of remarkably little interest.  Hence lets not store it.
      Numerous devices have weird combinations of channels sharing
      scale anyway so it is not as though this was really telling
      us much. Note however that we do still use the shared sysfs
      attrs thus massively reducing the number of attrs in complex
      drivers.
      
      Side effect is that certain drivers that were abusing this
      (mostly my work) needed to do a few more checks on what the
      channel they are being queried on actually is.
      
      This is also helpful for in kernel interfaces where we
      just want to query the scale and don't care whether it
      is shared with other channels or not.
      Signed-off-by: NJonathan Cameron <jic23@cam.ac.uk>
      Acked-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c8a9f805
    • L
      staging:iio: Do not use bitmasks for channel info addresses · 924f8a21
      Lars-Peter Clausen 提交于
      Currently the iio framework uses bitmasks for the address field of channel info
      attributes. This is for historical reasons and no longer required since it will
      only ever query a single info attribute at once. This patch changes the code to
      use the non-shifted iio_chan_info_enum values for the info attribute address.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      924f8a21
    • J
      staging:iio: header reorganization · af5046af
      Jonathan Cameron 提交于
      Issue brought up by Lars-Peter Clausen. This is a varient of what
      he suggested.
      
      io/iio.h for driver stuff (has to include types.h)
      	Sub files for the bits drivers may or may not use
      	iio/sysfs.h
      	iio/buffer.h (contents of current buffer_generic.h)
      	(obviously anything offering events will need events.h as well)
      iio/types.h for the enums that matter to both
      	iio_chan_type, iio_modifier
      iio/events.h for the event code stuff
      	IIO_EVENT_CODE and friends.  + everything in chrdev.h  So this
      	is the stuff that userspace cares about.
      	Also include iio_event_type, iio_event_direction
      
      Thus iio drivers include iio.h + as required
      events.h
      sysfs.h
      buffer.h
      
      in kernel users (once that interface is merged) will need inkern.h
      which will pull in types.h
      
      Userspace will need just events.h (which pulls in types.h) to get
      everything they need to know about.  Buffer userspace access doesn't
      currently need any core defines. All information about the data
      format is passed through sysfs.
      Signed-off-by: NJonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      af5046af
  19. 18 11月, 2011 1 次提交
  20. 18 10月, 2011 2 次提交
  21. 30 9月, 2011 1 次提交
  22. 27 9月, 2011 2 次提交
  23. 07 9月, 2011 1 次提交