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.

AM18x use i2c gpio-expander

Other Parts Discussed in Thread: AM1808

I am using a AM1808 Evaluation Module from Logic.  linux-2.6.33-rc4-psp03.20.00.14 sdk.  I would like to be able to toggle the USER LED1 and USER LED2 from a device driver I am writing.  I have also tried to get the PUSH BUTTON to work.  I have tried the below.  What am I missing or misunderstanding in accessing the i2c gpio?

gpio_request(DAVINCI_N_GPIO + 5, "USER_PB");

gpio_request(DAVINCI_N_GPIO + 6, "USER_LED2");

gpio_request(DAVINCI_N_GPIO + 7, "USER_LED1");

gpio_direction_input(DAVINCI_N_GPIO + 5);

gpio_direction_output(DAVINCI_N_GPIO + 6, 0);

gpio_direction_output(DAVINCI_N_GPIO + 7, 1);

gpio_set_value(DAVINCI_N_GPIO + 6, 0);

gpio_set_value(DAVINCI_N_GPIO + 7, 1);

printk(KERN_ALERT "%s line %s\n", __func__, gpio_get_value(DAVINCI_N_GPIO + 5)? "HI": "LOW");