mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 13:58:46 +00:00
ASoC: atmel: mchp-pdmc: print the correct property name
The correct property is 'microchip,mic-pos', not 'mchp,mic-pos', so replace all occurences of 'mchp,mic-pos' with 'microchip,mic-pos'. Fix a multi-line comment format while we are at it. Fixes: 50291652af52 ("ASoC: atmel: mchp-pdmc: add PDMC driver") Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20220318092609.130901-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d1129bbe14
commit
c639e85e93
@ -879,13 +879,13 @@ static int mchp_pdmc_dt_init(struct mchp_pdmc *dd)
|
|||||||
|
|
||||||
dd->mic_no = of_property_count_u32_elems(np, "microchip,mic-pos");
|
dd->mic_no = of_property_count_u32_elems(np, "microchip,mic-pos");
|
||||||
if (dd->mic_no < 0) {
|
if (dd->mic_no < 0) {
|
||||||
dev_err(dd->dev, "failed to get mchp,mic-pos: %d",
|
dev_err(dd->dev, "failed to get microchip,mic-pos: %d",
|
||||||
dd->mic_no);
|
dd->mic_no);
|
||||||
return dd->mic_no;
|
return dd->mic_no;
|
||||||
}
|
}
|
||||||
if (!dd->mic_no || dd->mic_no % 2 ||
|
if (!dd->mic_no || dd->mic_no % 2 ||
|
||||||
dd->mic_no / 2 > MCHP_PDMC_MAX_CHANNELS) {
|
dd->mic_no / 2 > MCHP_PDMC_MAX_CHANNELS) {
|
||||||
dev_err(dd->dev, "invalid array length for mchp,mic-pos: %d",
|
dev_err(dd->dev, "invalid array length for microchip,mic-pos: %d",
|
||||||
dd->mic_no);
|
dd->mic_no);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
@ -894,9 +894,10 @@ static int mchp_pdmc_dt_init(struct mchp_pdmc *dd)
|
|||||||
|
|
||||||
dev_info(dd->dev, "%d PDM microphones declared\n", dd->mic_no);
|
dev_info(dd->dev, "%d PDM microphones declared\n", dd->mic_no);
|
||||||
|
|
||||||
/* by default, we consider the order of microphones in mchp,mic-pos to
|
/*
|
||||||
* be the same with the channel mapping; 1st microphone channel 0, 2nd
|
* by default, we consider the order of microphones in
|
||||||
* microphone channel 1, etc.
|
* microchip,mic-pos to be the same with the channel mapping;
|
||||||
|
* 1st microphone channel 0, 2nd microphone channel 1, etc.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < dd->mic_no; i++) {
|
for (i = 0; i < dd->mic_no; i++) {
|
||||||
int ds;
|
int ds;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user