tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Polymorphic devices
Brad Spencer <brad%anduin.eldar.org@localhost> writes:
> I don't know just yet, but there might be unwanted device reset the "use
> the one you open" technique. That is, you might have to reset the chip
> to change mode and if you support say, I2C and GPIO at the same time
> (which is possible), but then change to just GPIO the chip has to be
> reset and that will disrupt any setting you might have set (I think, I
> am am still working out what needs to happen with the mode switches).
> This may not matter in the bigger picture and it wouldn't matter as much
> if the mode switch was a sysctl, which one can say will reset the chip
> anyway.
Interesting complexity, but I'd say state the user has asked for should
live in the driver and if it has to write that again on mode switch so
be it. Generally if you open a device and close it you don't have much
grounds to expect things you did to persist to the next session, but
devices have device-specific semantics anyway.
Home |
Main Index |
Thread Index |
Old Index