18 Aug, 2013

1 commit


20 Jul, 2013

1 commit

  • When using more than one trigger consumer it can happen that multiple threads
    perform a read-modify-update cycle on 'use_count' concurrently. This can cause
    updates to be lost and use_count can get stuck at non-zero value, in which case
    the IIO core assumes that at least one thread is still running and will wait for
    it to finish before running any trigger handlers again. This effectively renders
    the trigger disabled and a reboot is necessary before it can be used again. To
    fix this make use_count an atomic variable. Also set it to the number of
    consumers before starting the first consumer, otherwise it might happen that
    use_count drops to 0 even though not all consumers have been run yet.

    Signed-off-by: Lars-Peter Clausen
    Tested-by: Denis Ciocca
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     

29 Jun, 2013

1 commit


07 Feb, 2013

1 commit


08 Jul, 2012

1 commit

  • The name sysfs attribute is the same for all triggers, so there is no need to
    register them dynamically at runtime. Create a attribute group for it and set it
    up for the bus attribute group. This also avoids a possible race condition
    where the uevent for the device is sent before the name sysfs attribute has been
    added.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     

07 Jul, 2012

1 commit


23 Jun, 2012

1 commit

  • Use to_iio_trigger(dev) instead of dev_get_drvdata(dev). Both will return the
    trigger which belongs to the device, but the the first on is a bit more
    lightweight.

    Since this is the last location where we used dev_get_drvdata() for retrieving
    the trigger there is no need anymore to assign the the trigger to the devices
    drvdata, so we can remove that as well.

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Lars-Peter Clausen
     

15 May, 2012

1 commit


30 Apr, 2012

1 commit

  • 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.

    @@
    @@
    -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

    Signed-off-by: Lars-Peter Clausen
    Acked-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Lars-Peter Clausen
     

26 Apr, 2012

1 commit

  • Take the core support + the kfifo buffer implentation out of
    staging. Whilst we are far from done in improving this subsystem
    it is now at a stage where the userspae interfaces (provided by
    the core) can be considered stable.

    Drivers will follow over a longer time scale.

    Signed-off-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Jonathan Cameron