Tom Daley says his son was behind his decision to make a comeback to compete at a fifth Olympic Games.