This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

omapl138 I2C platform driver

Dear E2E forum:

    I want to write an i2c platform driver under linux,and there are some questions:(the linux version is 2.6.37)

1. hwo can i get the i2c's irq ID? (such  as  I2C0 controller)The function platform_get_irq() can get an IRQ for my device.And in its body,it calls function platform_get_resource() to get a resource.  At last it retruns a value (16 + offset ).

2.how to get a resource for my device? At the kernerl ,we can through function platform_get_resource() get a resource,and in this function body,we can find that the resources are pre-defined.So,dose it mean that I can define a resource and don't need to call the  function platform_get_resource()?

 

Thank you!

Zhongfeng Chen

chenzhongfeng163@163.com