Re: [PATCH] iio: adc: qcom-spmi-adc5: Initialize prescale properly

2018-12-12 Thread Evan Green
On Wed, Dec 12, 2018 at 10:41 AM Jonathan Cameron wrote: > > On Sat, 8 Dec 2018 12:05:15 + > Jonathan Cameron wrote: > > > On Tue, 4 Dec 2018 11:57:32 -0800 > > Matthias Kaehlcke wrote: > > > > > On Tue, Dec 04, 2018 at 11:14:19AM -0800, Evan Green wrote: > > > > adc5_get_dt_data uses a loca

Re: [PATCH] iio: adc: qcom-spmi-adc5: Initialize prescale properly

2018-12-12 Thread Jonathan Cameron
On Sat, 8 Dec 2018 12:05:15 + Jonathan Cameron wrote: > On Tue, 4 Dec 2018 11:57:32 -0800 > Matthias Kaehlcke wrote: > > > On Tue, Dec 04, 2018 at 11:14:19AM -0800, Evan Green wrote: > > > adc5_get_dt_data uses a local, prop, feeds it to adc5_get_dt_channel_data, > > > and then puts the r

Re: [PATCH] iio: adc: qcom-spmi-adc5: Initialize prescale properly

2018-12-08 Thread Jonathan Cameron
On Tue, 4 Dec 2018 11:57:32 -0800 Matthias Kaehlcke wrote: > On Tue, Dec 04, 2018 at 11:14:19AM -0800, Evan Green wrote: > > adc5_get_dt_data uses a local, prop, feeds it to adc5_get_dt_channel_data, > > and then puts the result into adc->chan_props. The problem is > > adc5_get_dt_channel_data ma

Re: [PATCH] iio: adc: qcom-spmi-adc5: Initialize prescale properly

2018-12-04 Thread Matthias Kaehlcke
On Tue, Dec 04, 2018 at 11:14:19AM -0800, Evan Green wrote: > adc5_get_dt_data uses a local, prop, feeds it to adc5_get_dt_channel_data, > and then puts the result into adc->chan_props. The problem is > adc5_get_dt_channel_data may not initialize that structure fully, so a > garbage value is used f

[PATCH] iio: adc: qcom-spmi-adc5: Initialize prescale properly

2018-12-04 Thread Evan Green
adc5_get_dt_data uses a local, prop, feeds it to adc5_get_dt_channel_data, and then puts the result into adc->chan_props. The problem is adc5_get_dt_channel_data may not initialize that structure fully, so a garbage value is used for prescale if the optional "qcom,pre-scaling" is not defined in DT.