03 Sep, 2018

1 commit


25 Jul, 2018

1 commit

  • …/iio into staging-next

    Jonathan writes:

    Second set of IIO new device support, features and cleanups.

    There are also a couple of fixes that can wait for the coming merge
    window.

    Core new features

    * Support for phase channels (used in time of flight sensors amongst
    other things)
    * Support for deep UV light channel modifier.

    New Device Support

    * AD4758 DAC
    - New driver and dt bindings.
    * adxl345
    - Support the adxl375 +-200g part which is register compatible.
    * isl29501 Time of flight sensor.
    - New driver
    * meson-saradc
    - Support the Meson8m2 Socs - right now this is just an ID, but there will
    be additional difference in future.
    * mpu6050
    - New ID for 6515 variant.
    * si1133 UV sensor.
    - New driver
    * Spreadtrum SC27xx PMIC ADC
    - New driver and dt bindings.

    Features

    * adxl345
    - Add calibration offset readback and writing.
    - Add sampling frequency control.

    Fixes and Cleanups

    * ad5933
    - Use a macro for the channel definition to reduce duplication.
    * ad9523
    - Replace use of core mlock with a local lock. Part of ongoing efforts
    to avoid confusing the purpose of mlock which is only about iio core
    state changes.
    - Fix displayed phase which was out by a factor of 10.
    * adxl345
    - Add a link to the datasheet.
    - Rework the use of the address field in the chan_spec structures to
    allow addition of more per channel information.
    * adis imu
    - Mark switch fall throughs.
    * at91-sama5d2
    - Fix some casting on big endian systems.
    * bmp280
    - Drop some DT elements that aren't used and should mostly be done from
    userspace rather than in DT.
    * hx711
    - add clock-frequency dt binding and resulting delay to deal with capacitance
    issue on some boards.
    - fix a spurious unit-address in the example.
    * ina2xx
    - Avoid a possible kthread_stop with a stale task_struct.
    * ltc2632
    - Remove some unused local variables (assigned but value never used).
    * max1363
    - Use device_get_match_data to remove some boilerplate.
    * mma8452
    - Mark switch fall throughs.
    * sca3000
    - Fix a missing return in a switch statement (a bad fallthrough
    previously!)
    * sigma-delta-modulator
    - Drop incorrect unit address from the DT example.
    * st_accel
    - Use device_get_match_data to drop some boiler plate.
    - Move to probe_new for i2c driver as second parameter not used.
    * st_sensors library
    - Use a strlcpy (safe in this case).
    * st_lsm6dsx
    - Add some error logging.
    * ti-ads7950
    - SPDX
    - Allow simultaneous buffered and polled reads. Needed on a Lego Mindstorms
    EV3 where some channels are used for power supply monitoring at a very low
    rate.
    * ti-dac5571
    - Remove an unused variable.
    * xadc
    - Drop some dead code.

    Greg Kroah-Hartman
     

15 Jul, 2018

2 commits


08 Jul, 2018

1 commit


02 Jul, 2018

1 commit


26 Jun, 2018

