RFC: complete rewrite of i2c-i801 for 2.6.x

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

 



Hi Mark,

I have been (partly) reviewing the code of your i2c-i801 driver today,
and also (partly) read the datasheet for my own variant, the ICH3-M.

First, I'd have a question. What is I801_PCI_BAR (and how do you know
its value)? Looks like you get the base address in a different way than
the old driver did, can you explain how it works and how different it is
exactly?

Second I'd have a suggestion. It looks like you can detect the length of
the I/O space automatically. You'd simply do:

  i801_iosize = pci_resource_len(pcidev, I801_PCI_BAR);

instead of explicitely setting it to 16 or 32. This makes the code more
compact and will automatically support the possibly different length of
future compatible chips. I would also suggest that you compute i801_smba
before i801_iosize, because the former can fail, and also because it is
more logical that way (IMHO at least).

I tested it and it works fine for me.

I'm impatient to test the next version of your driver :)

Thanks,
-- 
Jean Delvare
http://khali.linux-fr.org/



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

  Powered by Linux