Re: i2c/ smbus question



On Sun, 2006-01-08 at 11:30 +0100, Jean Delvare wrote:

> I suspect that these drivers which do I2C block writes do so by calling
> i2c_master_send (or even i2c_transfer) directly, rather than relying on
> the SMBus compatibility layer.

Ok. Well, it's much more simple for me to implement smbus (with a few extensions
like block transfer) than the low level i2c at the host driver level.
In order to implement subaddress access with repeat start (very common in pretty
much everything nowadays), I need two messages. However, my low level hardware
can't implement everything that can be done with multiple messages. Thus
implementing the stuff using i2c_xfer needs a lot of test & validation all over
the place to coerce those 2 messages into a subaddress + data setup that my low
level hw understands. Implementing only smbus is simpler and fits most of my needs.

> The i2c_smbus_write_i2c_block_data wrapper function used to be defined,
> but was removed in 2.6.10-rc2 together with a couple other similar
> wrappers [1] on request by Adrian Bunk, the reason being that they had
> no user back then. I was a bit reluctant at first, but we finally agreed
> with Adrian to remove the functions, and to reintroduce them later if
> they were ever needed.

I find that weird but heh...

> So, if you need i2c_smbus_write_i2c_block_data(), we can easily
> resurrect it. See the patch below. I made the new version a bit faster
> (I hope) than the original by using memcpy, please confirm it works for
> you.

Ok, I'll test with those, I did an equivalent local to my sound drivers
but a wrapper in the i2c layer is probably better. Thanks.



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



Relevant Pages

  • Re: Consultant Engineers with ARM processor experience required
    ... especially for low level debugging. ... MP3 player with no requirement to work on the multimedia ... Not necessarily for low level drivers. ... >> The client offices have views of the Alps, ...
    (comp.arch.embedded)
  • Re: eXP Component Documentation Sources
    ... > engineering mindsets. ... I also need to know how each piece of my hardware works and how each piece of software is working. ... If you are looking for big picture here then you will need to do heavy research on system internals, drivers, services and other ... I'm writing firmware for microcontroller devices, and also I'm in charge for driver writing and all other low level windows ...
    (microsoft.public.windowsxp.embedded)
  • Re: RFC: Writing Solaris Device Drivers in Java
    ... > For efficiency and since the low level stuff is a major part of device ... I guess we would see drivers in Forth before:) ... unbelivebly Java performed better than ...
    (Linux-Kernel)
  • Re: Regression in -git / [PATCH] i2c-i801.c: dont pci_disable_device() after it was just ena
    ... I see that your patch was already merged, but I would like to reply ... Intead of reverting the whole commit this patch fixes it up: ... do and almost all pci drivers do that by now - except I2C bus drivers, ... Do you have any idea why disabling the SMBus causes the problem you ...
    (Linux-Kernel)
  • SMBus Support in Windows XP
    ... In the Windows DDK there is mention of support for SMBus and references therein ... to Microsoft system drivers smbclass.sys and smbhc.sys. ...
    (microsoft.public.development.device.drivers)