Messages in this thread | | | Date | Sun, 5 Sep 2021 11:24:39 +0100 | From | Jonathan Cameron <> | Subject | Re: [PATCH v3 04/10] iio: adc: at91-sama5d2_adc: convert to platform specific data structures |
| |
> > @@ -700,9 +786,9 @@ static int at91_adc_read_position(struct at91_adc_state *st, int chan, u16 *val) > > *val = 0; > > if (!st->touch_st.touching) > > return -ENODATA; > > - if (chan == AT91_SAMA5D2_TOUCH_X_CHAN_IDX) > > + if (chan == st->soc_info.platform->touch_chan_x) > > *val = at91_adc_touch_x_pos(st); > > - else if (chan == AT91_SAMA5D2_TOUCH_Y_CHAN_IDX) > > + else if (chan == st->soc_info.platform->touch_chan_y) > > *val = at91_adc_touch_y_pos(st); > > else > > return -ENODATA; > > @@ -715,7 +801,7 @@ static int at91_adc_read_pressure(struct at91_adc_state *st, int chan, u16 *val) > > *val = 0; > > if (!st->touch_st.touching) > > return -ENODATA; > > - if (chan == AT91_SAMA5D2_TOUCH_P_CHAN_IDX) > > + if (chan == st->soc_info.platform->touch_chan_y) > > Could you please tidy up here before applying, there is a slip on my > side, it should be the pressure channel : > if (chan == st->soc_info.platform->touch_chan_p) > > (not the Y channel ) > > Thanks and sorry ! Done
| |