Commit ff4067be authored by Miguel Gómez Sexto's avatar Miguel Gómez Sexto Committed by Samuel Iglesias Gonsálvez

The library sets the double of the timestamsp-threshold value to the driver and returns half of it

Signed-off-by: Miguel Gómez Sexto's avatarMiguel Gomez <magomez@igalia.com>
Signed-off-by: Samuel Iglesias Gonsálvez's avatarSamuel Iglesias Gonsalvez <siglesias@igalia.com>
parent 2c920545
......@@ -255,12 +255,19 @@ int tdc_get_time_threshold(struct tdc_board *b, uint32_t *thres)
int tdc_set_timestamp_threshold(struct tdc_board *b, uint32_t thres)
{
return __tdc_sysfs_set(b, "tstamp_thresh", thres);
return __tdc_sysfs_set(b, "tstamp_thresh", thres * 2);
}
int tdc_get_timestamp_threshold(struct tdc_board *b, uint32_t *thres)
{
return __tdc_sysfs_get(b, "tstamp_thresh", thres);
uint32_t value;
int res;
res = __tdc_sysfs_get(b, "tstamp_thresh", &value);
if (!res)
*thres = value / 2;
return res;
}
int tdc_set_channels_term(struct tdc_board *b, uint32_t config)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment