Access to I2C (in use by linux driver) from Android app on i.MX6Q

cancel
Showing results for 
Search instead for 
Did you mean: 

Access to I2C (in use by linux driver) from Android app on i.MX6Q

747 Views
l_bruni
Contributor II

Hi, we're working on a custon board built around a Variscite DART-MX6 with an Analog Device ADV7280A decoder chip connected to the parallel camera input on IPU2 CSI1.


We've modified the init register section of adv7180.c driver and can see the video stream in our Android test application.


Now we're trying to change some register of adv7280a writing on I2C-2 from the Android application using a native c code library to access /dev/i2c-2, but can't get access to the peripheral (we obtain a file handler always -1) because, I suppose, the address 0x21 (the one of ADV7280A) is marked as "UU".

When trying i2cdetect we obtain:
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- UU -- -- -- -- -- -- -- -- -- 2b -- -- -- --
30: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

Is there a way to solve this problem?
Thank you, kind regards.

Luca

Tags (3)
0 Kudos
1 Reply

572 Views
l_bruni
Contributor II

Hi, we've tried to write ti I2C using Shell command i2cset but higher privileges are required.

So we've signed apk with platform keys and now we can see the app running as sharedUserId (UID 1000), but we still get exception access denied when trying to execute "su" command with getruntime.exec("/system/xbin/su").

Any suggestion?

Thank you, kind regards.

Luca

0 Kudos