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.

How to link character driver with DTS file

Hi Team,

How character driver link with dts file ??

without platform driver it is possible link with chara driver ?

without probe function it will work ??

how to get interrupt number with dts file without probe function ??

after the boot my char driver .ko file send to tftboot and install with insmod adcmod.ko

but not get valid interrupt number .

Regards,

Naveen.

  • Hi Naveen,

    Please see from the TRM "Table 6-1. ARM Cortex-A8 Interrupts" the interrupt numbers and how they are initialize in dts file from <>/board-support/linux-3.12.10-ti2013.12.01/arch/arm/boot/dts/am33xx.dtsi for example.

    BR
    Ivan
  • Hi lvan Matrakov

    am check my dts file the interrupt number is 16 ,my character driver without dts file reading and writing fifo data , am planning to read data interrupt based so am using request_irq call :

    request_irq(16,adc_irq_handler,0,"adcsample",NULL);

    but my handler function is not called and when i check cat /proc/interrupts it will show
    16: 0 INTC 0 adcsample

    so without dts file how can i called my intterpt request and this is the way is correct or not
    and any other method calling interrupt number .

    Regards,
    Naveen
  • Hi Naveen,

    What type of interrupt triggering ?

    set_irq_type()

    http://processors.wiki.ti.com/index.php/Linux_PSP_GPIO_Driver_Guide#IRQ_handling

    What is the interrupt no 16 ?
    ADC interrupt ?
    Have you checked the INTERRUPT NO 16 in your processor data sheet or TRM to see check which peripheral got mapped to this INT 16 ?
    What are you trying to do ?

  • Hi sir,

    16 ADC_TSC_GENINT ADC_TSC (Touchscreen) . Refer by - spruh73k.pdf

    am writing adc character driver ,so i configure all registers and reading the data fifo0 .

    but my problem is reading data based on interrupts , so am trying to implement in interrupts

    reading fifo data based on interrupts ,so am trying to add interrupt request and reading data in handler,

    so when i call request_irq not allocated interrupt number . when i call request_irq it registered successful but not proper allocated log file :

    cat /proc/interrupts - my driver 16: 0 INTC 0 adcsample

    ti driver 32: 0 INTC 16 TI-AM *****

    so my requirement is my character driver continuously reading fifi0 data based on interrupt



    Regards,
    Naven