How do i setup my logitech gamepad to retroarch?

I am wondering, is it possible to run a logitech gamepad with retroarch on a jail broken device? I would love to know if it is possible?

RetroBoy.