linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jari Vanhala <ext-jari.vanhala@nokia.com>
To: Jiri Kosina <jkosina@suse.cz>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH] HID: TWL4030: add HID Force Feedback vibra
Date: Thu, 18 Feb 2010 14:50:16 +0200	[thread overview]
Message-ID: <1266497417.4787.2923.camel@tema> (raw)
In-Reply-To: <alpine.LNX.2.00.1002171333460.30967@pobox.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 824 bytes --]

On Wed, 2010-02-17 at 13:41 +0100, ext Jiri Kosina wrote:
> On Wed, 17 Feb 2010, Jari Vanhala wrote:
> As the device doesn't seem to be registering itself on the HID bus at all, 
> I am not sure we want to put it together with all the HID drivers. Maybe 
> drivers/input/misc would be more appropriate?

I felt like I forgot something.. Well, moving it to input/misc is easy
(commit attached), but I (still) wanted to try getting it to use
hid-functions. Results weren't that nice. Looking hid-core just shows,
it's thought to connect (hotplug) usb or bt devices and i2c doesn't fit
nicely to that. Making it to use hid_allocate_device(), hid_connect()
etc takes actually more code..

Leaving it as-is in hid would look little odd, so probably moving it to
drivers/input/misc is best thing. What you think? Dmitry?

	++Jam


[-- Attachment #2: hidmove --]
[-- Type: text/plain, Size: 3339 bytes --]

    Input: Change hid to misc
    
    Signed-off-by: Jari Vanhala <ext-jari.vanhala@nokia.com>

----------------------------- drivers/hid/Kconfig -----------------------------
index 9bb4e0a..71d4c07 100644
@@ -372,14 +372,6 @@ config ZEROPLUS_FF
 	  Say Y here if you have a Zeroplus based game controller and want
 	  to have force feedback support for it.
 
-config HID_TWL4030_VIBRA
-	tristate "HID Support for TWL4030 Vibrator"
-	depends on TWL4030_CORE
-	select TWL4030_CODEC
-	select INPUT_FF_MEMLESS
-	---help---
-	  This option enables support for TWL4030 Vibrator Driver.
-
 endmenu
 
 endif # HID_SUPPORT

----------------------------- drivers/hid/Makefile -----------------------------
index 192cde6..0b2618f 100644
@@ -55,7 +55,6 @@ obj-$(CONFIG_HID_TOPSEED)	+= hid-topseed.o
 obj-$(CONFIG_HID_TWINHAN)	+= hid-twinhan.o
 obj-$(CONFIG_HID_ZEROPLUS)	+= hid-zpff.o
 obj-$(CONFIG_HID_WACOM)		+= hid-wacom.o
-obj-$(CONFIG_HID_TWL4030_VIBRA)	+= hid-twl4030-vibra.o
 
 obj-$(CONFIG_USB_HID)		+= usbhid/
 obj-$(CONFIG_USB_MOUSE)		+= usbhid/

-------------------------- drivers/input/misc/Kconfig --------------------------
index 16ec523..2646ce8 100644
@@ -204,6 +204,14 @@ config INPUT_TWL4030_PWRBUTTON
 	  To compile this driver as a module, choose M here. The module will
 	  be called twl4030_pwrbutton.
 
+config INPUT_TWL4030_VIBRA
+	tristate "Support for TWL4030 Vibrator"
+	depends on TWL4030_CORE
+	select TWL4030_CODEC
+	select INPUT_FF_MEMLESS
+	help
+	  This option enables support for TWL4030 Vibrator Driver.
+
 config INPUT_UINPUT
 	tristate "User level driver support"
 	help

------------------------- drivers/input/misc/Makefile -------------------------
index a8b8485..1ab002e 100644
@@ -25,6 +25,7 @@ obj-$(CONFIG_INPUT_GPIO_ROTARY_ENCODER)	+= rotary_encoder.o
 obj-$(CONFIG_INPUT_SGI_BTNS)		+= sgi_btns.o
 obj-$(CONFIG_INPUT_SPARCSPKR)		+= sparcspkr.o
 obj-$(CONFIG_INPUT_TWL4030_PWRBUTTON)	+= twl4030-pwrbutton.o
+obj-$(CONFIG_INPUT_TWL4030_VIBRA)	+= twl4030-vibra.o
 obj-$(CONFIG_INPUT_UINPUT)		+= uinput.o
 obj-$(CONFIG_INPUT_WINBOND_CIR)		+= winbond-cir.o
 obj-$(CONFIG_INPUT_WISTRON_BTNS)	+= wistron_btns.o

---------------------- drivers/input/misc/twl4030-vibra.c ----------------------
similarity index 97%
rename from drivers/hid/hid-twl4030-vibra.c
rename to drivers/input/misc/twl4030-vibra.c
index 1009dfb..4fa4c33 100644
@@ -1,11 +1,11 @@
 /*
- * hid-twl4030-vibra.c - TWL4030 Vibrator driver
+ * twl4030-vibra.c - TWL4030 Vibrator driver
  *
  * Copyright (C) 2008-2010 Nokia Corporation
  *
  * Written by Henrik Saari <henrik.saari@nokia.com>
  * Updates by Felipe Balbi <felipe.balbi@nokia.com>
- * HID by Jari Vanhala <ext-jari.vanhala@nokia.com>
+ * Input by Jari Vanhala <ext-jari.vanhala@nokia.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -29,8 +29,6 @@
 #include <linux/workqueue.h>
 #include <linux/i2c/twl.h>
 #include <linux/mfd/twl4030-codec.h>
-
-#include <linux/hid.h>
 #include <linux/input.h>
 
 /* MODULE ID2 */
@@ -287,6 +285,6 @@ module_exit(twl4030_vibra_exit);
 
 MODULE_ALIAS("platform:twl4030_codec_vibra");
 
-MODULE_DESCRIPTION("HID TWL4030 Vibra driver");
+MODULE_DESCRIPTION("TWL4030 Vibra driver");
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Nokia Corporation");

  reply	other threads:[~2010-02-18 12:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 12:22 [PATCH] HID: TWL4030: add HID Force Feedback vibra Jari Vanhala
2010-02-17 12:41 ` Jiri Kosina
2010-02-18 12:50   ` Jari Vanhala [this message]
2010-02-18 12:52     ` Jiri Kosina
2010-02-20  8:52     ` Dmitry Torokhov
2010-02-22  6:40 ` Dmitry Torokhov
2010-02-22 13:19   ` Jari Vanhala
2010-02-22 18:38     ` Dmitry Torokhov
2010-02-23  8:40       ` Jari Vanhala

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=1266497417.4787.2923.camel@tema \
    --to=ext-jari.vanhala@nokia.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).