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 <jprakash@codeaurora.org>
This commit is contained in:
Jishnu Prakash 2020-02-19 15:20:38 +05:30
commit af699ebb4b

View file

@ -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 <linux/bitops.h>
@ -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;