public inbox for linux-input@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: Tomohiro Yoshidomi <sylph23k@gmail.com>,
	David Herrmann <dh.herrmann@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: joystick: make USB drivers depend on USB
Date: Thu, 18 Jan 2018 10:25:21 -0800	[thread overview]
Message-ID: <bbdfcd99-8a2b-d04a-ae3f-a0cac50d312a@infradead.org> (raw)
In-Reply-To: <20180117215316.7qe5o2pspb3dqgny@dtor-ws>

On 01/17/2018 01:53 PM, Dmitry Torokhov wrote:
> On Wed, Jan 17, 2018 at 10:30:10PM +0100, Marcus Folkesson wrote:
>> A driver should not enable an entire subsystem.
> 
> I disagree. As you go through menuconfig and you encounter this option
> and you have the hardware and you want to enable it, you should be able
> to do so. Otherwise you enable bunch of functionality, then go back,
> see what new options appeared, enable them, go back, see if any more new
> options appeared, and so on.

I've been thinking about this.  If a user is using a distro .config file,
it most likely has USB support already enabled, so the description above will
not apply to them.  If they are using some kernel-supplied defconfig file,
I still think that the description above will not apply to them since those
defconfig file will most likely have USB enabled if the target platform supports
USB.  And if they are using some .config file that does not have USB support
enabled, it could be that way for a very good reason.  If the target platform
does not support USB but the user enables (sets) JOYSTICK_XPAD (which selects
USB) but then their device does not work, they will be both disappointed and
confused.

Anyway, I don't think that users will face the problem that you described
very often.  But I understand what you are saying also.


> What exactly prompted this change?
> 
>>
>> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
>> ---
>>  drivers/input/joystick/Kconfig | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
>> index 332c0cc1b2ab..4a199cff8c68 100644
>> --- a/drivers/input/joystick/Kconfig
>> +++ b/drivers/input/joystick/Kconfig
>> @@ -279,8 +279,7 @@ config JOYSTICK_JOYDUMP
>>  
>>  config JOYSTICK_XPAD
>>  	tristate "X-Box gamepad support"
>> -	depends on USB_ARCH_HAS_HCD
>> -	select USB
>> +	depends on USB
>>  	help
>>  	  Say Y here if you want to use the X-Box pad with your computer.
>>  	  Make sure to say Y to "Joystick support" (CONFIG_INPUT_JOYDEV)
>> -- 
>> 2.15.1
>>
> 


-- 
~Randy

  parent reply	other threads:[~2018-01-18 18:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-17 21:30 [PATCH] input: joystick: make USB drivers depend on USB Marcus Folkesson
2018-01-17 21:53 ` Dmitry Torokhov
2018-01-18  0:01   ` Randy Dunlap
2018-01-18 18:25   ` Randy Dunlap [this message]
2018-01-18 18:54     ` Dmitry Torokhov

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=bbdfcd99-8a2b-d04a-ae3f-a0cac50d312a@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=dh.herrmann@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcus.folkesson@gmail.com \
    --cc=sylph23k@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox