[atheros] fix GPIO direction setup on ar5312, and fix compiler warnings