diff options
| author | Rodrigo Alencar <rodrigo.alencar@analog.com> | 2026-05-24 11:17:02 +0100 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-06-02 15:24:47 +0100 |
| commit | 126c78684073ca17c8dc2a174404f30b038d6881 (patch) | |
| tree | 0bb6557cd0b8971df67b85c451c2698148b52e46 /drivers/iio | |
| parent | 628105e8f7af69c3b1d56c67896916b758f6f9c0 (diff) | |
| download | linux-next-126c78684073ca17c8dc2a174404f30b038d6881.tar.gz linux-next-126c78684073ca17c8dc2a174404f30b038d6881.zip | |
iio: dac: ad5686: remove redundant register definition
AD5683_REGMAP and AD5693_REGMAP behave the same way in the common code,
and that is because they target single channel devices from the same
sub-family. There is no reason to separate them and it will make things
simpler when refactoring the chip info table.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Rodrigo Alencar <rodrigo.alencar@analog.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
| -rw-r--r-- | drivers/iio/dac/ad5686.c | 19 | ||||
| -rw-r--r-- | drivers/iio/dac/ad5686.h | 2 |
2 files changed, 5 insertions, 16 deletions
diff --git a/drivers/iio/dac/ad5686.c b/drivers/iio/dac/ad5686.c index 6f403b68cbec..1df1145f35b3 100644 --- a/drivers/iio/dac/ad5686.c +++ b/drivers/iio/dac/ad5686.c @@ -116,10 +116,6 @@ static ssize_t ad5686_write_dac_powerdown(struct iio_dev *indio_dev, if (chan->channel > 0x7) address = 0x8; break; - case AD5693_REGMAP: - shift = 13; - ref_bit_msk = AD5693_REF_BIT_MSK; - break; default: return -EINVAL; } @@ -300,7 +296,7 @@ static const struct ad5686_chip_info ad5686_chip_info_tbl[] = { .channels = ad5311r_channels, .int_vref_mv = 2500, .num_channels = 1, - .regmap_type = AD5693_REGMAP, + .regmap_type = AD5683_REGMAP, }, [ID_AD5337R] = { .channels = ad5337r_channels, @@ -422,24 +418,24 @@ static const struct ad5686_chip_info ad5686_chip_info_tbl[] = { .channels = ad5691r_channels, .int_vref_mv = 2500, .num_channels = 1, - .regmap_type = AD5693_REGMAP, + .regmap_type = AD5683_REGMAP, }, [ID_AD5692R] = { .channels = ad5692r_channels, .int_vref_mv = 2500, .num_channels = 1, - .regmap_type = AD5693_REGMAP, + .regmap_type = AD5683_REGMAP, }, [ID_AD5693] = { .channels = ad5693_channels, .num_channels = 1, - .regmap_type = AD5693_REGMAP, + .regmap_type = AD5683_REGMAP, }, [ID_AD5693R] = { .channels = ad5693_channels, .int_vref_mv = 2500, .num_channels = 1, - .regmap_type = AD5693_REGMAP, + .regmap_type = AD5683_REGMAP, }, [ID_AD5694] = { .channels = ad5684_channels, @@ -540,11 +536,6 @@ int ad5686_probe(struct device *dev, cmd = AD5686_CMD_INTERNAL_REFER_SETUP; ref_bit_msk = AD5686_REF_BIT_MSK; break; - case AD5693_REGMAP: - cmd = AD5686_CMD_CONTROL_REG; - ref_bit_msk = AD5693_REF_BIT_MSK; - st->use_internal_vref = !has_external_vref; - break; default: return -EINVAL; } diff --git a/drivers/iio/dac/ad5686.h b/drivers/iio/dac/ad5686.h index d08160e7fad9..af15994c01ad 100644 --- a/drivers/iio/dac/ad5686.h +++ b/drivers/iio/dac/ad5686.h @@ -46,7 +46,6 @@ #define AD5310_REF_BIT_MSK BIT(8) #define AD5683_REF_BIT_MSK BIT(12) #define AD5686_REF_BIT_MSK BIT(0) -#define AD5693_REF_BIT_MSK BIT(12) /** * ad5686_supported_device_ids: @@ -89,7 +88,6 @@ enum ad5686_regmap_type { AD5310_REGMAP, AD5683_REGMAP, AD5686_REGMAP, - AD5693_REGMAP }; struct ad5686_state; |
