Initial patch provided by Gustavo Zacarias <gustavo@zacarias.com.ar>. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>