All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: Pawel Laszczak <pawell@cadence.com>
Cc: "gregkh\@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"rogerq\@ti.com" <rogerq@ti.com>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"jbergsagel\@ti.com" <jbergsagel@ti.com>,
	"nsekhar\@ti.com" <nsekhar@ti.com>, "nm\@ti.com" <nm@ti.com>,
	Suresh Punnoose <sureshp@cadence.com>,
	Jayshri Dajiram Pawar <jpawar@cadence.com>,
	Rahul Kumar <kurahul@cadence.com>,
	Anil Joy Varughese <aniljoy@cadence.com>
Subject: RE: [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string.
Date: Tue, 09 Jul 2019 09:29:41 +0300	[thread overview]
Message-ID: <87sgrf67qi.fsf@linux.intel.com> (raw)
In-Reply-To: <BYAPR07MB4709D1BD29C3E0FA6C5289FBDDF10@BYAPR07MB4709.namprd07.prod.outlook.com>


Hi,

Pawel Laszczak <pawell@cadence.com> writes:
>>> 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.
>>> + */
>>> +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);
>>> +
>>>  #endif /* __LINUX_USB_OTG_H */
>>
>>Still missing the stubs I mentioned. Did you try compiling with and
>>without common enabled?
>>
> Sorry, I thought that I send answer yesterday but it's look like I prepared the answer but 
> I  forgot to send. 
>
> In /drivers/usb/Kconfig we have: 
>
> config USB
> 	tristate "Support for Host-side USB"
> 	depends on USB_ARCH_HAS_HCD
> 	select USB_COMMON
>
> and in /drivers/usb/gadget/Kconfig we have:
>
> menuconfig USB_GADGET
> 	tristate "USB Gadget Support"
> 	select USB_COMMON
>
> I think that it should cover all cases. 
>
> Am I right ?

Run a few tens of randconfig builds and see if you ever catch any
problem. I think randconfig can produce a defconfig where USB=n
USB_GADGET=n and USB_COMMON=y.

-- 
balbi

  reply	other threads:[~2019-07-09  6:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <all>
2019-07-08 13:35 ` [PATCH 1/3] usb: common: Add usb_get_dr_mode_from_string and usb_dr_mode_to_string Pawel Laszczak
2019-07-09  6:11   ` Felipe Balbi
2019-07-09  6:23     ` Pawel Laszczak
2019-07-09  6:29       ` Felipe Balbi [this message]
2019-07-09  6:37         ` Pawel Laszczak
2019-07-21 14:54           ` Pawel Laszczak
2019-07-31  3:49             ` Pawel Laszczak

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=87sgrf67qi.fsf@linux.intel.com \
    --to=felipe.balbi@linux.intel.com \
    --cc=aniljoy@cadence.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbergsagel@ti.com \
    --cc=jpawar@cadence.com \
    --cc=kurahul@cadence.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=nsekhar@ti.com \
    --cc=pawell@cadence.com \
    --cc=rogerq@ti.com \
    --cc=sureshp@cadence.com \
    /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.