+ if (!(pps->info.mode & PPS_CAPTURECLEAR))[AK] I used the style in this file sysfs.c.
+ return 0; Why are you not returning an error?
assert_show() and clear_show() have the same condition.
When '& PPS_CAPTURECLEAR' -- 0 means no interrupt asserted and it is not error
Probably Rodolfo can get more info why return 0
And why are these sysfs files even present if the mode is not set
properly? Can the mode be set while the device is attached or is this
only defined at probe time? If at probe time, just never create these
files.
[AK] we can understand mode is set when interrupts asserted and file assert_elapsed will be updated.