Lines Matching full:calibration
202 static int tps65910_rtc_set_calibration(struct device *dev, int calibration) in tps65910_rtc_set_calibration() argument
219 if ((calibration < -32768) || (calibration > 32766)) { in tps65910_rtc_set_calibration()
220 dev_err(dev, "RTC calibration value out of range: %d\n", in tps65910_rtc_set_calibration()
221 calibration); in tps65910_rtc_set_calibration()
225 value = (s16)calibration; in tps65910_rtc_set_calibration()
247 static int tps65910_rtc_get_calibration(struct device *dev, int *calibration) in tps65910_rtc_get_calibration() argument
261 *calibration = 0; in tps65910_rtc_get_calibration()
274 *calibration = (s16)value; in tps65910_rtc_get_calibration()
281 int calibration; in tps65910_read_offset() local
285 ret = tps65910_rtc_get_calibration(dev, &calibration); in tps65910_read_offset()
289 /* Convert from RTC calibration register format to ppb format */ in tps65910_read_offset()
290 tmp = calibration * (s64)PPB_MULT; in tps65910_read_offset()
305 int calibration; in tps65910_set_offset() local
313 /* Convert from ppb format to RTC calibration register format */ in tps65910_set_offset()
322 calibration = (int)-tmp; in tps65910_set_offset()
324 ret = tps65910_rtc_set_calibration(dev, calibration); in tps65910_set_offset()