Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
iio: chemical: atlas-ph-sensor: switch to REGCACHE_NONE regmap tree
Browse files Browse the repository at this point in the history
Since there are overlapping volatile regions between parts, and only
register that isn't volatile is the temperature compensation provided
from userspace.

Signed-off-by: Matt Ranostay <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
mranostay authored and jic23 committed Aug 21, 2016
1 parent b015b3e commit d7c0e5a
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions drivers/iio/chemical/atlas-ph-sensor.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,10 @@ struct atlas_data {
__be32 buffer[6]; /* 96-bit data + 32-bit pad + 64-bit timestamp */
};

static const struct regmap_range atlas_volatile_ranges[] = {
regmap_reg_range(ATLAS_REG_INT_CONTROL, ATLAS_REG_INT_CONTROL),
regmap_reg_range(ATLAS_REG_PH_DATA, ATLAS_REG_PH_DATA + 4),
regmap_reg_range(ATLAS_REG_EC_DATA, ATLAS_REG_PSS_DATA + 4),
};

static const struct regmap_access_table atlas_volatile_table = {
.yes_ranges = atlas_volatile_ranges,
.n_yes_ranges = ARRAY_SIZE(atlas_volatile_ranges),
};

static const struct regmap_config atlas_regmap_config = {
.name = ATLAS_REGMAP_NAME,

.reg_bits = 8,
.val_bits = 8,

.volatile_table = &atlas_volatile_table,
.max_register = ATLAS_REG_PSS_DATA + 4,
.cache_type = REGCACHE_RBTREE,
};

static const struct iio_chan_spec atlas_ph_channels[] = {
Expand Down

0 comments on commit d7c0e5a

Please sign in to comment.