Ad5529r driver#3234
Conversation
0579d93 to
a0d5e30
Compare
59be8ec to
58a740e
Compare
nunojsa
left a comment
There was a problem hiding this comment.
Here it goes my first pass! Make sure to also pass this though AI
One more fundamental observation! This only supports raw writes which does bring too much... Can we at least have support for scale (and possibly offset if there is one)?
58a740e to
12a34eb
Compare
a1028f5 to
b04de21
Compare
|
changelog: Added Scale and offset implementation |
5d18d61 to
353fec2
Compare
11c5e13 to
6114e4f
Compare
nunojsa
left a comment
There was a problem hiding this comment.
I would really double check the regmap stuff. Im now wondering why we need the custom bus? We might be able to just use custom spi bus with 8 and 16 bit configs
e196cfc to
fdad854
Compare
07586f8 to
05214e5
Compare
|
Changelog:
|
nunojsa
left a comment
There was a problem hiding this comment.
For the code, I think we can just send this upstream. But take care about the 12 vs 16 bits variants. It needs better justification, likely in the commit message about why we need two compatibles. I mean, if can just add the second datasheet link, then it becomes clear
1bd11f3 to
784979b
Compare
|
Changelog:
|
fdad854 to
c2f48c4
Compare
|
Changelog:
|
nunojsa
left a comment
There was a problem hiding this comment.
Alright, AFAICT go ahead and send this upstream
|
Rebased branch with mirror_ci/jic23/iio/testing |
|
Rebased branch with mirror_ci/jic23/iio/testing, get rid of the CI deploy commit |
Devicetree bindings for AD5529R 16 channel 12/16 bit high voltage, buffered voltage output digital-to-analog converter (DAC) with an integrated precision reference. Signed-off-by: Janani Sunil <janani.sunil@analog.com>
|
Upstream change requests:
|
Add support for AD5529R 16-channel, 12/16 bit Digital to Analog Converter Signed-off-by: Janani Sunil <janani.sunil@analog.com>
| int ret, ch, range_idx = AD5529R_RANGE_0V_5V; | ||
| s32 vals[2]; | ||
|
|
||
| for_each_available_child_of_node(np, child) { |
There was a problem hiding this comment.
use device_properties. It is preferred over OF. Also there are _scoped() versions so that you don't have to care about _put()
|
|
||
| static const struct regmap_range ad5529r_16bit_readable_ranges[] = { | ||
| regmap_reg_range(AD5529R_REG_MULTI_DAC_CH_SEL, AD5529R_REG_INIT_CRC_ERR_STAT), | ||
| regmap_reg_range(AD5529R_REG_MULTI_DAC_HOTPATH_SW_LDAC, AD5529R_MAX_REGISTER), |
There was a problem hiding this comment.
Do we include any address we should not read in the above ranges? I understand the stride config and that will prevent reading in invalid values. I also assume that for this to work all 16bit addresses are indeed multiple of 2?
PR Description
necessary to understand them. List any dependencies required for this change.
any space), or simply check them after publishing the PR.
description and try to push all related PRs simultaneously.
PR Type
PR Checklist