LSM9DS1: add allocate function.

This must be squashed before merge request.

Signed-off-by: Giuseppe Barba <giuseppe.barba@st.com>