Hi,
I am having issue setting upper bits (direction out) from the IO Expander
9535 from the my user space application,while
the lower byte D0 to D7 are responding well.
The PCA expander is attached to the bus 2 of the P9 connector of the BB-xM.
I would like to use the i2c tool to see if the issue is it due to the
kernel driver or not.
I am using the 3.9.11-x5 #11 SMP Tue Dec 2 11:16:45 CET 2014 armv7l
GNU/Linux, (gcc version 4.7.3 20130328 (prerelease) (crosstool-NG
linaro-1.13.1-4.7-2013.04-20130415 - Linaro GCC 2013.04).
The 4 expanders are detected using :
i2cdetect -y 2:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: UU UU UU -- UU -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
but when trying to send this to adress 0x20 (first expander):
i2cget -y 2 0x20 0x06
Error: Could not set address to 0x20: Device or resource busy.
Could you advise how to send command using i2c tool to the PCA9535? this
way I can see if I can set manually using command byte 0x07 D8--D15?
I have instantiate the expander in the board-omap3beagle.c as follow:
static struct pca953x_platform_data pca9535_data[] = {
{.gpio_base = GPIO_EXPANDER_BASE, .invert = 0xFFFFFFFF},
{.gpio_base = GPIO_EXPANDER_BASE+16, .invert = 0xFFFFFFFF},
{.gpio_base = GPIO_EXPANDER_BASE+32, .invert = 0xFFFFFFFF},
{.gpio_base = GPIO_EXPANDER_BASE+48, .invert = 0, .irq_base = -1},
};
static struct i2c_board_info __initdata i2c_expanders_devices[] = {
{
I2C_BOARD_INFO("pca9535",0x20),
.platform_data = &pca9535_data[0],
},
{
I2C_BOARD_INFO("pca9535",0x21),
.platform_data = &pca9535_data[1],
},
{
I2C_BOARD_INFO("pca9535",0x22),
.platform_data = &pca9535_data[2],
},
{
I2C_BOARD_INFO("pca9535",0x24),
.platform_data = &pca9535_data[3],
},
Thanks in advance,
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.