soc: fsl: qe: support fsl,qe-snums property
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Mon, 13 May 2019 11:15:00 +0000 (11:15 +0000)
committerLi Yang <leoyang.li@nxp.com>
Wed, 5 Jun 2019 19:26:39 +0000 (14:26 -0500)
commit5cfca8911ddd59150ba53cff16956eabe1b3dcac
treecfe0677a7ec0738a26ddb88582eda2ae40c1b209
parent8f762fe5819f8561343cf02e234789744ed68a98
soc: fsl: qe: support fsl,qe-snums property

Add driver support for the newly introduced fsl,qe-snums property.

Conveniently, of_property_read_variable_u8_array does exactly what we
need: If the property fsl,qe-snums is found (and has an allowed size),
the array of values get copied to snums, and the return value is the
number of snums - we cannot assign directly to num_of_snums, since we
need to check whether the return value is negative.

Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Qiang Zhao <qiang.zhao@nxp.com>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
drivers/soc/fsl/qe/qe.c