iio: adc: aspeed: Get and set trimming data.
authorBilly Tsai <billy_tsai@aspeedtech.com>
Wed, 22 Sep 2021 08:15:20 +0000 (16:15 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 19 Oct 2021 07:27:32 +0000 (08:27 +0100)
commitd0a4c17b40736b368f1f26602ad162e24b4108e7
tree9574295cdf166dec47cbc2e325fc116eba84d4ec
parentdf05f384a7e387797c30c2fdf7e4073543ebb57d
iio: adc: aspeed: Get and set trimming data.

The ADC controller has a trimming register for fine-tune the reference
voltage. The trimming value comes from the OTP register which will be
written during chip production. This patch will read this OTP value and
configure it to the ADC register when the ADC controller probes and using
dts property "aspeed,trim-data-valid" to determine whether to execute this
flow.

Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
Link: https://lore.kernel.org/r/20210922081520.30580-12-billy_tsai@aspeedtech.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/aspeed_adc.c