[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <874l3whh4g.fsf@linux.intel.com>
Date: Mon, 08 Jul 2019 14:59:11 +0300
From: Felipe Balbi <felipe.balbi@...ux.intel.com>
To: Pawel Laszczak <pawell@...ence.com>,
"devicetree\@vger.kernel.org" <devicetree@...r.kernel.org>
Cc: "gregkh\@linuxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-usb\@vger.kernel.org" <linux-usb@...r.kernel.org>,
"hdegoede\@redhat.com" <hdegoede@...hat.com>,
"heikki.krogerus\@linux.intel.com" <heikki.krogerus@...ux.intel.com>,
"robh+dt\@kernel.org" <robh+dt@...nel.org>,
"rogerq\@ti.com" <rogerq@...com>,
"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
"jbergsagel\@ti.com" <jbergsagel@...com>,
"nsekhar\@ti.com" <nsekhar@...com>, "nm\@ti.com" <nm@...com>,
Suresh Punnoose <sureshp@...ence.com>,
"peter.chen\@nxp.com" <peter.chen@....com>,
Jayshri Dajiram Pawar <jpawar@...ence.com>,
Rahul Kumar <kurahul@...ence.com>
Subject: RE: [PATCH v9 5/6] usb:cdns3 Add Cadence USB3 DRD Driver
(please send it as a formal patch from now on)
Hi,
Pawel Laszczak <pawell@...ence.com> writes:
> The prototype was added , but not all text was past. Sorry for that.
>
> Fixed version: with your changes.
>
> ///// v2 corrected
> commit 4553d48dd0500085d90c8280e28714072279c3dd (HEAD)
> Author: Pawel Laszczak <pawell@...ence.com>
> Date: Mon Jul 8 12:53:47 2019 +0200
>
> usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.
>
> Patch introduces new function usb_dr_mode_to_string for converting dual role
> mod to string and removes static from usb_dr_mode_to_string definition.
>
> Both changes have made to avoid duplication of code by cdns3 driver.
missing Signed-off-by
> diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
> index 69f1b6328532..c156817672c4 100644
> --- a/include/linux/usb/otg.h
> +++ b/include/linux/usb/otg.h
> @@ -129,4 +129,20 @@ enum usb_dr_mode {
> */
> extern enum usb_dr_mode usb_get_dr_mode(struct device *dev);
>
> +/**
> + * usb_get_dr_mode_from_string - Convert string to dual role mode.
> + * @str: Pointer to the given string
> + *
> + * The function gets string and returns the correspondig enum usb_dr_mode.
> + */
why duplicate the documentation? Perhaps put it only in the header,
otherwise we will need to update two locations whenever these functions
change.
> +extern enum usb_dr_mode usb_get_dr_mode_from_string(const char *str);
> +
> +/**
> + * usb_dr_mode_to_string - Convert dual role mode to string.
> + * @dr_mode: Pointer to the given dual role mode
> + *
> + * The function gets enum usb_dr_mode, and returns the correspondig string.
> + */
> +extern const char *usb_dr_mode_to_string(const enum usb_dr_mode dr_mode);
Don't you need a stub for builds when CONFIG_USB_COMMON=n?
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)
Powered by blists - more mailing lists