Skip to contentSkip to conversation

i2c_transfer & dma

DISCUSSION Peter Hüwe 2 participants 2 messages Sep 23, 2014 – Sep 25, 2014 1 message not in the archive I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

Hi,

I was wondering if the buffer in an i2c_msg, passed to i2c_transfer must be dma-able i.e. dynamically allocated, like for USB?

The reason why I'm asking is because the e.g. the i2c_robotfuzz_osif usb-to- i2c adapter passes the incoming data directly to a usb_control_msg which of course expects the buffer to be dma-able.

So the question is - does the user of i2c_transfer have to provide a dma-able buffer, or is the bus driver (like the robotfuzz one) expected to convert incoming buffer into a dma-able buffer?

Thanks,
Peter

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 4 lines

So the question is - does the user of i2c_transfer have to provide a dma-able buffer, or is the bus driver (like the robotfuzz one) expected to convert incoming buffer into a dma-able buffer?

As of now, this is an open question, sadly. I have a tendency to leave it to the drivers (maybe with helper functions from the core), because I2C and DMA is so uncommon. I need to work on I2C & DMA next month anyhow, so I hope to dive into that topic, too. No promises, though. If you want to look into it already, please go ahead. The issue was raised here, too: http://patchwork.ozlabs.org/patch/220137/