1 commit

  • …/iio into staging-next

    Jonathan writes:

    First set of IIO new device support, features and cleanups in the 4.19 cycle

    The usual mixed bunch. Particular good to see is the generic
    touch screen driver. Will be interesting to see if this works
    for other ADCs without major changes.

    Core features
    * Channel types
    - New position relative channel type primarily for touch screen
    sensors to feed the generic touchscreen driver.

    New device support
    * ad5586
    - Add support for the AD5311R DAC.

    * Generic touch screen driver as an IIO consumer.
    - Note this is in input, but due to dependencies is coming through
    the IIO tree.
    - Specific support for this added to the at91-sama5d2 ADC.
    - Various necessary DT bindings added.

    Staging Drops
    * ADIS16060 gyro
    - A device with a very odd interface that was never cleanly supported.
    It's now very difficult to get, so unlikely it'll ever be fixed up.

    Cleanups and minor features and fixes
    * core
    - Fix y2038 timestamp issues now the core support is in place.
    * 104-quad-8
    - Provide some defines for magic numbers to help readability.
    - Fix an off by one error in register selection
    * ad7606
    - Put in a missing function parameter name in a prototype.
    * adis16023
    - Use generic sign_extend function rather than local version.
    * adis16240
    - Use generic sign_extend funciton rather than local version.
    * at91-sama5d2
    - Drop dependency on HAS_DMA now this is handled elsewhere. Will
    improve build test coverage.
    - Add oversampling ratio control. Note there is a minor ABI change
    here to increase the apparent depth to 14 bits so as to allow
    for transparent provision of different oversampling ratios that
    drop the actual bit depth to 13 or 12 bits.
    * hx711
    - Add a MAINTAINERS entry for this device.
    * inv_mpu6050
    - Replace the timestamp fifo 'special' code with generic timestamp
    handling.
    - Switch to using local store of timestamp divider rather than rate
    as that is more helpful for accurate time measurement.
    - Fix an unaligned access that didn't seem to be causing any trouble.
    - Use the fifo overflow bit to track the overflow status rather than
    a software counter.
    - New timestamping mechanism to deal with missed sample interrupts.
    * stm32-adc
    - Drop HAS_DMA build dependency.
    * sun4i-gpadc
    - Select REGMAP_IRQ a very rarely hit build issue fix.

    Greg Kroah-Hartman
     

24 Jun, 2018

1 commit

  • Commit 5ec6486daa98 ("iio:imu: inv_mpu6050: support more interrupt types")
    causes inv_mpu_core_probe() to fail if the IRQ does not have a
    trigger-type setup.

    This happens on machines where the mpu6050 is enumerated through ACPI and
    an older Interrupt type ACPI resource is used for the interrupt, rather
    then a GpioInt type type, causing the mpu6050 driver to no longer work
    there. This happens on e.g. the Asus T100TA.

    This commits makes the mpu6050 fallback to the old IRQF_TRIGGER_RISING
    default if the irq-type is not setup, fixing this.

    Signed-off-by: Hans de Goede
    Fixes: 5ec6486daa98 ("iio:imu: inv_mpu6050: support more interrupt types")
    Reviewed-by: Martin Kelly
    Reviewed-by: Jean-Baptiste Maneyrol
    Signed-off-by: Jonathan Cameron

    Hans de Goede
     

13 Jun, 2018

