From af699ebb4b257740183c8df2be8e88e4e204a995 Mon Sep 17 00:00:00 2001 From: Jishnu Prakash Date: Wed, 19 Feb 2020 15:20:38 +0530 Subject: [PATCH] iio: adc: qcom-spmi-adc5: Add SID in ADC IIO channel properties For PMIC7 ADC_TM, the IIO channel structure corresponding to a VADC channel needs to have both SID and actual channel number to avoid confusing channels on two different PMICs with same channel number. Add SID in each VADC IIO channel properties, which will be checked by PMIC7 ADC_TM when mapping VADC channels. Change-Id: Iaa2465f881bf0326e4725071735bbf3ec68fafef Signed-off-by: Jishnu Prakash --- drivers/iio/adc/qcom-spmi-adc5.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/qcom-spmi-adc5.c b/drivers/iio/adc/qcom-spmi-adc5.c index 901d22d86df8..9d4944efb6af 100644 --- a/drivers/iio/adc/qcom-spmi-adc5.c +++ b/drivers/iio/adc/qcom-spmi-adc5.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #include @@ -941,6 +941,7 @@ static int adc5_get_dt_data(struct adc5_chip *adc, struct device_node *node) adc_chan = &data->adc_chans[prop.channel]; iio_chan->channel = prop.channel; + iio_chan->channel2 = prop.sid; iio_chan->datasheet_name = prop.datasheet_name; iio_chan->extend_name = prop.datasheet_name; iio_chan->info_mask_separate = adc_chan->info_mask;