Championship side Birmingham have announced that they have agreed to sign right-back Neil Eardley on a three-year contract.