hidd: initial import
build fixes
build warnings
apply the hidd patch