lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 24 May 2013 11:07:06 +0200
From:	Jean Delvare <khali@...ux-fr.org>
To:	"Mylene Josserand" <Mylene.Josserand@...ocap.com>
Cc:	"anish singh" <anish198519851985@...il.com>,
	"kernelnewbies" <kernelnewbies@...nelnewbies.org>,
	"Linux I2C" <linux-i2c@...r.kernel.org>,
	"linux-kernel-mail" <linux-kernel@...r.kernel.org>,
	"Arnd Bergmann" <arnd@...db.de>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [I2C] informations + advice about messages handling

On Fri, 24 May 2013 10:54:11 +0200, Mylene Josserand wrote:
> Ah okay ! And if there are not SMBus compliant, what function I will
> have to use ?

i2c_transfer()

> What is it doing if I use this function and that my device is not SMbus 
> compliant ?

This would make no sense. Your device understands only specific message
formats, which should be documented in its datasheet. You have to use
exactly that in your driver. If the message format matches SMBus, you
can use the SMBus API, otherwise you must use i2c_transfer() instead.

> I have some difficulties to understand the differences 
> between SMbus and I2C :(

SMBus is a subset of I2C. With I2C you can have messages of any length
and any format, with no attached semantics. SMBus restricts the
possibilities to a few standardized messages formats with semantics. If
you'd just tell us what your device is, we would be able to tell you if
SMBus will work or if I2C will be needed.

> (...)
> In my case, I have 2 segments but if I understand, the bus will not be 
> used at the same time.

I can't comment on that without knowing the exact topology. In
particular, do you have two independent segments each with its own
controller, or are they interconnected in some way? I2C/SMBus is very
simple with basic topologies but can become difficult with complex ones.

> (...)
> Okay. So the mutex blocks the I2C bus. And is it locking the bus at the 
> beginning of a message (so when a START is send) and unlocking it after 
> the STOP ?

Yes.

> So a complete message will be sent to a same device (the one which 
> address is in the data frame) ? A device can not receive a beginning of 
> one message (so with his address) and the end of another message 
> destined to another device [because of "collision"], for example ?

No, this cannot happen.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