1. 28 Mar, 2017 16 commits
  2. 16 Mar, 2017 21 commits
  3. 13 Mar, 2017 3 commits
    • Ian Abbott's avatar
      USB: serial: ftdi_sio: allow other bases for "event_char" · f1ce25f2
      Ian Abbott authored
      The 'store' function for the "event_char" device attribute currently
      expects a base 10 value.  The value is composed of an enable bit in bit
      8 and an 8-bit "event character" code in bits 7 to 0.  It seems
      reasonable to allow hexadecimal and octal numbers to be written to the
      device attribute in addition to decimal.  Make it so.
      
      Change the debug message to show the value in hexadecimal, rather than
      decimal.
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      f1ce25f2
    • Ian Abbott's avatar
      USB: serial: ftdi_sio: only allow valid event_char values · d0559a2f
      Ian Abbott authored
      The "event_char" device attribute value, when written, is interpreted as
      an enable bit in bit 8, and an "event character" in bits 7 to 0.
      
      Return an error -EINVAL for out-of-range values.  Use kstrtouint() to
      parse the integer instead of the obsolete simple_strtoul().
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      d0559a2f
    • Ian Abbott's avatar
      USB: serial: ftdi_sio: only allow valid latency timer values · db924066
      Ian Abbott authored
      Valid latency timer values are between 1 ms and 255 ms in 1 ms steps.
      The store function for the "latency_timer" device attribute currently
      allows any value, although only the lower 16 bits will be sent to the
      device, and the device only stores the lower 8 bits.  The hardware
      appears to accept the (invalid) value 0 and treats it the same as 1
      (resulting in a latency of 1 ms).
      
      Change the latency_timer_store() function to accept only the values 0 to
      255, returning an error -EINVAL for out-of-range values.  Call
      kstrtou8() to parse the integer instead of the obsolete
      simple_strtoul().
      Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      db924066