AnsweredAssumed Answered

ioremap and __raw_writel problems

Question asked by arungopal kondaveeti on Jun 11, 2017
Latest reply on Jun 19, 2017 by igorpadykov


i want to on a particular gpio function in linux with out using a gpio_set_value and gpio_request and gpio_direction_output function.


i write a sample example but it is showing wrong results.


Please tell me how to read and write to gpio pad registers in linux.

void *b;

b=ioremap(0x0209c000,1024);       ----?here gpio data sheet gpio base address
printk(KERN_INFO "***********DATA DIRECTION Register is %x\n****",b);
int value=ioread32(b);
printk(KERN_INFO "**********READ Value is %d\n*****",value);


how to use __raw_writel function to gpio registers in linux .