• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » OMAP™ Applications Processors » OMAP 4 Forum » Light sensor is not working on blaze MDP
Share
OMAP™ Applications Processors
  • Forums
Options
  • Subscribe via RSS

Forums

Light sensor is not working on blaze MDP

This question is answered
abhijit Panigrahi
Posted by abhijit Panigrahi
on Apr 11 2012 00:25 AM
Intellectual470 points

Hi,

I am using http://omappedia.org/wiki/L27.IS.2.P2_OMAP4_Icecream_Sandwich_Release_Notes release.

I am unable to get the event when i am giving getevent but the driver is initialized properly.

Thanks

Abhijit

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Gina Glaser
    Posted by Gina Glaser
    on Apr 11 2012 08:04 AM
    Expert8055 points

    Abhijit,

    As mentioned in this thread http://e2e.ti.com/support/omap/f/849/t/181468.aspx, please move to the latest ICS release (http://omappedia.org/wiki/4AI.1.3_OMAP4_Icecream_Sandwich_Release_Notes) since L27.IS.2-P2 is several months old.

    Thank you,

    Gina

    Please click the Verify Answer button on this post if it answers your question

    _______________________________________________________

    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • abhijit Panigrahi
    Posted by abhijit Panigrahi
    on Apr 17 2012 00:36 AM
    Intellectual470 points

    Hi Gina,

    Problem is android is able to detect the light sensor but still data is not coming.

    I have used the latest release.

    Do i have to change anything in the driver code (bh1780gli.c) or in the android filesystem.

    please let me know

    Abhijit

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Jorge Bustamante
    Posted by Jorge Bustamante
    on Apr 17 2012 15:36 PM
    Prodigy695 points

    Hi Abhijit,

    I haven't tried the light sensor myself, but as a suggestion, I could run evtest (perhaps it should be built for Android or get an Android version). You should be able to see activity with evtest, if you don't, you could rule out Android as the issue and focus on kernel side. evtest interacts directly with input drivers.

    Regards,

    Jorge Bustamante

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

    Please click the Verify Answer button on this post if it answers your question.
    ---------------------------------------------------------------------------------------------------------

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • abhijit Panigrahi
    Posted by abhijit Panigrahi
    on Apr 18 2012 01:21 AM
    Intellectual470 points

    Dear jorge,

    I am able to run evtest and able to see light sensor as a device but i am not able to see any data.

    Please help me regarding this.

    Thanks

    Abhijit

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gina Glaser
    Posted by Gina Glaser
    on Apr 18 2012 08:22 AM
    Expert8055 points

    Hi Abhijit,

    I have reproduced your same issue here (the light sensor works on Blaze Tablet but not on Blaze at the Android level).  We are investigating.

    Regards,

    Gina

    Please click the Verify Answer button on this post if it answers your question

    _______________________________________________________

    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • abhijit Panigrahi
    Posted by abhijit Panigrahi
    on Apr 18 2012 08:34 AM
    Intellectual470 points

    Hi geena,

    Thanks a lot geena for looking into it.

    Please let me know regarding the same.

    Regards

    Abhijit

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • abhijit Panigrahi
    Posted by abhijit Panigrahi
    on Apr 20 2012 01:15 AM
    Intellectual470 points

    Hi Geena,

    Light sensor working with workaround.

    When i manually enabled sys/bus/i2c/drvers/bh1780/3-0029/enable its working.

    i.e echo 1 > enable

    similarly echo 1 > power state.

    By default its disabled.

    So if you can tell me where i have to enable it permanently that would be great.

    Thanks

    Abhijit

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gina Glaser
    Posted by Gina Glaser
    on Apr 20 2012 09:15 AM
    Expert8055 points

    Abhijit,

    Do those commands work for you?  When I try them, the light sensor no longer shows "waiting for data", but it reports a constant value of 5 lux.

    Regards,

    Gina

    Please click the Verify Answer button on this post if it answers your question

    _______________________________________________________

    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • abhijit Panigrahi
    Posted by abhijit Panigrahi
    on Apr 20 2012 09:52 AM
    Intellectual470 points

    Gina,

    Yes for me   also its showing constant 2 lux value but when i am trying the same thing on my custom board its working fine.(values are getting changed).

    Can you tell me how can i make them work permanently without giving those commands.

    Thanks

    Abhijit

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gina Glaser
    Posted by Gina Glaser
    on Apr 20 2012 11:18 AM
    Expert8055 points

    Abhijit,

    In general, sysfs entries can be accessed from init.omap4blazeboard.rc with the "write" command instead of "echo."  For the short term, you can try adding a line in init.omap4blazeboard.rc to avoid needing to enter the sysfs entries manually each time, something like:

    write /sys/bus/i2c/drivers/bh1780/3-0029/enable 1

    I will still investigate for a better solution via the appropriate kernel drivers.

    Regards,

    Gina

    Please click the Verify Answer button on this post if it answers your question

    _______________________________________________________

    Be sure to read the OMAP4 and OMAP5 Forum Guidelines and FAQ 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rodrigo Castaneda
    Posted by Rodrigo Castaneda
    on May 18 2012 08:30 AM
    Intellectual785 points
    ambient_light_sensor_patch.txt

    Hi Abhijit:

                  I have modified the driver code so it would be enabled by default and update lux values more often, you could give it a try an tell me if meets your needs, patch file attached to this post, you could also use binary images on links bellow

    Regards,

    Rodrigo

    https://gforge.ti.com/gf/download/user/9221/5616/boot.img_light_sens

    https://gforge.ti.com/gf/download/user/9221/5615/zImage_light_sens

    Please click the Verify Answer button on this post if it answers your question

    _______________________________________________________

     

    Be sure to read the OMAP4 Forum Guidelines & FAQ

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • abhijit Panigrahi
    Posted by abhijit Panigrahi
    on May 22 2012 06:50 AM
    Intellectual470 points

    Hi Rodrigo,

    Tried with your patch........Now the lux values are changing frequently but still power_state is not enabled by default.

    I have to make it high manually after that only it shows lux value

    Something like echo 1 > power_state........................Without doing this it does not show me any lux value.

    And each time i am turning on the application for checking the lux value i am giving this echo 1 > power_state every point of time.

    Why this is so??

    Thanks

    Abhijit

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rodrigo Castaneda
    Posted by Rodrigo Castaneda
    on May 22 2012 09:44 AM
    Intellectual785 points

    Hi Abhijit,

                     I am pretty sure you having this into account, but I still have to mention it, this driver has been designed with among other two things one is to adjust screen backlight intensity and power saving, so when screen backlight  goes off so does the ambient light sensor,  and this will do power_state to go to 0 automatically and the driver won't refresh lux value while is this state, and if there is more power management events to this driver y will set power_state to 0 again. I am telling you this because it was a problem I had with the driver.

    So if you like I can remove power management capabilities from the driver and send it yo you. if you are taking this into account and still having this problem let me know to dig deeper into the driver and solve this.

    Regards

    Rodrigo

    Please click the Verify Answer button on this post if it answers your question

    _______________________________________________________

     

    Be sure to read the OMAP4 Forum Guidelines & FAQ

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • abhijit Panigrahi
    Posted by abhijit Panigrahi
    on May 22 2012 10:02 AM
    Intellectual470 points

    Rodrigo,

    But my backlight intensity is still on when power_state goes to 0.

    This goes to 0 as soon as i am turning off my application(Which i am using for checking lux values).

    Any solution for this.

    Thnks

    Abhijit

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rodrigo Castaneda
    Posted by Rodrigo Castaneda
    on May 22 2012 16:29 PM
    Intellectual785 points
    ambient_light_sensor_patch_2.txt

    Hi Abhijit:

                     Since I can not provide a solution without having your app code and logs. Use this as a tool the attached patch and the bellow links to boot.img and kernel image, have a version of ambient light sensor driver with the power management disabled, so if power_state goes to 0 is because you or your app is doing that, hope with this you can solve this problem.

    https://gforge.ti.com/gf/download/user/9221/5624/boot.img_light_sens2
    https://gforge.ti.com/gf/download/user/9221/5623/zImage_light_sens2

    Regards,

    Rodrigo

    Please click the Verify Answer button on this post if it answers your question

    _______________________________________________________

     

    Be sure to read the OMAP4 Forum Guidelines & FAQ

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
12
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use