Lionel Messi has been given the all-clear to play in Barcelona's opening game of the Spanish league season on Sunday.