HOW to find g_mass_storage device is connected to board using sysfs entries?

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW to find g_mass_storage device is connected to board using sysfs entries?

794 Views
bandarulavanya
Contributor V

Hi All,

How can we find g_mass_storage device is connected to imx6 sabresd based board using sysfs entries mean while how to find it is disconnected.

Thanks & Regards,

Lavanya

0 Kudos
3 Replies

223 Views
danmacdonald
Contributor III

you can monitor the sys class device:

# cat /sys/class/udc/ci_hdrc.0/state

This will provide a string with one of the following:

  • not attached
  • addressed (very short period of time)
  • configured (when connected to PC)
  • suspended (when disconnecting from PC)
  • powered (when connected to a power supply, not pc)
0 Kudos

223 Views
b36401
NXP TechSupport
NXP TechSupport

You can manage it with /sys/module/usb_storage/parameters sysfs structure.

Have a great day,

Victor

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

Note: If this post answers your question, please click the Correct Answer button. Thank you!

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

0 Kudos

223 Views
bandarulavanya
Contributor V

Hi Victor ,

Thanks for information, i tried this but it was not helped.

Thanks & Regards,

Lavanya

0 Kudos