iMX93 ADC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

iMX93 ADC

2,428 Views
BaselHn
Contributor II

Hi, 

I want to enhance the iMX93 ADC driver to support DMA and an iio buffer, so it can sample several samples and put them into a buffer.

Attached is my modified code. And I get the following error:

[ 1.436577] imx93-adc 44530000.adc: error -EINVAL: Failed to register this iio device.
[ 1.444518] imx93-adc: probe of 44530000.adc failed with error -22

Any help?

#

Labels (1)
0 Kudos
Reply
5 Replies

1,513 Views
mdeneen
Contributor II

Hey, did you ever get this working with continuous mode?

0 Kudos
Reply

1,373 Views
BaselHn
Contributor II

Hi @mdeneen 

Yes, I did

Tags (1)
0 Kudos
Reply

597 Views
Ridhakhalfaoui
Contributor I
Could you share your work for the continous mode please?
0 Kudos
Reply

2,380 Views
Manuel_Salas
NXP TechSupport
NXP TechSupport

Hello @BaselHn 

 

I hope you are doing very well.

 

Have you tried changing the line:

indio_dev->modes = INDIO_DIRECT_MODE; //| INDIO_BUFFER_TRIGGERED;

 

To:

indio_dev->modes = INDIO_DIRECT_MODE | INDIO_BUFFER_TRIGGERED;

 

Best regards,

Salas.

0 Kudos
Reply

2,175 Views
BaselHn
Contributor II

Hi @Manuel_Salas 

Sorry for the late response I was OOO.

Yes and I managed at last to make the ADC to work with the DMA. 

The ADC now working with DMA.

Tags (1)
0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2140120%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EiMX93%20ADC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2140120%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI%20want%20to%20enhance%20the%20iMX93%20ADC%20driver%20to%20support%20DMA%20and%20an%20iio%20buffer%2C%20so%20it%20can%20sample%20several%20samples%20and%20put%20them%20into%20a%20buffer.%3CBR%20%2F%3E%3CBR%20%2F%3EAttached%20is%20my%20modified%20code.%20And%20I%20get%20the%20following%20error%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%5B%201.436577%5D%20imx93-adc%2044530000.adc%3A%20error%20-EINVAL%3A%20Failed%20to%20register%20this%20iio%20device.%3CBR%20%2F%3E%5B%201.444518%5D%20imx93-adc%3A%20probe%20of%2044530000.adc%20failed%20with%20error%20-22%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20help%3F%3C%2FP%3E%3CP%3E%23%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2140120%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2154519%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMX93%20ADC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2154519%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F203368%22%20target%3D%22_blank%22%3E%40Manuel_Salas%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3ESorry%20for%20the%20late%20response%20I%20was%20OOO.%3CBR%20%2F%3E%3CBR%20%2F%3EYes%20and%20I%20managed%20at%20last%20to%20make%20the%20ADC%20to%20work%20with%20the%20DMA.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20ADC%20now%20working%20with%20DMA.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2142017%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMX93%20ADC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2142017%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F249581%22%20target%3D%22_blank%22%3E%40BaselHn%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EI%20hope%20you%20are%20doing%20very%20well.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHave%20you%20tried%20changing%20the%20line%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-cpp%22%3E%3CCODE%3Eindio_dev-%26gt%3Bmodes%20%3D%20INDIO_DIRECT_MODE%3B%20%2F%2F%7C%20INDIO_BUFFER_TRIGGERED%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3ETo%3A%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-cpp%22%3E%3CCODE%3Eindio_dev-%26gt%3Bmodes%20%3D%20INDIO_DIRECT_MODE%20%7C%20INDIO_BUFFER_TRIGGERED%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3ESalas.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2290476%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMX93%20ADC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2290476%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHey%2C%20did%20you%20ever%20get%20this%20working%20with%20continuous%20mode%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2291358%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMX93%20ADC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2291358%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F216787%22%20target%3D%22_blank%22%3E%40mdeneen%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EYes%2C%20I%20did%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2354254%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMX93%20ADC%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2354254%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ECould%20you%20share%20your%20work%20for%20the%20continous%20mode%20please%3F%3C%2FLINGO-BODY%3E