All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Martyn Welch <martyn.welch@collabora.co.uk>
Cc: Konstantin Shkolnyy <Konstantin.Shkolnyy@silabs.com>,
	johan@kernel.org,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/4] USB: serial: cp210x: New register access functions.
Date: Mon, 18 Jan 2016 18:47:08 +0100	[thread overview]
Message-ID: <20160118174708.GH3169@localhost> (raw)
In-Reply-To: <5697DCCB.30504@collabora.co.uk>

On Thu, Jan 14, 2016 at 05:37:15PM +0000, Martyn Welch wrote:
> On 02/01/16 03:11, Konstantin Shkolnyy wrote:
> > cp210x_get_config and cp210x_set_config are cumbersome to use. This change
> > introduces new register access functions to replace them. New functions
> > are not yet called - the switch is done gradually in following changes.
> >
> > Signed-off-by: Konstantin Shkolnyy <konstantin.shkolnyy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > ---

> > +/*
> > + * Reads any 8-bit CP210X_ register identified by req.
> > + */
> > +static int cp210x_read_u8_reg(struct usb_serial_port *port, u8 req, u8 *val)
> > +{
> > +	return cp210x_read_reg_block(port, req, val, sizeof(*val));
> > +}
> > +
> > +/*
> > + * Writes any 16-bit CP210X_ register (req) whose value is passed
> > + * entirely in the wValue field of the USB request.
> > + */
> > +static int cp210x_write_u16_reg(struct usb_serial_port *port, u8 req, u16 val)
> 
> Think this needs a different name to draw more attention to the fact 
> that it writes in a different way from cp210x_write_u32_reg and how the 
> cp210x_read_uXX_reg read.

Not necessarily. Why would the caller need to care about that?

Keeping the suggested names should be fine.

Thanks,
Johan

      reply	other threads:[~2016-01-18 17:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-02  3:11 [PATCH v3 1/4] USB: serial: cp210x: New register access functions Konstantin Shkolnyy
2016-01-14 17:37 ` Martyn Welch
2016-01-18 17:47   ` Johan Hovold [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160118174708.GH3169@localhost \
    --to=johan@kernel.org \
    --cc=Konstantin.Shkolnyy@silabs.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martyn.welch@collabora.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.