lkml.org 
[lkml]   [2015]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions
From
On Tue, Oct 20, 2015 at 2:45 AM, Johan Hovold <johan@kernel.org> wrote:
[...]
> Instead of adding the new helpers to read u16 as a prerequisite for
> fixing the broken cp2108 support, just reuse the current config register
> helpers for now (in order to keep the fixes minimal and potentially
> backportable). Once the fixes are in place, feel free to clean up the
> remaining register accesses.

The current helpers take "port" as a parameter. You pointed out
previously that port shouldn't be used in probe(). That made me
implement new helpers cp210x_write_u16_reg and cp210x_read_u16_reg
that don't use port. Probe() now calls cp210x_activate_workarounds
which in turn calls these new helpers.

An alternative would be to call usb_control_msg from
cp210x_activate_workarounds, but I think it would make it look pretty
ugly.


\
 
 \ /
  Last update: 2015-10-20 15:21    [W:0.049 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site