* [lm-sensors] Helps: how to use i801--SMBus functions via
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
@ 2005-11-01 16:59 ` Jean Delvare
2005-11-02 15:29 ` [lm-sensors] " Gu, Mingkun
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-11-01 16:59 UTC (permalink / raw)
To: lm-sensors
Hi Michael,
> Dear Sir,
We are not a sir. We are a number of different people, this is a
mailing list.
> I am new to Linux and Device driver programming. I am trying
> to write a device driver software module to access the ICH6
> SMBus controller on the motherboard of our PC running Linux
> 2.6.10 kernel.
This driver already exists, it's named i2c-i801. From the below, it
seems that you found that already, but your sentence is somewhat
confusing nevertheless.
> I configured my 2.6.10 kernel to have I2C built-in support
> and your i801 module loaded. Then I loaded the i2c-dev
> interface module and wrote a short application software to
> test the functions for SMBus. After my application opened the
> /dev/i2c device, I received messages saying "i2c-adaptor: i2c-0
> -- I2C level transfer not support" when my application software
> called the read and write function of the i2c-dev module. Further
> tracking inside the i2c-dev module shew that the algorithm
> parameter adap->algo->master_xfer = NULL. That means the i801
> driver was not properly loaded by the i2c-dev module.
No, this means just what the error message said. The ICH6 is an SMBus
master, not an I2C master. SMBus is a subset of I2C. I2C masters can
emulate SMBus transactions, but not the other way around.
> Could you advise how I can make use of the i801 module and your
> i2c-dev module to access the ICH6 SMBus controller?
Instead of using read() and write() on the device file, you have to use
ioctl(). See in i2c-dev.h (from the lm_sensors project) for a list of
available commands. You will at least need I2C_SLAVE to set the target
chip address, and I2C_SMBUS to run SMBus transactions. There are helper
functions in i2c-dev.h to make your life easier with SMBus
transactions, so you shouldn't have to use I2C_SMBUS explicitely.
There is some documentation available in the i2c package, or online at:
http://www2.lm-sensors.nu/~lm78/cvs/i2c/doc/dev-interface
You should take a look at prog/dump/i2cset.c in the lm_sensors package,
it is a nice example of how userspace programs can access SMBus. There
are a few other test programs in this package, but I think this is the
most simple one we have.
--
Jean Delvare
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] RE: Helps: how to use i801--SMBus functions via
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
2005-11-01 16:59 ` [lm-sensors] Helps: how to use i801--SMBus functions via Jean Delvare
@ 2005-11-02 15:29 ` Gu, Mingkun
2005-11-04 20:48 ` Rudolf Marek
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Gu, Mingkun @ 2005-11-02 15:29 UTC (permalink / raw)
To: lm-sensors
Could anyone advise how I can make use i2c-i801 and/or i2c-dev to access
ICH6 SMBus controller on a PC motherboard? I have Linux 2.6.10 and
loaded i2c-core, i2c-i801and i2c-dev modules. lsmod command gave me the
following info:
# lsmod
Module Size Used by
i2c_dev 8320 0
i2c_sensor 3968 0
i2c_i801 8716 0
i2c_core 16272 3 i2c_dev,i2c_sensor,i2c_i801
It seems that i2c-i801 is not used by other modules.
Thanks.
Michael Gu
-----Original Message-----
From: MK GU [mailto:mkgu_2005@yahoo.ca]
Sent: Tuesday, November 01, 2005 6:49 AM
To: lm-sensors@lm-sensors.org
Cc: Gu, Mingkun
Subject: Helps: how to use i801--SMBus functions via i2c-dev module in
Linux?
Dear Sir,
I am new to Linux and Device driver programming. I am trying to write a
device driver software module to access the ICH6 SMBus controller on the
motherboard of our PC running Linux 2.6.10 kernel. I configured my
2.6.10 kernel to have I2C built-in support and your i801 module loaded.
Then I loaded the i2c-dev interface module and wrote a short application
software to test the functions for SMBus. After my application opened
the /dev/i2c device, I received messages saying "i2c-adaptor: i2c-0 --
I2C level transfer not support" when my application software called the
read and write function of the i2c-dev module. Further tracking inside
the i2c-dev module shew that the algorithm parameter
adap->algo->master_xfer = NULL. That means the i801 driver was not
properly loaded by the i2c-dev module.
Could you advise how I can make use of the i801 module and your i2c-dev
module to access the ICH6 SMBus controller?
Thanks a lot in advance.
Michael Gu
_____
Find your next car at Yahoo! Canada Autos <http://autos.yahoo.ca>
-----------------------------------------
This email may contain confidential and privileged material for the
sole use of the intended recipient(s). Any review, use, retention,
distribution or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive for the
recipient), please contact the sender by reply email and delete all
copies of this message. Also, email is susceptible to data corruption,
interception, tampering, unauthorized amendment and viruses. We only
send and receive emails on the basis that we are not liable for any
such corruption, interception, tampering, amendment or viruses or any
consequence thereof.
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] RE: Helps: how to use i801--SMBus functions via
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
2005-11-01 16:59 ` [lm-sensors] Helps: how to use i801--SMBus functions via Jean Delvare
2005-11-02 15:29 ` [lm-sensors] " Gu, Mingkun
@ 2005-11-04 20:48 ` Rudolf Marek
2005-11-07 13:38 ` [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev Gu, Mingkun
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Rudolf Marek @ 2005-11-04 20:48 UTC (permalink / raw)
To: lm-sensors
Gu, Mingkun wrote:
> Could anyone advise how I can make use i2c-i801 and/or i2c-dev to access
> ICH6 SMBus controller on a PC motherboard? I have Linux 2.6.10 and
> loaded i2c-core, i2c-i801and i2c-dev modules. lsmod command gave me the
> following info:
>
> It seems that i2c-i801 is not used by other modules.
This is OK.
If I understand it correctly all you want is to create the _userspace_ program that will send commands to the specific device on the bus.
If so please have a look to linux-2.6.x/Documentation/i2c/dev-interface
Further example could be found in lm-sensors package.
i2cdump.c i2cset.c etc...
I hope this helps,
Regards
Rudolf
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
` (2 preceding siblings ...)
2005-11-04 20:48 ` Rudolf Marek
@ 2005-11-07 13:38 ` Gu, Mingkun
2005-11-07 15:51 ` Jean Delvare
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Gu, Mingkun @ 2005-11-07 13:38 UTC (permalink / raw)
To: lm-sensors
Hi Jean,
With i2c-dev module, is it possible to have more than one device with
the same major number and different minor numbers? Let say, if I want to
have
/dev/i2c/0 89 0
/dev/i2c/1 89 1
/dev/i2c/2 89 2
......
How can I do it? I tried to insmod the i2c-dev module twice and got
error message say "-1 File exists."
One more thing is whether this module provides the ability to handle
interrupts?
Thanks.
MK
-----Original Message-----
From: Jean Delvare [mailto:khali@linux-fr.org]
Sent: Saturday, November 05, 2005 6:11 PM
To: Gu, Mingkun
Cc: mkgu_2005@yahoo.ca
Subject: Re: [lm-sensors] Helps: how to use i801--SMBus functions
viai2c-dev module in Linux?
Hi Michael,
> After successfully opened /dev/i2c/0 and set
ioctl(file,I2C_SLAVE,addr)
> with addr = 0x40, I received error messages as follows when calling
> write() and read() functions
>
> i2c_adapter i2c-0: I2C level transfers not supported
I already told you it wouldn't work. The Intel i82801 is an SMBus
master, you cannot send or receive arbitrary I2C messages with it (and
this is what write() and read() do). You have to use the SMBus
interface.
> The return value for the second call to ioctl(file, cmd, &data_arg)
was
> -1, which indicated the functions failed when making a call to
> i2c_smbus_xfer() within ioctl() of i2c-dev.c.
What you tried to do is needlessly complex. Use the wrapper functions
from i2c-dev.h instead.
> c) I also tried to use the function i2c_smbus_read_word_data() in the
> above program. But I got compiling error say i2c_smbus_read_word_data
> undefined. It seems the function was not in my i2c.h file or
> i2c-dev.file.
>
> Could you advise how I can get the above program access the SMBus
> correctly?
You need i2c-dev.h from the lm_sensors package, not from the kernel
sources.
http://www2.lm-sensors.nu/~lm78/cvs/lm_sensors2/kernel/include/i2c-dev.h
--
Jean Delvare
-----------------------------------------
This email may contain confidential and privileged material for the
sole use of the intended recipient(s). Any review, use, retention,
distribution or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive for the
recipient), please contact the sender by reply email and delete all
copies of this message. Also, email is susceptible to data corruption,
interception, tampering, unauthorized amendment and viruses. We only
send and receive emails on the basis that we are not liable for any
such corruption, interception, tampering, amendment or viruses or any
consequence thereof.
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
` (3 preceding siblings ...)
2005-11-07 13:38 ` [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev Gu, Mingkun
@ 2005-11-07 15:51 ` Jean Delvare
2005-11-07 16:12 ` Gu, Mingkun
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-11-07 15:51 UTC (permalink / raw)
To: lm-sensors
Hi Michael,
On 2005-11-07, Mingkun Gu wrote:
> With i2c-dev module, is it possible to have more than one device with
> the same major number and different minor numbers? Let say, if I want to
> have
>
> /dev/i2c/0 89 0
> /dev/i2c/1 89 1
> /dev/i2c/2 89 2
> ......
Yes, it is possible.
> How can I do it? I tried to insmod the i2c-dev module twice and got
> error message say "-1 File exists."
The function of i2c-dev is to give userspace an access to existing i2c
busses. It doesn't create anything per se. If the only I2C/SMBus you
have on your system is the i2c-i801, you'll only have /dev/i2c/0.
Note that it is OK to open the same device file twice, if you need to do
that. Both sessions will be independant. You need to do that if there
are several chips on the bus and you want to drive them all from
userspace.
> One more thing is whether this module provides the ability to handle
> interrupts?
The question isn't relevant for i2c-dev, as it doesn't actually drive
the hardware. It only acts as a bridge.
As for i2c-i801, no, it is poll-based, not interrupt-based. Mark Hoffman
had attempted to convert the driver to interrupt-based, but never
completed the work.
--
Jean Delvare
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
` (4 preceding siblings ...)
2005-11-07 15:51 ` Jean Delvare
@ 2005-11-07 16:12 ` Gu, Mingkun
2005-11-07 16:31 ` Jean Delvare
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Gu, Mingkun @ 2005-11-07 16:12 UTC (permalink / raw)
To: lm-sensors
Hi Jean,
Thank you for your prompt reply. I am working on a project where a
customized board sitting on the PCI slot. The board has a SMBus
microcontroller which is used to control some external sensors and
communicates with the ICH6 SMBus master controller on the host PC
motherboard. I need to send SMBus request command packets to the
microcontroller and receive SMBus response data packets from the micro
which also generates an interrupt sometimes to request for immediate or
urgent services.
Do you have any suggestion on how to implement such an application?
Thanks.
MK
-----Original Message-----
From: Jean Delvare [mailto:khali@linux-fr.org]
Sent: Monday, November 07, 2005 10:39 AM
To: Gu, Mingkun
Cc: lm-sensors@lm-sensors.org
Subject: RE: [lm-sensors] Helps: how to use i801--SMBus functions
viai2c-dev module in Linux?
Hi Michael,
On 2005-11-07, Mingkun Gu wrote:
> With i2c-dev module, is it possible to have more than one device with
> the same major number and different minor numbers? Let say, if I want
to
> have
>
> /dev/i2c/0 89 0
> /dev/i2c/1 89 1
> /dev/i2c/2 89 2
> ......
Yes, it is possible.
> How can I do it? I tried to insmod the i2c-dev module twice and got
> error message say "-1 File exists."
The function of i2c-dev is to give userspace an access to existing i2c
busses. It doesn't create anything per se. If the only I2C/SMBus you
have on your system is the i2c-i801, you'll only have /dev/i2c/0.
Note that it is OK to open the same device file twice, if you need to do
that. Both sessions will be independant. You need to do that if there
are several chips on the bus and you want to drive them all from
userspace.
> One more thing is whether this module provides the ability to handle
> interrupts?
The question isn't relevant for i2c-dev, as it doesn't actually drive
the hardware. It only acts as a bridge.
As for i2c-i801, no, it is poll-based, not interrupt-based. Mark Hoffman
had attempted to convert the driver to interrupt-based, but never
completed the work.
--
Jean Delvare
-----------------------------------------
This email may contain confidential and privileged material for the
sole use of the intended recipient(s). Any review, use, retention,
distribution or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive for the
recipient), please contact the sender by reply email and delete all
copies of this message. Also, email is susceptible to data corruption,
interception, tampering, unauthorized amendment and viruses. We only
send and receive emails on the basis that we are not liable for any
such corruption, interception, tampering, amendment or viruses or any
consequence thereof.
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
` (5 preceding siblings ...)
2005-11-07 16:12 ` Gu, Mingkun
@ 2005-11-07 16:31 ` Jean Delvare
2005-11-07 16:52 ` Gu, Mingkun
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-11-07 16:31 UTC (permalink / raw)
To: lm-sensors
Hi Michael,
On 2005-11-07, Mingkun Gu wrote:
> Thank you for your prompt reply. I am working on a project where a
> customized board sitting on the PCI slot. The board has a SMBus
> microcontroller which is used to control some external sensors and
> communicates with the ICH6 SMBus master controller on the host PC
> motherboard. I need to send SMBus request command packets to the
> microcontroller and receive SMBus response data packets from the micro
> which also generates an interrupt sometimes to request for immediate or
> urgent services.
>
> Do you have any suggestion on how to implement such an application?
For one thing, if you are dealing with events which require fast
reactions, it might be wiser to write a kernel driver than a user-space
application.
Second, as I said, the current i2c-i801 driver is not interrupt based. If
you need it to react fast, you will need to rewrite it in part to use
interrupts. If you do, you should get in touch with Mark M. Hoffman who
has been working on this some times ago.
The details depend on the exact hardware implementation. I have to admit
I am not really qualified to comment on interrupts, as I never had to
deal with these so far. Please note that the i2c core in Linux doesn't
support slave mode on masters at the moment. If this is something your
system needs, this will be a (serious) problem.
--
Jean Delvare
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
` (6 preceding siblings ...)
2005-11-07 16:31 ` Jean Delvare
@ 2005-11-07 16:52 ` Gu, Mingkun
2005-11-07 17:03 ` Jean Delvare
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Gu, Mingkun @ 2005-11-07 16:52 UTC (permalink / raw)
To: lm-sensors
Hi Jean,
Thank you for the advices. I've also tried to write/read block data
to/from the ICH6 SMBus but failed to receive successful returns. I did
tried other commands. I received successful returns for I2C_SMBUS_QUICK,
I2C_SMBUS_BYTE-DATA (read/write) and I2C_SMBUS_WORD_DATA (read), and
unsuccessful returns (-1) for I2C_SMBUS_WORD_DATA (write) and
I2C_SMBUS_BLOCK_DATA (read/write)
when calling the ioctl function of the i2c-dev module.
Any comments and advices?
Thanks.
MK
-----Original Message-----
From: Jean Delvare [mailto:khali@linux-fr.org]
Sent: Monday, November 07, 2005 11:18 AM
To: Gu, Mingkun
Cc: lm-sensors@lm-sensors.org; Mark M. Hoffman
Subject: RE: [lm-sensors] Helps: how to use i801--SMBus functions
viai2c-dev module in Linux?
Hi Michael,
On 2005-11-07, Mingkun Gu wrote:
> Thank you for your prompt reply. I am working on a project where a
> customized board sitting on the PCI slot. The board has a SMBus
> microcontroller which is used to control some external sensors and
> communicates with the ICH6 SMBus master controller on the host PC
> motherboard. I need to send SMBus request command packets to the
> microcontroller and receive SMBus response data packets from the micro
> which also generates an interrupt sometimes to request for immediate
or
> urgent services.
>
> Do you have any suggestion on how to implement such an application?
For one thing, if you are dealing with events which require fast
reactions, it might be wiser to write a kernel driver than a user-space
application.
Second, as I said, the current i2c-i801 driver is not interrupt based.
If
you need it to react fast, you will need to rewrite it in part to use
interrupts. If you do, you should get in touch with Mark M. Hoffman who
has been working on this some times ago.
The details depend on the exact hardware implementation. I have to admit
I am not really qualified to comment on interrupts, as I never had to
deal with these so far. Please note that the i2c core in Linux doesn't
support slave mode on masters at the moment. If this is something your
system needs, this will be a (serious) problem.
--
Jean Delvare
-----------------------------------------
This email may contain confidential and privileged material for the
sole use of the intended recipient(s). Any review, use, retention,
distribution or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive for the
recipient), please contact the sender by reply email and delete all
copies of this message. Also, email is susceptible to data corruption,
interception, tampering, unauthorized amendment and viruses. We only
send and receive emails on the basis that we are not liable for any
such corruption, interception, tampering, amendment or viruses or any
consequence thereof.
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
` (7 preceding siblings ...)
2005-11-07 16:52 ` Gu, Mingkun
@ 2005-11-07 17:03 ` Jean Delvare
2005-11-07 18:14 ` Gu, Mingkun
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-11-07 17:03 UTC (permalink / raw)
To: lm-sensors
Hi Michael,
On 2005-11-07, Mingkun Gu wrote:
> Thank you for the advices. I've also tried to write/read block data
> to/from the ICH6 SMBus but failed to receive successful returns. I did
> tried other commands. I received successful returns for I2C_SMBUS_QUICK,
> I2C_SMBUS_BYTE-DATA (read/write) and I2C_SMBUS_WORD_DATA (read), and
> unsuccessful returns (-1) for I2C_SMBUS_WORD_DATA (write) and
> I2C_SMBUS_BLOCK_DATA (read/write)
> when calling the ioctl function of the i2c-dev module.
>
> Any comments and advices?
Does your client chip actually support all these transaction types?
An SMBus transaction will only work if the target chip does expect that
transaction type for the given "command" byte. If not, the chip will
not ACK all the bytes or will stop sending data, causing the transaction
to fail.
You may want to read the SMBus specification for clarifications on what
each transaction does. You should not try random transactions. Only use
the transaction types your client chip expects for each command. These
should be documented.
--
Jean Delvare
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
` (8 preceding siblings ...)
2005-11-07 17:03 ` Jean Delvare
@ 2005-11-07 18:14 ` Gu, Mingkun
2005-11-07 19:33 ` Jean Delvare
2005-11-07 19:57 ` Gu, Mingkun
11 siblings, 0 replies; 13+ messages in thread
From: Gu, Mingkun @ 2005-11-07 18:14 UTC (permalink / raw)
To: lm-sensors
Hi Jean,
I am actually accessing the master ICH6 SMBus controller's registers and
memory instead of the slave control on the customized board. According
to the data sheet of ICH6, it supports block data transfer.
Best Rgds
MK
-----Original Message-----
From: Jean Delvare [mailto:khali@linux-fr.org]
Sent: Monday, November 07, 2005 11:51 AM
To: Gu, Mingkun
Cc: LM Sensors
Subject: RE: [lm-sensors] Helps: how to use i801--SMBus functions
viai2c-dev module in Linux?
Hi Michael,
On 2005-11-07, Mingkun Gu wrote:
> Thank you for the advices. I've also tried to write/read block data
> to/from the ICH6 SMBus but failed to receive successful returns. I did
> tried other commands. I received successful returns for
I2C_SMBUS_QUICK,
> I2C_SMBUS_BYTE-DATA (read/write) and I2C_SMBUS_WORD_DATA (read), and
> unsuccessful returns (-1) for I2C_SMBUS_WORD_DATA (write) and
> I2C_SMBUS_BLOCK_DATA (read/write)
> when calling the ioctl function of the i2c-dev module.
>
> Any comments and advices?
Does your client chip actually support all these transaction types?
An SMBus transaction will only work if the target chip does expect that
transaction type for the given "command" byte. If not, the chip will
not ACK all the bytes or will stop sending data, causing the transaction
to fail.
You may want to read the SMBus specification for clarifications on what
each transaction does. You should not try random transactions. Only use
the transaction types your client chip expects for each command. These
should be documented.
--
Jean Delvare
-----------------------------------------
This email may contain confidential and privileged material for the
sole use of the intended recipient(s). Any review, use, retention,
distribution or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive for the
recipient), please contact the sender by reply email and delete all
copies of this message. Also, email is susceptible to data corruption,
interception, tampering, unauthorized amendment and viruses. We only
send and receive emails on the basis that we are not liable for any
such corruption, interception, tampering, amendment or viruses or any
consequence thereof.
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
` (9 preceding siblings ...)
2005-11-07 18:14 ` Gu, Mingkun
@ 2005-11-07 19:33 ` Jean Delvare
2005-11-07 19:57 ` Gu, Mingkun
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-11-07 19:33 UTC (permalink / raw)
To: lm-sensors
Hi Michael,
> I am actually accessing the master ICH6 SMBus controller's registers and
> memory instead of the slave control on the customized board. According
> to the data sheet of ICH6, it supports block data transfer.
Sure it does, that's not the point. The question is, is the slave
device you are talking to expecting an SMBus block transfer for the
command byte you are using? As I already said, SMBus transactions only
work if the master and client agree on the transaction type. If you are
trying random block reads/writes, no wonder it doesn't work.
That being said, SMBus block transactions are rarely used, so we can't
exclude some bug for them in some of our drivers.
--
Jean Delvare
^ permalink raw reply [flat|nested] 13+ messages in thread* [lm-sensors] Helps: how to use i801--SMBus functions viai2c-dev
2005-11-01 11:49 [lm-sensors] Helps: how to use i801--SMBus functions via i2c-dev MK GU
` (10 preceding siblings ...)
2005-11-07 19:33 ` Jean Delvare
@ 2005-11-07 19:57 ` Gu, Mingkun
11 siblings, 0 replies; 13+ messages in thread
From: Gu, Mingkun @ 2005-11-07 19:57 UTC (permalink / raw)
To: lm-sensors
Hi Jean,
>> I am actually accessing the master ICH6 SMBus controller's registers
and
>> memory instead of the slave control on the customized board.
According
>> to the data sheet of ICH6, it supports block data transfer.
> Sure it does, that's not the point. The question is, is the slave
> device you are talking to expecting an SMBus block transfer for the
> command byte you are using? As I already said, SMBus transactions only
> work if the master and client agree on the transaction type. If you
are
> trying random block reads/writes, no wonder it doesn't work.
Yes, the slave device has a TI's MSP430 mixed signal microcontroller
which supports block read and write of message/data packets for the
SMBus standard protocol. I'm trying to send the command/data packets in
data blocks. But our board with the microcontroller was not attached to
the PC motherboard during my tests mentioned above. Would this be the
cause for transaction errors?
---
MK
-----------------------------------------
This email may contain confidential and privileged material for the
sole use of the intended recipient(s). Any review, use, retention,
distribution or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive for the
recipient), please contact the sender by reply email and delete all
copies of this message. Also, email is susceptible to data corruption,
interception, tampering, unauthorized amendment and viruses. We only
send and receive emails on the basis that we are not liable for any
such corruption, interception, tampering, amendment or viruses or any
consequence thereof.
^ permalink raw reply [flat|nested] 13+ messages in thread