# Re: \[PATCH 4/5\] iio/ti\_am335x\_adc: Allow to specify input line

- From: Sebastian Andrzej Siewior \<hidden\>
- Date: 2013-06-04 10:39:11 
- List: linux-input
- Page: https://ratatoskr.run/linux-input/2013/06/8921590
- Thread: https://ratatoskr.run/linux-iio/2013/06/8921590/t.md

```text
* Jonathan Cameron | 2013-06-02 19:02:38 [+0100]:

>> diff --git a/drivers/mfd/ti_am335x_tscadc.c b/drivers/mfd/ti_am335x_tscadc.c
>> index 5e4076f..b228c41 100644
>> --- a/drivers/mfd/ti_am335x_tscadc.c
>> +++ b/drivers/mfd/ti_am335x_tscadc.c
>> @@ -77,16 +81,26 @@ static	int ti_tscadc_probe(struct platform_device *pdev)
>>
>>  	node = of_get_child_by_name(pdev->dev.of_node, "tsc");
>>  	of_property_read_u32(node, "ti,wires", &tsc_wires);
>> +	of_property_read_u32(node, "ti,coordiante-readouts", &readouts);
>>
>>  	node = of_get_child_by_name(pdev->dev.of_node, "adc");
>> -	of_property_read_u32(node, "ti,adc-channels", &adc_channels);
>> -
>> +	of_property_for_each_u32(node, "ti,adc-channels", prop, cur, val) {
>> +		adc_channels++;
>> +		if (val > 7) {
>> +			dev_err(&pdev->dev, " PIN numbers are 0..7 (not %d)\n",
>> +					val);
>> +			return -EINVAL;
>> +		}
>> +	}
>>  	total_channels = tsc_wires + adc_channels;
>> -
>Should not change this whitespace in this sort of patch.

Okay.

Sebastian
```