1 commit

  • The kzalloc() function has a 2-factor argument form, kcalloc(). This
    patch replaces cases of:

    kzalloc(a * b, gfp)

    with:
    kcalloc(a * b, gfp)

    as well as handling cases of:

    kzalloc(a * b * c, gfp)

    with:

    kzalloc(array3_size(a, b, c), gfp)

    as it's slightly less ugly than:

    kzalloc_array(array_size(a, b), c, gfp)

    This does, however, attempt to ignore constant size factors like:

    kzalloc(4 * 1024, gfp)

    though any constants defined via macros get caught up in the conversion.

    Any factors with a sizeof() of "unsigned char", "char", and "u8" were
    dropped, since they're redundant.

    The Coccinelle script used for this was:

    // Fix redundant parens around sizeof().
    @@
    type TYPE;
    expression THING, E;
    @@

    (
    kzalloc(
    - (sizeof(TYPE)) * E
    + sizeof(TYPE) * E
    , ...)
    |
    kzalloc(
    - (sizeof(THING)) * E
    + sizeof(THING) * E
    , ...)
    )

    // Drop single-byte sizes and redundant parens.
    @@
    expression COUNT;
    typedef u8;
    typedef __u8;
    @@

    (
    kzalloc(
    - sizeof(u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * (COUNT)
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(__u8) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(char) * COUNT
    + COUNT
    , ...)
    |
    kzalloc(
    - sizeof(unsigned char) * COUNT
    + COUNT
    , ...)
    )

    // 2-factor product with sizeof(type/expression) and identifier or constant.
    @@
    type TYPE;
    expression THING;
    identifier COUNT_ID;
    constant COUNT_CONST;
    @@

    (
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_ID)
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_ID
    + COUNT_ID, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (COUNT_CONST)
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * COUNT_CONST
    + COUNT_CONST, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_ID)
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_ID
    + COUNT_ID, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (COUNT_CONST)
    + COUNT_CONST, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * COUNT_CONST
    + COUNT_CONST, sizeof(THING)
    , ...)
    )

    // 2-factor product, only identifiers.
    @@
    identifier SIZE, COUNT;
    @@

    - kzalloc
    + kcalloc
    (
    - SIZE * COUNT
    + COUNT, SIZE
    , ...)

    // 3-factor product with 1 sizeof(type) or sizeof(expression), with
    // redundant parens removed.
    @@
    expression THING;
    identifier STRIDE, COUNT;
    type TYPE;
    @@

    (
    kzalloc(
    - sizeof(TYPE) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(TYPE))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * (COUNT) * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * (STRIDE)
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    |
    kzalloc(
    - sizeof(THING) * COUNT * STRIDE
    + array3_size(COUNT, STRIDE, sizeof(THING))
    , ...)
    )

    // 3-factor product with 2 sizeof(variable), with redundant parens removed.
    @@
    expression THING1, THING2;
    identifier COUNT;
    type TYPE1, TYPE2;
    @@

    (
    kzalloc(
    - sizeof(TYPE1) * sizeof(TYPE2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(THING1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(THING1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * COUNT
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    |
    kzalloc(
    - sizeof(TYPE1) * sizeof(THING2) * (COUNT)
    + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2))
    , ...)
    )

    // 3-factor product, only identifiers, with redundant parens removed.
    @@
    identifier STRIDE, SIZE, COUNT;
    @@

    (
    kzalloc(
    - (COUNT) * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * STRIDE * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - (COUNT) * (STRIDE) * (SIZE)
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    |
    kzalloc(
    - COUNT * STRIDE * SIZE
    + array3_size(COUNT, STRIDE, SIZE)
    , ...)
    )

    // Any remaining multi-factor products, first at least 3-factor products,
    // when they're not all constants...
    @@
    expression E1, E2, E3;
    constant C1, C2, C3;
    @@

    (
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(
    - (E1) * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * E3
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - (E1) * (E2) * (E3)
    + array3_size(E1, E2, E3)
    , ...)
    |
    kzalloc(
    - E1 * E2 * E3
    + array3_size(E1, E2, E3)
    , ...)
    )

    // And then all remaining 2 factors products when they're not all constants,
    // keeping sizeof() as the second factor argument.
    @@
    expression THING, E1, E2;
    type TYPE;
    constant C1, C2, C3;
    @@

    (
    kzalloc(sizeof(THING) * C2, ...)
    |
    kzalloc(sizeof(TYPE) * C2, ...)
    |
    kzalloc(C1 * C2 * C3, ...)
    |
    kzalloc(C1 * C2, ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * (E2)
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(TYPE) * E2
    + E2, sizeof(TYPE)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * (E2)
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - sizeof(THING) * E2
    + E2, sizeof(THING)
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * E2
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - (E1) * (E2)
    + E1, E2
    , ...)
    |
    - kzalloc
    + kcalloc
    (
    - E1 * E2
    + E1, E2
    , ...)
    )

    Signed-off-by: Kees Cook

    Kees Cook
     

10 Jun, 2018

5 commits


23 May, 2018

1 commit

  • Although the driver allows frequencies between 4 and 1000 Hz, only the
    frequencies advertised in the available frequencies file are backed
    properly by a low-pass filter to prevent aliasing, so it's best to use
    them. Since this is not obvious to the user, add a comment explaining
    what's going on.

    Signed-off-by: Martin Kelly
    Acked-by: Jean-Baptiste Maneyrol
    Signed-off-by: Jonathan Cameron

    Martin Kelly
     

12 May, 2018

1 commit

  • Prior to this loop, we check if fifo_count < bytes_per_datum and bail if
    so. This means that when we hit the loop, we know that fifo_count >=
    bytes_per_datum, so the check is unneeded and we can turn the loop into
    a do-while for a slight performance improvement.

    Signed-off-by: Martin Kelly
    Signed-off-by: Jonathan Cameron

    Martin Kelly
     

07 May, 2018

5 commits


28 Apr, 2018

4 commits


21 Apr, 2018

3 commits

  • Currently, we support only rising edge interrupts, and in fact we assume
    that the interrupt we're given is rising edge (and things won't work if
    it's not). However, the device supports rising edge, falling edge, level
    low, and level high interrupts.

    Empirically, on my system, switching to level interrupts has fixed a
    problem I had with significant (~40%) interrupt loss with edge
    interrupts. This issue is likely related to the SoC I'm using (Allwinner
    H3), but being able to switch the interrupt type is still a very useful
    workaround.

    I tested this with each interrupt type and verified correct behavior in
    a logic analyzer.

    Add support for these interrupt types while also eliminating the error
    case of the device tree and driver using different interrupt types.

    Signed-off-by: Martin Kelly
    Acked-by: Jean-Baptiste Maneyrol
    Signed-off-by: Jonathan Cameron

    Martin Kelly
     
  • Set power function is rewritten manually inside i2c mux select.
    Better use the already identical existing function.

    Signed-off-by: Jean-Baptiste Maneyrol
    Signed-off-by: Jonathan Cameron

    Jean-Baptiste Maneyrol
     
  • Rewrite set_power_itg. Failing when turning power off is
    no more decreasing the counter now and sleeping only happens
    when effectively turning the chip on. Fix also usage in init
    function (setting power on one time is sufficient to ensure
    chip is effectively on).

    Signed-off-by: Jean-Baptiste Maneyrol
    Signed-off-by: Jonathan Cameron

    Jean-Baptiste Maneyrol
     

16 Apr, 2018

2 commits


09 Apr, 2018

1 commit


08 Apr, 2018

1 commit

  • According to the latest datasheet, LSM6DSM and LSM6DSL imu sensors
    export GENMASK(10, 0) for FIFO threshold mask definition. Despite
    that is not an actual issue since write on fifo_th register is protected
    by max_fifo_size value, fix fifo_th and fifo_diff register definitions

    Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver")
    Signed-off-by: Lorenzo Bianconi
    Signed-off-by: Jonathan Cameron

    Lorenzo Bianconi
     

30 Mar, 2018

1 commit


26 Feb, 2018

1 commit


17 Feb, 2018

1 commit

  • The adis_probe_trigger() creates a new IIO trigger and requests an
    interrupt associated with the trigger. The interrupt uses the generic
    iio_trigger_generic_data_rdy_poll() function as its interrupt handler.

    Currently the driver initializes some fields of the trigger structure after
    the interrupt has been requested. But an interrupt can fire as soon as it
    has been requested. This opens up a race condition.

    iio_trigger_generic_data_rdy_poll() will access the trigger data structure
    and dereference the ops field. If the ops field is not yet initialized this
    will result in a NULL pointer deref.

    It is not expected that the device generates an interrupt at this point, so
    typically this issue did not surface unless e.g. due to a hardware
    misconfiguration (wrong interrupt number, wrong polarity, etc.).

    But some newer devices from the ADIS family start to generate periodic
    interrupts in their power-on reset configuration and unfortunately the
    interrupt can not be masked in the device. This makes the race condition
    much more visible and the following crash has been observed occasionally
    when booting a system using the ADIS16460.

    Unable to handle kernel NULL pointer dereference at virtual address 00000008
    pgd = c0004000
    [00000008] *pgd=00000000
    Internal error: Oops: 5 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-04126-gf9739f0-dirty #257
    Hardware name: Xilinx Zynq Platform
    task: ef04f640 task.stack: ef050000
    PC is at iio_trigger_notify_done+0x30/0x68
    LR is at iio_trigger_generic_data_rdy_poll+0x18/0x20
    pc : [] lr : [] psr: 60000193
    sp : ef051bb8 ip : 00000000 fp : ef106400
    r10: c081d80a r9 : ef3bfa00 r8 : 00000087
    r7 : ef051bec r6 : 00000000 r5 : ef3bfa00 r4 : ee92ab00
    r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : ee97e400
    Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
    Control: 18c5387d Table: 0000404a DAC: 00000051
    Process swapper/0 (pid: 1, stack limit = 0xef050210)
    [] (iio_trigger_notify_done) from [] (__handle_irq_event_percpu+0x88/0x118)
    [] (__handle_irq_event_percpu) from [] (handle_irq_event_percpu+0x1c/0x58)
    [] (handle_irq_event_percpu) from [] (handle_irq_event+0x38/0x5c)
    [] (handle_irq_event) from [] (handle_level_irq+0xa4/0x130)
    [] (handle_level_irq) from [] (generic_handle_irq+0x24/0x34)
    [] (generic_handle_irq) from [] (zynq_gpio_irqhandler+0xb8/0x13c)
    [] (zynq_gpio_irqhandler) from [] (generic_handle_irq+0x24/0x34)
    [] (generic_handle_irq) from [] (__handle_domain_irq+0x5c/0xb4)
    [] (__handle_domain_irq) from [] (gic_handle_irq+0x48/0x8c)
    [] (gic_handle_irq) from [] (__irq_svc+0x6c/0xa8)

    To fix this make sure that the trigger is fully initialized before
    requesting the interrupt.

    Fixes: ccd2b52f4ac6 ("staging:iio: Add common ADIS library")
    Reported-by: Robin Getz
    Signed-off-by: Lars-Peter Clausen
    Cc:
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     

31 Jan, 2018

1 commit


08 Jan, 2018

4 commits

  • Use DEFINE_DEBUGFS_ATTRIBUTE rather than DEFINE_SIMPLE_ATTRIBUTE
    for debugfs files.

    Semantic patch information:
    Rationale: DEFINE_SIMPLE_ATTRIBUTE + debugfs_create_file()
    imposes some significant overhead as compared to
    DEFINE_DEBUGFS_ATTRIBUTE + debugfs_create_file_unsafe().

    Generated by: scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci

    Signed-off-by: Venkat Prashanth B U
    Signed-off-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Venkat Prashanth B U
     
  • Remove st_lsm6dsx_write_with_mask() declaration since it has been removed
    in commit 6674bef628e6 ("iio: imu: st_lsm6dsx: add regmap API support")

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

    Lorenzo Bianconi
     
  • Allocate device read buffer at bootstrap and do not put it on the stack
    since it is pretty big (~200B) and its size will increase adding support
    to device hw timestamp.
    Moreover this patch fixes following sparse warnings:
    drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:250:17: warning: Variable length
    array is used.
    drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c:283:55: error: cannot size
    expression

    Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver")
    Signed-off-by: Lorenzo Bianconi
    Signed-off-by: Jonathan Cameron
    Signed-off-by: Greg Kroah-Hartman

    Lorenzo Bianconi
     
  • Introduce regmap API support to access to i2c/spi bus instead of
    using a custom support. Set max bulk read to
    (32 / SAMPLE_SIZE) * SAMPLE_SIZE since spi_write_then_read() used in
    regmap_spi indicates that is the max buffer length to use in order to
    avoid a kmalloc for each bus access.
    Remove lock mutex since concurrency is already managed by regmap API

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

    Lorenzo Bianconi