1. 13 12月, 2015 4 次提交
  2. 12 12月, 2015 3 次提交
  3. 06 12月, 2015 4 次提交
  4. 04 12月, 2015 4 次提交
  5. 03 12月, 2015 4 次提交
  6. 22 11月, 2015 2 次提交
  7. 19 11月, 2015 1 次提交
  8. 15 11月, 2015 6 次提交
  9. 08 11月, 2015 5 次提交
    • I
      iio: imu: check sscanf return value · 72a868b3
      Ioana Ciornei 提交于
      This patch fixes the following checkpatch warning:
      WARNING: unchecked sscanf return value
      Signed-off-by: NIoana Ciornei <ciorneiioana@gmail.com>
      Acked-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      72a868b3
    • I
      iio: gyro: check sscanf return value · a106b474
      Ioana Ciornei 提交于
      This patch fixes the checkpatch warnings:
      WARNING: unchecked sscanf return value
      Signed-off-by: NIoana Ciornei <ciorneiioana@gmail.com>
      Acked-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      a106b474
    • S
      iio: adc: vf610_adc: Fix division by zero error · 8546d2e5
      Sanchayan Maity 提交于
      In case the fsl,adck-max-frequency property is not present in
      the device tree, a division by zero error results during the
      probe call on kernel boot (see below). This patch fixes it and
      also restores device tree compatibility in case kernels are
      booting with old device trees without this property specified.
      
      [    1.063229] Division by zero in kernel.
      [    1.067152] CPU: 0 PID: 1 Comm: swapper Not tainted
      4.3.0-rc5-00212-gcc88cef #37
      [    1.074650] Hardware name: Freescale Vybrid VF5xx/VF6xx (Device Tree)
      [    1.081135] Backtrace:
      [    1.083694] [<800134a4>] (dump_backtrace) from [<8001369c>]
      (show_stack+0x18/0x1c)
      [    1.091340]  r7:00000008 r6:8e0ae210 r5:00000000 r4:8e299800
      [    1.097146] [<80013684>] (show_stack) from [<80297b1c>]
      (dump_stack+0x24/0x28)
      [    1.104483] [<80297af8>] (dump_stack) from [<80013608>]
      (__div0+0x1c/0x20)
      [    1.111421] [<800135ec>] (__div0) from [<802968b4>] (Ldiv0+0x8/0x10)
      [    1.117865] [<80424350>] (vf610_adc_probe) from [<803153b4>]
      (platform_drv_probe+0x4c/0xac)
      [    1.126311]  r10:00000000 r9:8076a5ec r8:00000000 r7:fffffdfb
      r6:807cc67c r5:8e0ae210
      [    1.134319]  r4:807f6c54
      [    1.136915] [<80315368>] (platform_drv_probe) from [<803138bc>]
      (driver_probe_device+0x20c/0x2f8)
      [    1.145882]  r7:807cc67c r6:00000000 r5:8e0ae210 r4:807f6c54
      [    1.151657] [<803136b0>] (driver_probe_device) from [<80313a3c>]
      (__driver_attach+0x94/0x98)
      [    1.160190]  r9:8076a5ec r8:00000098 r7:00000000 r6:8e0ae244
      r5:807cc67c r4:8e0ae210
      [    1.168112] [<803139a8>] (__driver_attach) from [<80311cb8>]
      (bus_for_each_dev+0x70/0xa4)
      [    1.176383]  r7:00000000 r6:803139a8 r5:807cc67c r4:00000000
      [    1.182159] [<80311c48>] (bus_for_each_dev) from [<80313318>]
      (driver_attach+0x24/0x28)
      [    1.190260]  r6:807bb568 r5:8e2a5b00 r4:807cc67c
      [    1.194996] [<803132f4>] (driver_attach) from [<80312f50>]
      (bus_add_driver+0x1a4/0x21c)
      [    1.203113] [<80312dac>] (bus_add_driver) from [<803142a8>]
      (driver_register+0x80/0x100)
      [    1.211275]  r7:8e2a7dc0 r6:807a8160 r5:80789e14 r4:807cc67c
      [    1.217075] [<80314228>] (driver_register) from [<803152f8>]
      (__platform_driver_register+0x5c/0x64)
      [    1.226216]  r5:80789e14 r4:807a8160
      [    1.229877] [<8031529c>] (__platform_driver_register) from
      [<80789e30>] (vf610_adc_driver_init+0x1c/0x20)
      [    1.239556] [<80789e14>] (vf610_adc_driver_init) from [<800095f8>]
      (do_one_initcall+0x94/0x1dc)
      [    1.248365] [<80009564>] (do_one_initcall) from [<8076ae34>]
      (kernel_init_freeable+0x13c/0x1e0)
      [    1.257155]  r10:80794830 r9:8076a5ec r8:00000098 r7:807d5780
      r6:807d5780 r5:00000006
      [    1.265153]  r4:807a0ee8
      [    1.267753] [<8076acf8>] (kernel_init_freeable) from [<80590ef0>]
      (kernel_init+0x18/0xf0)
      [    1.276021]  r10:00000000 r9:00000000 r8:00000000 r7:00000000
      r6:00000000 r5:80590ed8
      [    1.284015]  r4:807d5780
      [    1.286615] [<80590ed8>] (kernel_init) from [<8000f878>]
      (ret_from_fork+0x14/0x3c)
      [    1.294278]  r5:80590ed8 r4:00000000
      Signed-off-by: NSanchayan Maity <maitysanchayan@gmail.com>
      Acked-by: NFugang Duan <B38611@freescale.com>
      Acked-by: NStefan Agner <stefan@agner.ch>
      Cc: <Stable@vger.kernel.org>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      8546d2e5
    • A
      iio: Reconcile operation order between iio_register/unregister and pm functions · 7d0ead5c
      Adriana Reus 提交于
      At probe, runtime pm should be setup before registering the sysfs interface so
      that all the power attributes are accurate and functional when registering.
      Also, when removing the device we should unregister first to make sure
      that the interfaces that may result in wakeups are no longer available.
      
      Fix this behaviour for the following drivers: bmc150, bmg160, kmx61,
      kxcj-1013, mma9551, mma9553, rpr0521.
      Signed-off-by: NAdriana Reus <adriana.reus@intel.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      7d0ead5c
    • A
      iio: light: pa12203001: Poweroff chip if register fails · 536bbca7
      Adriana Reus 提交于
      Make sure we poweroff the chip if for any reason iio_register
      returns an error.
      Signed-off-by: NAdriana Reus <adriana.reus@intel.com>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      536bbca7
  10. 02 11月, 2015 1 次提交
  11. 31 10月, 2015 1 次提交
  12. 28 10月, 2015 1 次提交
  13. 25 10月, 2015 4 次提交
    • L
      iio: Add a DMAengine framework based buffer · 2d6ca60f
      Lars-Peter Clausen 提交于
      Add a generic fully device independent DMA buffer implementation that uses
      the DMAegnine framework to perform the DMA transfers. This can be used by
      converter drivers that whish to provide a DMA buffer for converters that
      are connected to a DMA core that implements the DMAengine API.
      
      Apart from allocating the buffer using iio_dmaengine_buffer_alloc() and
      freeing it using iio_dmaengine_buffer_free() no additional converter driver
      specific code is required when using this DMA buffer implementation.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      2d6ca60f
    • L
      iio: Add generic DMA buffer infrastructure · 670b19ae
      Lars-Peter Clausen 提交于
      The traditional approach used in IIO to implement buffered capture requires
      the generation of at least one interrupt per sample. In the interrupt
      handler the driver reads the sample from the device and copies it to a
      software buffer. This approach has a rather large per sample overhead
      associated with it. And while it works fine for samplerates in the range of
      up to 1000 samples per second it starts to consume a rather large share of
      the available CPU processing time once we go beyond that, this is
      especially true on an embedded system with limited processing power. The
      regular interrupt also causes increased power consumption by not allowing
      the hardware into deeper sleep states, which is something that becomes more
      and more important on mobile battery powered devices.
      
      And while the recently added watermark support mitigates some of the issues
      by allowing the device to generate interrupts at a rate lower than the data
      output rate, this still requires a storage buffer inside the device and
      even if it exists it is only a few 100 samples deep at most.
      
      DMA support on the other hand allows to capture multiple millions or even
      more samples without any CPU interaction. This allows the CPU to either go
      to sleep for longer periods or focus on other tasks which increases overall
      system performance and power consumption. In addition to that some devices
      might not even offer a way to read the data other than using DMA, which
      makes DMA mandatory to use for them.
      
      The tasks involved in implementing a DMA buffer can be divided into two
      categories. The first category is memory buffer management (allocation,
      mapping, etc.) and hooking this up the IIO buffer callbacks like read(),
      enable(), disable(), etc. The second category of tasks is to setup the
      DMA hardware and manage the DMA transfers. Tasks from the first category
      will be very similar for all IIO drivers supporting DMA buffers, while the
      tasks from the second category will be hardware specific.
      
      This patch implements a generic infrastructure that take care of the former
      tasks. It provides a set of functions that implement the standard IIO
      buffer iio_buffer_access_funcs callbacks. These can either be used as is or
      be overloaded and augmented with driver specific code where necessary.
      
      For the DMA buffer support infrastructure that is introduced in this series
      sample data is grouped by so called blocks. A block is the basic unit at
      which data is exchanged between the application and the hardware. The
      application is responsible for allocating the memory associated with the
      block and then passes the block to the hardware. When the hardware has
      captured the amount of samples equal to size of a block it will notify the
      application, which can then read the data from the block and process it.
      The block size can freely chosen (within the constraints of the hardware).
      This allows to make a trade-off between latency and management overhead.
      The larger the block size the lower the per sample overhead but the latency
      between when the data was captured and when the application will be able to
      access it increases, in a similar way smaller block sizes have a larger per
      sample management overhead but a lower latency. The ideal block size thus
      depends on system and application requirements.
      
      For the time being the infrastructure only implements a simple double
      buffered scheme which allocates two blocks each with half the size of the
      configured buffer size. This provides basic support for capturing
      continuous uninterrupted data over the existing file-IO ABI. Future
      extensions to the DMA buffer infrastructure will give applications a more
      fine grained control over how many blocks are allocated and the size of
      each block. But this requires userspace ABI additions which are
      intentionally not part of this patch and will be added separately.
      
      Tasks of the second category need to be implemented by a device specific
      driver. They can be hooked up into the generic infrastructure using two
      simple callbacks, submit() and abort().
      
      The submit() callback is used to schedule DMA transfers for blocks. Once a
      DMA transfer has been completed it is expected that the buffer driver calls
      iio_dma_buffer_block_done() to notify. The abort() callback is used for
      stopping all pending and active DMA transfers when the buffer is disabled.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      670b19ae
    • L
      iio: Add buffer enable/disable callbacks · e18a2ad4
      Lars-Peter Clausen 提交于
      This patch adds a enable and disable callback that is called when the
      buffer is enabled/disabled. This can be used by buffer implementations that
      need to do some setup or teardown work. E.g. a DMA based buffer can use
      this to start/stop the DMA transfer.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      e18a2ad4
    • L
      iio: Add support for indicating fixed watermarks · b440655b
      Lars-Peter Clausen 提交于
      For buffers which have a fixed wake-up watermark the watermark attribute
      should be read-only. Add a new FIXED_WATERMARK flag to the
      struct iio_buffer_access_funcs, which can be set by a buffer
      implementation.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      b440655b