problem in port the mag3110 driver to linux source code for imx53

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

problem in port the mag3110 driver to linux source code for imx53

1,859 Views
ehsanrezaie
Contributor I

i'm tring to port mag3110 to imx 53 qsb board by drivers that

presented with this property(downloaded from freescale website):

 


/******************** (C) COPYRIGHT 2012 Freescale Semiconductor, Inc.

 

   * File Name            : mag_3110.c
* Authors              : Rick Zhang([email protected]

 

)
                          Rick is willing to be considered the contact and update points
                          for the driver
* Version              : V.1.0.0
* Date                 : 2012/Mar/15
* Description          : methods and data structure related to MAG3110
magnetometer sensor.
   ******************************************************************************

 

          *******************************************************************
* Revision 1.0.0 3/15/2012 First Release;
******************************************************************************

 

 

and i try to port with readme sequence and using ltib(install from freescaleL2.6.35_11_09_ER_SOURCE package)   .

 

but in step 5 of readme sequence(Configure and compile the driver)i have problem in complie

 

 

 

 

--------------------------------
drivers/hwmon/mag3110/mag_core.c:44:31: error: linux/fsl_sensors.h: No
such file or directory
In file included from drivers/hwmon/mag3110/mag_core.c:46:
drivers/hwmon/mag3110/mag_regs.h:33:28: error: linux/wakelock.h: No
such file or directory

-------------------------------------------------

so , how i can solve this problem?  .

i attached read me file & complete compile error report


i cant find header files like wakelock.h on the internet.

 

 

 

 

please help me to solve it

 

Original Attachment has been moved to: mag_3110.c.zip

Original Attachment has been moved to: Readme.txt.zip

Labels (1)
Tags (2)
0 Kudos
1 Reply

1,504 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hello Ehsan,

Sorry to hear you ran into this error.


Please try to replace <linux/fsl_sensors.h> to <linux/mag3110.h>.


Let me know whether or not it helps, or if you have any other questions.


Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct" or “Helpful”. Thank you.

0 Kudos
%3CLINGO-SUB%20id%3D%22lingo-sub-331735%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eproblem%20in%20port%20the%20mag3110%20driver%20to%20linux%20source%20code%20for%20imx53%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331735%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%20class%3D%22im%22%20style%3D%22color%3A%20%23500050%3B%20font-family%3A%20arial%2C%20sans-serif%3B%20font-size%3A%2013.63636302947998px%3B%22%3Ei'm%20tring%20to%20port%20mag3110%20to%20imx%2053%20qsb%20board%20by%20drivers%20that%3C%2FP%3E%3CP%20style%3D%22color%3A%20%23222222%3B%20font-family%3A%20arial%2C%20sans-serif%3B%20font-size%3A%2013.63636302947998px%3B%22%3Epresented%20with%20this%20property(downloaded%20from%20freescale%20website)%3A%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%20color%3A%20%23222222%3B%20font-family%3A%20arial%2C%20sans-serif%3B%20font-size%3A%2013.63636302947998px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22im%22%20style%3D%22color%3A%20%23500050%3B%22%3E%3CBR%20%2F%3E%2F********************%20(C)%20COPYRIGHT%202012%20Freescale%20Semiconductor%2C%20Inc.%3CBR%20%2F%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22im%22%20style%3D%22color%3A%20%23500050%3B%22%3E%26nbsp%3B%26nbsp%3B%20*%20File%20Name%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20mag_3110.c%3CBR%20%2F%3E%20*%20Authors%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20Rick%20Zhang(%3CA%20class%3D%22jive-link-email-small%22%20href%3D%22mailto%3Arick.zhang%40freescale.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Erick.zhang%40freescale.com%3C%2FA%3E%3C%2FP%3E%3C%2FDIV%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%20color%3A%20%23222222%3B%20font-family%3A%20arial%2C%20sans-serif%3B%20font-size%3A%2013.63636302947998px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22im%22%20style%3D%22color%3A%20%23500050%3B%22%3E)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Rick%20is%20willing%20to%20be%20considered%20the%20contact%20and%20update%20points%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20for%20the%20driver%3CBR%20%2F%3E%20*%20Version%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20V.1.0.0%3CBR%20%2F%3E%20*%20Date%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%202012%2FMar%2F15%3CBR%20%2F%3E%20*%20Description%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3A%20methods%20and%20data%20structure%20related%20to%20MAG3110%3CBR%20%2F%3Emagnetometer%20sensor.%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%20******************************************************************************%3CBR%20%2F%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20class%3D%22im%22%20style%3D%22color%3A%20%23500050%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20*******************************************************************%3CBR%20%2F%3E%20*%20Revision%201.0.0%203%2F15%2F2012%20First%20Release%3B%3CBR%20%2F%3E%20******************************************************************************%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3Eand%20i%20try%20to%20port%20with%20readme%20sequence%20and%20using%20ltib(install%20from%20freescaleL2.6.35_11_09_ER_SOURCE%20package)%26nbsp%3B%26nbsp%3B%20.%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3Ebut%20in%20step%205%20of%20readme%20sequence(Configure%20and%20compile%20the%20driver)i%20have%20problem%20in%20complie%20%3CLI-EMOJI%20id%3D%22lia_disappointed-face%22%20title%3D%22%3Adisappointed_face%3A%22%3E%3C%2FLI-EMOJI%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22adm%22%20style%3D%22margin%3A%205px%200%3B%22%3E%3CDIV%20class%3D%22ajR%20h4%22%20data-tooltip%3D%22%D9%BE%D9%86%D9%87%D8%A7%D9%86%20%DA%A9%D8%B1%D8%AF%D9%86%20%D9%85%D8%AD%D8%AA%D9%88%D8%A7%DB%8C%20%DA%AF%D8%B3%D8%AA%D8%B1%D8%B4%20%DB%8C%D8%A7%D9%81%D8%AA%D9%87%22%20style%3D%22color%3A%20%23500050%3B%20font-size%3A%2011px%3B%20background-color%3A%20%23f1f1f1%3B%22%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3C%2FDIV%3E%3CP%20class%3D%22im%22%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%20color%3A%20%23500050%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CP%3E--------------------------------%3CBR%20%2F%3Edrivers%2Fhwmon%2Fmag3110%2Fmag_core.c%3A44%3A31%3A%20error%3A%20linux%2Ffsl_sensors.h%3A%20No%3CBR%20%2F%3Esuch%20file%20or%20directory%3CBR%20%2F%3EIn%20file%20included%20from%20drivers%2Fhwmon%2Fmag3110%2Fmag_core.c%3A46%3A%3CBR%20%2F%3Edrivers%2Fhwmon%2Fmag3110%2Fmag_regs.h%3A33%3A28%3A%20error%3A%20linux%2Fwakelock.h%3A%20No%3CBR%20%2F%3Esuch%20file%20or%20directory%3C%2FP%3E%3CP%3E-------------------------------------------------%3C%2FP%3E%3C%2FDIV%3Eso%20%2C%20how%20i%20can%20solve%20this%20problem%3F%26nbsp%3B%20.%3CP%3Ei%20attached%20read%20me%20file%20%26amp%3B%20complete%20compile%20error%20report%3C%2FP%3E%3CBR%20%2F%3Ei%20cant%20find%20header%20files%20like%20wakelock.h%20on%20the%20internet.%3CP%20class%3D%22yj6qo%20ajU%22%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%20padding%3A%2010px%200%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22ajR%22%20data-tooltip%3D%22%D9%BE%D9%86%D9%87%D8%A7%D9%86%20%DA%A9%D8%B1%D8%AF%D9%86%20%D9%85%D8%AD%D8%AA%D9%88%D8%A7%DB%8C%20%DA%AF%D8%B3%D8%AA%D8%B1%D8%B4%20%DB%8C%D8%A7%D9%81%D8%AA%D9%87%22%20style%3D%22background-color%3A%20%23f1f1f1%3B%22%3E%3CA%20href%3D%22https%3A%2F%2Fssl.gstatic.com%2Fui%2Fv1%2Ficons%2Fmail%2Fimages%2Fcleardot.gif%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%3CIMG%20class%3D%22jiveImage%20ajT%22%20src%3D%22https%3A%2F%2Fssl.gstatic.com%2Fui%2Fv1%2Ficons%2Fmail%2Fimages%2Fcleardot.gif%22%20%2F%3E%3C%2FA%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3C%2FDIV%3E%3CP%20class%3D%22adL%22%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3C%2FDIV%3E%3CP%20class%3D%22adL%20im%22%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%20color%3A%20%23500050%3B%20font-family%3A%20arial%2C%20sans-serif%3B%20font-size%3A%2013.63636302947998px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22gmail_extra%22%3Eplease%20help%20me%20to%20solve%20it%3C%2FDIV%3E%3CDIV%20class%3D%22gmail_extra%22%3E%20%3C%2FDIV%3E%3CDIV%20class%3D%22gmail_extra%22%3E%3CP%20style%3D%22min-height%3A%208pt%3B%20padding%3A%200px%3B%22%3E%26nbsp%3B%3C%2FP%3E%3C%2FDIV%3E%3CP%3E%3CSTRONG%3EOriginal%20Attachment%20has%20been%20moved%20to%3A%20%3CA%20_jive_internal%3D%22true%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fdocs%2FDOC-338674%22%20target%3D%22_blank%22%3Emag_3110.c.zip%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EOriginal%20Attachment%20has%20been%20moved%20to%3A%20%3CA%20_jive_internal%3D%22true%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fdocs%2FDOC-338674%22%20target%3D%22_blank%22%3EReadme.txt.zip%3C%2FA%3E%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-331735%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EMagnetic%20Sensors%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-331736%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20problem%20in%20port%20the%20mag3110%20driver%20to%20linux%20source%20code%20for%20imx53%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-331736%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20Ehsan%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%20font-family%3A%20adobe-clean%2C%20'Helvetica%20Neue'%2C%20Arial%2C%20sans-serif%3B%22%3ESorry%20to%20hear%20you%20ran%20into%20this%20error.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%20font-family%3A%20adobe-clean%2C%20'Helvetica%20Neue'%2C%20Arial%2C%20sans-serif%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%20font-family%3A%20adobe-clean%2C%20'Helvetica%20Neue'%2C%20Arial%2C%20sans-serif%3B%22%3EPlease%20try%20to%20replace%20%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Arial'%2C'sans-serif'%3B%22%3E%3CEM%3E%3CLINUX%3E%3C%2FLINUX%3E%3C%2FEM%3E%20to%20%3CEM%3E%3CLINUX%3E.%3C%2FLINUX%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Arial'%2C'sans-serif'%3B%22%3E%3CEM%3E%3CBR%20%2F%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Arial'%2C'sans-serif'%3B%22%3ELet%20me%20know%20whether%20or%20not%20it%20helps%2C%20or%20if%20you%20have%20any%20other%20questions.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Arial'%2C'sans-serif'%3B%22%3E%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Arial'%2C'sans-serif'%3B%22%3ERegards%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2010.0pt%3B%20font-family%3A%20'Arial'%2C'sans-serif'%3B%22%3ETomas%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23333333%3B%20font-size%3A%2010.0pt%3B%20font-family%3A%20'Arial'%2C'sans-serif'%3B%22%3E%3CEM%3E%3CSPAN%20style%3D%22color%3A%20%233d3d3d%3B%20font-style%3A%20italic%3B%20font-size%3A%2011px%3B%20font-family%3A%20inherit%3B%20font-weight%3A%20inherit%3B%22%3E%3CEM%3EPS%3A%3CSPAN%20class%3D%22Apple-converted-space%22%20style%3D%22font-weight%3A%20inherit%3B%20font-style%3A%20inherit%3B%20font-family%3A%20inherit%3B%22%3E%3CSPAN%20class%3D%22Apple-converted-space%22%3E%20%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3CSPAN%20style%3D%22font-weight%3A%20inherit%3B%20font-style%3A%20italic%3B%20font-size%3A%2011px%3B%20font-family%3A%20inherit%3B%20color%3A%20%233d3d3d%3B%22%3EIf%20my%20answer%20helps%20to%20solve%20your%20question%2C%20please%20mark%20it%20as%20%22Correct%22%20or%20%E2%80%9CHelpful%E2%80%9D.%20Thank%20you.%3C%2FSPAN%3E%3C%2FEM%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E