Using hwmon in-kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 20, 2008 at 09:05:09AM +0200, Jean Delvare wrote:

> There's nothing preventing you from accessing the LM99's registers
> directly and retrieve the temperature that way. Alternatively, we could
> add an internal interface to access some of the hwmon device features.
> It would take some time to define something everybody agrees on. If you
> have an interest in this, please make a proposal and we can discuss it.

Using the registers directly seems like duplication of existing code, so 
I'd prefer the access interface. I've fleshed out a rough interface that 
simply changes the hwmon device to its own struct containing the device 
structure, and then added an ops structure to that for getting and 
setting parameters. Accessor functions in the generic hwmon code then 
let other drivers use these. The advantage of this approach is that 
porting the drivers over to the new interface is trivial and there's no 
need to actually add the functions to specific drivers until they're 
needed. I'll tidy up the patch and send it.

-- 
Matthew Garrett | mjg59 at srcf.ucam.org




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux