IIO: necessity of manual reset attribute in drivers?
Jonathan Cameron
maintainerHi All,
I vaguely recall asking this in response to certain drivers over the years, but what is the usecase for userspace 'resetting' a device via a reset attribute? It's reasonably common in the drivers but not (as I've kept it out) in the abi docs.
It is common in some of Analog's inertial sensor drivers but I think turns up in various other places.
Jonathan
RE: necessity of manual reset attribute in drivers?
Jonathan Cameron wrote on 2012-04-22:
Quoted 9 lines
Hi All,
I vaguely recall asking this in response to certain drivers over the years, but what is the usecase for userspace 'resetting' a device via a reset attribute? It's reasonably common in the drivers but not (as I've kept it out) in the abi docs.
It is common in some of Analog's inertial sensor drivers but I think turns up in various other places.
Ideally we shouldn't have such an attribute.
Error checking and handling should be all done in the drivers, if possible. I don't remember exactly why it went into one of the original inertial sensor drivers. But I think it went there to provide error correction, in case plausibility/error checking of the delivered data failed.
I also suspect it then got copied over and over again.
Greetings,
Michael
--
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368; Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif
Re: necessity of manual reset attribute in drivers?
Quoted 8 lines · Michael
Jonathan Cameron wrote on 2012-04-22:
Quoted 7 lines
Hi All,
I vaguely recall asking this in response to certain drivers over the years, but what is the usecase for userspace 'resetting' a device via a reset attribute? It's reasonably common in the drivers but not (as I've kept it out) in the abi docs.
Quoted 8 lines
Quoted 2 lines
It is common in some of Analog's inertial sensor drivers but I think turns up in various other places.
Ideally we shouldn't have such an attribute.
Error checking and handling should be all done in the drivers, if possible. I don't remember exactly why it went into one of the original inertial sensor drivers. But I think it went there to provide error correction, in case plausibility/error checking of the delivered data failed.
I also suspect it then got copied over and over again.
That's what I suspected had happened. Shall we aim to kill it off in these drivers before they move out of staging? I'm always happy to delete code if no one else gets to them first ;)