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,361件の閲覧回数
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,790件の閲覧回数
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,790件の閲覧回数
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,790件の閲覧回数
bandarulavanya
Contributor V

Hi Victor ,

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

Thanks & Regards,

Lavanya

0 件の賞賛
返信