Re: [PATCH 1/3] drivers: misc: ak8974 / ami305 magnetometer driver

Mark Brown
2010-08-31T11:11:25Z

On Mon, Aug 30, 2010 at 09:55:00AM +0300, Onkalo Samu wrote:

> Misc-char-device + sysfs interface:
> -----------------------------------
> PM related issues can be nicely handled with char device.
> It doesn't matter if there are one or several users. However
> char device with binary data format is not that handy in scripts.
> Same is true for input device.

You could always have a char device with a text mode interface, I guess.

> Do you have any suggestions what could be the best way to handle this?

Not really without knowing more about how the device will be used and
the costs associated with powering it up and down - it's all a question
of tradeoffs depending on things like how fast userspace needs a
response and the expected usage patterns (many accesses in quick
succession, occasional widely spaced accesses...).