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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

2,205 次查看
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 项奖励
回复
3 回复数

1,634 次查看
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 项奖励
回复

1,634 次查看
b36401
NXP Employee
NXP Employee

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 项奖励
回复

1,634 次查看
bandarulavanya
Contributor V

Hi Victor ,

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

Thanks & Regards,

Lavanya

0 项奖励
回复