1. 04 5月, 2016 1 次提交
  2. 20 4月, 2016 2 次提交
  3. 17 4月, 2016 2 次提交
  4. 11 2月, 2016 1 次提交
  5. 03 12月, 2015 1 次提交
    • J
      staging:iio:mxs-lradc Fix large integer implicitly truncated to unsigned warning · f89c2b39
      Jonathan Cameron 提交于
      The change to using BIT(20) for one of the bit shifts resulted
      in a constant becoming unsigned. When combined with the existing
      signed constants in a couple of places, this caused possible trouble,
      hence the warnings:
      
      drivers/staging/iio/adc/mxs-lradc.c: In function ‘mxs_lradc_complete_touch_event’:
      drivers/staging/iio/adc/mxs-lradc.c:325:5: warning: large integer implicitly truncated to unsigned type [-Woverflow]
           (((x) << LRADC_DELAY_TRIGGER_LRADCS_OFFSET) & \
           ^
      drivers/staging/iio/adc/mxs-lradc.c:734:7: note: in expansion of macro ‘LRADC_DELAY_TRIGGER’
             LRADC_DELAY_TRIGGER(1 << TOUCHSCREEN_VCHANNEL1) |
             ^
        LD [M]  drivers/staging/iio/accel/adis16201.o
      drivers/staging/iio/adc/mxs-lradc.c: In function ‘mxs_lradc_buffer_preenable’:
      drivers/staging/iio/adc/mxs-lradc.c:322:42: warning: large integer implicitly truncated to unsigned type [-Woverflow]
       #define LRADC_DELAY_TRIGGER_LRADCS_MASK  (0xff << 24)
                                                ^
      drivers/staging/iio/adc/mxs-lradc.c:1308:29: note: in expansion of macro ‘LRADC_DELAY_TRIGGER_LRADCS_MASK’
        mxs_lradc_reg_clear(lradc, LRADC_DELAY_TRIGGER_LRADCS_MASK |
                                   ^
      drivers/staging/iio/adc/mxs-lradc.c: In function ‘mxs_lradc_buffer_postdisable’:
      drivers/staging/iio/adc/mxs-lradc.c:322:42: warning: large integer implicitly truncated to unsigned type [-Woverflow]
       #define LRADC_DELAY_TRIGGER_LRADCS_MASK  (0xff << 24)
                                                ^
      drivers/staging/iio/adc/mxs-lradc.c:1327:29: note: in expansion of macro ‘LRADC_DELAY_TRIGGER_LRADCS_MASK’
        mxs_lradc_reg_clear(lradc, LRADC_DELAY_TRIGGER_LRADCS_MASK |
      
      The simplest fix is to force LRADC_DELAY_TRIGGER_LRADCS_MASK to be
      a shift of an unsigned 0xff rather than a signed one.
      
      This is ugly considering it is the only constant in the driver which
      is so forced, but it does deal with the issue.
      
      Fixes: e0c961bd (iio: adc: mxs-lradc: Prefer using the BIT macro)
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f89c2b39
  6. 15 11月, 2015 1 次提交
  7. 17 10月, 2015 3 次提交
  8. 11 10月, 2015 1 次提交
  9. 19 7月, 2015 6 次提交
  10. 26 3月, 2015 1 次提交
  11. 08 2月, 2015 1 次提交
  12. 01 2月, 2015 1 次提交
  13. 27 1月, 2015 4 次提交
    • K
      iio: mxs-lradc: only update the buffer when its conversions have finished · 89bb35e2
      Kristina Martšenko 提交于
      Using the touchscreen while running buffered capture results in the
      buffer reporting lots of wrong values, often just zeros. This is because
      we push readings to the buffer every time a touchscreen interrupt
      arrives, including when the buffer's own conversions have not yet
      finished. So let's only push to the buffer when its conversions are
      ready.
      Signed-off-by: NKristina Martšenko <kristina.martsenko@gmail.com>
      Reviewed-by: NMarek Vasut <marex@denx.de>
      Cc: Stable@vger.kernel.org
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      89bb35e2
    • K
      iio: mxs-lradc: make ADC reads not unschedule touchscreen conversions · 6abe0300
      Kristina Martšenko 提交于
      Reading a channel through sysfs, or starting a buffered capture, can
      occasionally turn off the touchscreen.
      
      This is because the read_raw() and buffer preenable()/postdisable()
      callbacks unschedule current conversions on all channels. If a delay
      channel happens to schedule a touchscreen conversion at the same time,
      the conversion gets cancelled and the touchscreen sequence stops.
      
      This is probably related to this note from the reference manual:
      
      	"If a delay group schedules channels to be sampled and a manual
      	write to the schedule field in CTRL0 occurs while the block is
      	discarding samples, the LRADC will switch to the new schedule
      	and will not sample the channels that were previously scheduled.
      	The time window for this to happen is very small and lasts only
      	while the LRADC is discarding samples."
      
      So make the callbacks only unschedule conversions for the channels they
      use. This means channel 0 for read_raw() and channels 0-5 for the buffer
      (if the touchscreen is enabled). Since the touchscreen uses different
      channels (6 and 7), it no longer gets turned off.
      
      This is tested and fixes the issue on i.MX28, but hasn't been tested on
      i.MX23.
      Signed-off-by: NKristina Martšenko <kristina.martsenko@gmail.com>
      Reviewed-by: NMarek Vasut <marex@denx.de>
      Cc: Stable@vger.kernel.org
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      6abe0300
    • K
      iio: mxs-lradc: make ADC reads not disable touchscreen interrupts · 86bf7f3e
      Kristina Martšenko 提交于
      Reading a channel through sysfs, or starting a buffered capture, will
      currently turn off the touchscreen. This is because the read_raw() and
      buffer preenable()/postdisable() callbacks disable interrupts for all
      LRADC channels, including those the touchscreen uses.
      
      So make the callbacks only disable interrupts for the channels they use.
      This means channel 0 for read_raw() and channels 0-5 for the buffer (if
      the touchscreen is enabled). Since the touchscreen uses different
      channels (6 and 7), it no longer gets turned off.
      
      Note that only i.MX28 is affected by this issue, i.MX23 should be fine.
      Signed-off-by: NKristina Martšenko <kristina.martsenko@gmail.com>
      Reviewed-by: NMarek Vasut <marex@denx.de>
      Cc: Stable@vger.kernel.org
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      86bf7f3e
    • K
      iio: mxs-lradc: separate touchscreen and buffer virtual channels · f81197b8
      Kristina Martšenko 提交于
      The touchscreen was initially designed [1] to map all of its physical
      channels to one virtual channel, leaving buffered capture to use the
      remaining 7 virtual channels. When the touchscreen was reimplemented
      [2], it was made to use four virtual channels, which overlap and
      conflict with the channels the buffer uses.
      
      As a result, when the buffer is enabled, the touchscreen's virtual
      channels are remapped to whichever physical channels the buffer was
      configured with, causing the touchscreen to read those instead of the
      touch measurement channels. Effectively the touchscreen stops working.
      
      So here we separate the channels again, giving the touchscreen 2 virtual
      channels and the buffer 6. We can't give the touchscreen just 1 channel
      as before, as the current pressure calculation requires 2 channels to be
      read at the same time.
      
      This makes the touchscreen continue to work during buffered capture. It
      has been tested on i.MX28, but not on i.MX23.
      
      [1] 06ddd353 ("iio: mxs: Implement support for touchscreen")
      [2] dee05308 ("Staging/iio/adc/touchscreen/MXS: add interrupt driven
      touch detection")
      Signed-off-by: NKristina Martšenko <kristina.martsenko@gmail.com>
      Reviewed-by: NMarek Vasut <marex@denx.de>
      Cc: Stable@vger.kernel.org
      Signed-off-by: NJonathan Cameron <jic23@kernel.org>
      f81197b8
  14. 06 1月, 2015 1 次提交
  15. 06 11月, 2014 1 次提交
  16. 29 10月, 2014 1 次提交
  17. 20 10月, 2014 1 次提交
  18. 10 10月, 2014 1 次提交
  19. 03 10月, 2014 1 次提交
  20. 22 9月, 2014 2 次提交
  21. 14 6月, 2014 2 次提交
  22. 22 3月, 2014 1 次提交
  23. 20 3月, 2014 1 次提交
  24. 25 2月, 2014 1 次提交
  25. 15 2月, 2014 1 次提交
  26. 08 2月, 2014 1 次提交