1. 13 Nov, 2016 34 commits
  2. 12 Nov, 2016 6 commits
    • Brian Masney's avatar
      staging: iio: tsl2583: fix issue with changes to calibscale and int_time not being set on the chip · 2167769a
      Brian Masney authored
      When updating the in_illuminance_calibscale and
      in_illuminance_integration_time sysfs attributes, these values were not
      actually written to the chip. The chip would continue to use the old
      parameters. Extracted out tsl2583_set_als_gain() and
      tsl2583_set_als_time() functions that are now called when these sysfs
      attributes are updated. The chip initialization also calls these these
      new functions.
      Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      2167769a
    • Brian Masney's avatar
      staging: iio: tsl2583: split out functionality of taos_chip_on() · c908fb76
      Brian Masney authored
      taos_chip_on() reads an eight member array called taos_config
      that contains the desired state of the chip's registers. Only four
      of the registers actually need to be written to. The four that do
      not need to be written to are for the {low,high} byte of the lower
      interrupt threshold and the {low,high} byte of the upper interrupt
      threshold. Interrupts are currently not supported by this driver
      so there is no need to write to these registers.
      
      This patch removes the taos_config array and separates out the
      i2c calls that write to the CONTROL, TIMING, INTERRUPT and ANALOG
      registers. This is part of a larger refactor that was split up to
      make the code review easier.
      Signed-off-by: default avatarBrian Masney <masneyb@onstation.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      c908fb76
    • Linus Walleij's avatar
      iio: pressure: st_pressure: inline per-sensor data · 91a86a3b
      Linus Walleij authored
      We have #defines for all the individual sensor registers and
      value/mask pairs #defined at the top of the file and used at
      exactly one spot.
      
      This is usually good if the #defines give a meaning to the
      opaque magic numbers.
      
      However in this case, the semantic meaning is inherent in the
      name of the C99-addressable fields, and that means duplication
      of information, and only makes the code hard to maintain since
      you every time have to add a new #define AND update the site
      where it is to be used.
      
      Get rid of the #defines and just open code the values into the
      appropriate struct elements. Make sure to explicitly address
      the .hz and .value fields in the st_sensor_odr_avl struct
      so that the meaning of all values is clear.
      
      This patch is purely syntactic should have no semantic effect.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      91a86a3b
    • Linus Walleij's avatar
      iio: magn: st_magn: inline per-sensor data · 57d03554
      Linus Walleij authored
      We have #defines for all the individual sensor registers and
      value/mask pairs #defined at the top of the file and used at
      exactly one spot.
      
      This is usually good if the #defines give a meaning to the
      opaque magic numbers.
      
      However in this case, the semantic meaning is inherent in the
      name of the C99-addressable fields, and that means duplication
      of information, and only makes the code hard to maintain since
      you every time have to add a new #define AND update the site
      where it is to be used.
      
      Get rid of the #defines and just open code the values into the
      appropriate struct elements. Make sure to explicitly address
      the .hz and .value fields in the st_sensor_odr_avl struct
      so that the meaning of all values is clear.
      
      This patch is purely syntactic should have no semantic effect.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      57d03554
    • Linus Walleij's avatar
      iio: gyro: st_gyro: inline per-sensor data · d8594fa2
      Linus Walleij authored
      We have #defines for all the individual sensor registers and
      value/mask pairs #defined at the top of the file and used at
      exactly one spot.
      
      This is usually good if the #defines give a meaning to the
      opaque magic numbers.
      
      However in this case, the semantic meaning is inherent in the
      name of the C99-addressable fields, and that means duplication
      of information, and only makes the code hard to maintain since
      you every time have to add a new #define AND update the site
      where it is to be used.
      
      Get rid of the #defines and just open code the values into the
      appropriate struct elements. Make sure to explicitly address
      the .hz and .value fields in the st_sensor_odr_avl struct
      so that the meaning of all values is clear.
      
      This patch is purely syntactic should have no semantic effect.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      d8594fa2
    • Peter Rosin's avatar
      iio: imu: inv_mpu6050: inform the i2c mux core about how it is used · 08f3ffce
      Peter Rosin authored
      The i2c mux core can then take appropriate action depending on if it is
      used for an actual i2c mux, or for an arbitrator or gate. In this case
      it is used as a gate.
      
      This will make devicetree bindings simpler when they are eventually
      added.
      Signed-off-by: default avatarPeter Rosin <peda@axentia.se>
      Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
      08f3ffce