firefly-linux-kernel-4.4.55.git
12 years agophonepad: add some depop functions.
宋秀杰 [Wed, 22 Aug 2012 11:11:12 +0000 (19:11 +0800)]
phonepad: add some depop functions.

12 years agocamera rk30 :fix bug in rk_camera_set_digit_zoom,must be reenabled after disable.
root [Wed, 22 Aug 2012 10:44:06 +0000 (18:44 +0800)]
camera rk30 :fix bug in rk_camera_set_digit_zoom,must be reenabled after disable.

12 years agocamera rk2928: add user define seriers
root [Wed, 22 Aug 2012 09:37:07 +0000 (17:37 +0800)]
camera rk2928: add user define seriers

12 years agodon't disable usb clock
yangkai [Wed, 22 Aug 2012 09:09:10 +0000 (17:09 +0800)]
don't disable usb clock

12 years agork2928:sdk: set hclk_otg0/1 parent to clk_hclk_usb_peri
chenxing [Wed, 22 Aug 2012 08:17:05 +0000 (16:17 +0800)]
rk2928:sdk: set hclk_otg0/1 parent to clk_hclk_usb_peri

12 years agork3066:fix early suspend DDR frequency from 100Mhz to 120Mhz
cym [Wed, 22 Aug 2012 08:11:12 +0000 (16:11 +0800)]
rk3066:fix early suspend DDR frequency from 100Mhz to 120Mhz

12 years agocamera rk30 : do crop by cif when digital zoom,fix bug of request_mem_region twice.
root [Wed, 22 Aug 2012 07:50:07 +0000 (15:50 +0800)]
camera rk30 : do crop by cif when digital zoom,fix bug of request_mem_region twice.

12 years agoamend size of bmp logo and zoom out display
ywj [Wed, 22 Aug 2012 04:44:13 +0000 (12:44 +0800)]
amend size of bmp logo and zoom out display

12 years agork2928: a720: camera(gc0308) support
kfx [Wed, 22 Aug 2012 04:36:23 +0000 (12:36 +0800)]
rk2928: a720: camera(gc0308) support

12 years ago resume ZQ1CR[0]
hcy [Wed, 22 Aug 2012 02:21:57 +0000 (10:21 +0800)]
  resume ZQ1CR[0]

12 years agork30: phonepad: defconfig: support android 4.1
黄涛 [Tue, 21 Aug 2012 12:17:26 +0000 (20:17 +0800)]
rk30: phonepad: defconfig: support android 4.1

12 years agork2928: a720: defconfig: support android 4.1
黄涛 [Tue, 21 Aug 2012 12:16:22 +0000 (20:16 +0800)]
rk2928: a720: defconfig: support android 4.1

12 years agork2928: sdk: defconfig: support android 4.1
黄涛 [Tue, 21 Aug 2012 12:16:09 +0000 (20:16 +0800)]
rk2928: sdk: defconfig: support android 4.1

12 years agoMerge remote-tracking branch 'origin/develop-3.0-jb' into develop-3.0
黄涛 [Tue, 21 Aug 2012 11:55:23 +0000 (19:55 +0800)]
Merge remote-tracking branch 'origin/develop-3.0-jb' into develop-3.0

12 years agosdmmc: In order to improve the timing,set HOLD_REG to 1,mainly used in RK2928 and...
xbw [Tue, 21 Aug 2012 10:17:08 +0000 (18:17 +0800)]
sdmmc: In order to improve the timing,set HOLD_REG to 1,mainly used in RK2928 and RK31.

12 years agork: add RK_USB_UART config
黄涛 [Tue, 21 Aug 2012 10:06:42 +0000 (18:06 +0800)]
rk: add RK_USB_UART config

12 years agoMerge remote-tracking branch 'aosp/android-3.0' into develop-3.0-jb
黄涛 [Tue, 21 Aug 2012 07:53:18 +0000 (15:53 +0800)]
Merge remote-tracking branch 'aosp/android-3.0' into develop-3.0-jb

Conflicts:
drivers/mmc/core/core.c
drivers/net/wireless/bcm4319/dhd_sdio.c
drivers/net/wireless/bcm4319/include/linux_osl.h
drivers/net/wireless/bcm4319/wl_iw.c
drivers/net/wireless/bcmdhd/dhd.h
drivers/net/wireless/bcmdhd/dhd_cfg80211.c
drivers/net/wireless/bcmdhd/dhd_linux.c
drivers/net/wireless/bcmdhd/include/wlioctl.h
drivers/net/wireless/bcmdhd/wl_cfg80211.c
drivers/net/wireless/bcmdhd/wldev_common.c
drivers/net/wireless/bcmdhd/wldev_common.h

12 years agoadd wakeup_key at vbus disconnect
yangkai [Tue, 21 Aug 2012 06:15:42 +0000 (14:15 +0800)]
add wakeup_key at vbus disconnect

12 years agoMerge remote-tracking branch 'origin/develop-3.0' into develop-3.0-jb
黄涛 [Tue, 21 Aug 2012 06:14:24 +0000 (14:14 +0800)]
Merge remote-tracking branch 'origin/develop-3.0' into develop-3.0-jb

Conflicts:
include/net/cfg80211.h

12 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0
yangkai [Tue, 21 Aug 2012 06:13:14 +0000 (14:13 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0

12 years agoMerge remote-tracking branch 'stable/linux-3.0.y' into develop-3.0-jb
黄涛 [Tue, 21 Aug 2012 05:11:48 +0000 (13:11 +0800)]
Merge remote-tracking branch 'stable/linux-3.0.y' into develop-3.0-jb

Conflicts:
Makefile
drivers/net/tun.c
drivers/net/wireless/rt2x00/rt61pci.c
drivers/usb/core/hub.c
sound/soc/codecs/wm8994.c

12 years agoRK2928 USB
wlf [Tue, 21 Aug 2012 04:41:07 +0000 (12:41 +0800)]
RK2928 USB

12 years agork2928:sdk and a720:support pmu sleep
张晴 [Tue, 21 Aug 2012 04:04:40 +0000 (12:04 +0800)]
rk2928:sdk and a720:support pmu sleep

12 years agologo: bmp: default n
黄涛 [Tue, 21 Aug 2012 03:57:29 +0000 (11:57 +0800)]
logo: bmp: default n

12 years agophonepad:add touch screen Kconfig again
lw [Tue, 21 Aug 2012 03:51:35 +0000 (11:51 +0800)]
phonepad:add touch screen Kconfig again

12 years agork30: rm the sram_printch(8)
许盛飞 [Tue, 21 Aug 2012 03:23:00 +0000 (11:23 +0800)]
rk30: rm the sram_printch(8)

12 years agoslove the bug -- support gpio3 and gpio4 interrupt wake up sysytem
许盛飞 [Tue, 21 Aug 2012 03:13:44 +0000 (11:13 +0800)]
slove the bug -- support gpio3 and gpio4 interrupt wake up sysytem

12 years agork2928: acodec: move audio codec platform device registration to board file to config...
Zheng Yang [Tue, 21 Aug 2012 01:50:46 +0000 (09:50 +0800)]
rk2928: acodec: move audio codec platform device registration to board file to configure speaker control pin.

12 years agork: usb_detect: mark board_usb_detect_init as __init, use irq_set_irq_type support...
黄涛 [Tue, 21 Aug 2012 01:36:17 +0000 (09:36 +0800)]
rk: usb_detect: mark board_usb_detect_init as __init, use irq_set_irq_type support both edge trigger

12 years agork2928: usb_detect: mark bvalid_init as __init, clear bvalid irq when init
黄涛 [Tue, 21 Aug 2012 01:08:32 +0000 (09:08 +0800)]
rk2928: usb_detect: mark bvalid_init as __init, clear bvalid irq when init

12 years agoARM: disable preemption in machine_shutdown
Mike J. Chen [Thu, 24 May 2012 22:12:36 +0000 (15:12 -0700)]
ARM: disable preemption in machine_shutdown

Since the smp call to stop the other cpus are handled in those
cpus in interrupt context, there's a potential for those smp
handlers to interrupt threads holding spin locks (such as the
one a mutex holds).  This prevents those threads from ever
releasing their spin lock, so if the cpu doing the shutdown
is allowed to switch to another thread that tries to grab the
same lock/mutex, we could get into a deadlock (the spin lock
call is called with preemption disabled in the mutex lock code).

To avoid that possibility, disable preemption before doing the
smp_send_stop().

Change-Id: I7976c5382d7173fcb3cd14da8cc5083d442b2544
Signed-off-by: Mike J. Chen <mjchen@google.com>
12 years agophonepad: make rt3261 incall volume control work.
宋秀杰 [Mon, 20 Aug 2012 14:35:49 +0000 (22:35 +0800)]
phonepad: make rt3261 incall volume control work.

12 years agork2928: pm: fix unable to suspend bug
黄涛 [Mon, 20 Aug 2012 12:53:41 +0000 (20:53 +0800)]
rk2928: pm: fix unable to suspend bug

12 years agork2928: usb_detect: support bvalid irq wake up system
黄涛 [Mon, 20 Aug 2012 12:52:44 +0000 (20:52 +0800)]
rk2928: usb_detect: support bvalid irq wake up system

12 years agork2928:sdk: default disable gpio clk
chenxing [Mon, 20 Aug 2012 12:31:16 +0000 (20:31 +0800)]
rk2928:sdk: default disable gpio clk

12 years agork2928:sdk: rename gpio(i)
chenxing [Mon, 20 Aug 2012 12:27:32 +0000 (20:27 +0800)]
rk2928:sdk: rename gpio(i)

12 years agork2928:sdk: disable unused clocks
chenxing [Mon, 20 Aug 2012 12:19:06 +0000 (20:19 +0800)]
rk2928:sdk: disable unused clocks

12 years agork2928:a720: setup frequency 600M for a720
chenxing [Mon, 20 Aug 2012 12:14:33 +0000 (20:14 +0800)]
rk2928:a720: setup frequency 600M for a720

12 years agork2928 codec: add speaker control.
Zheng Yang [Mon, 20 Aug 2012 10:40:47 +0000 (18:40 +0800)]
rk2928 codec: add speaker control.

12 years ago fix DLL off bug, fix ZQCR[1] bug, add to support change BL, add dsb()
hcy [Mon, 20 Aug 2012 09:58:39 +0000 (17:58 +0800)]
  fix DLL off bug, fix ZQCR[1] bug, add to support change BL, add dsb()

12 years agosdmmc: some card, SDHC 32G Class10, maybe miss the nobusy_INT. so close the nobusy_IN...
xbw [Mon, 20 Aug 2012 09:16:05 +0000 (17:16 +0800)]
sdmmc: some card, SDHC 32G Class10, maybe miss the nobusy_INT. so close the nobusy_INT function

12 years agocamera rk30: add scale by arm,rga and pp.
root [Mon, 20 Aug 2012 08:18:30 +0000 (16:18 +0800)]
camera rk30: add scale by arm,rga and pp.

12 years agoadd rtl8188eu to rkwifi_sys_iface.c
gwl [Mon, 20 Aug 2012 06:50:02 +0000 (14:50 +0800)]
add rtl8188eu to rkwifi_sys_iface.c

12 years agork2928:sdk: codec pll for sclk_lcdc only, aclk_vio_pre need yxj fixed, move other...
chenxing [Mon, 20 Aug 2012 06:22:55 +0000 (14:22 +0800)]
rk2928:sdk: codec pll for sclk_lcdc only, aclk_vio_pre need yxj fixed, move other clks to general pll

12 years agork2928: a720: touchscren && camera && sdmmc && usb wifi support
kfx [Mon, 20 Aug 2012 05:16:32 +0000 (13:16 +0800)]
rk2928: a720: touchscren && camera && sdmmc && usb wifi support

12 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0
ywj [Mon, 20 Aug 2012 03:46:25 +0000 (11:46 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0

12 years agoremove bmp_logo option and del rk29_backlight.c printklog
ywj [Mon, 20 Aug 2012 03:40:56 +0000 (11:40 +0800)]
remove bmp_logo option and del rk29_backlight.c printklog

12 years agoamend DEVICE_ATTR 0660 of rk29_keys and rk29_backlight factorytool
ywj [Mon, 20 Aug 2012 03:29:51 +0000 (11:29 +0800)]
amend DEVICE_ATTR 0660 of rk29_keys and rk29_backlight factorytool

12 years agork2928 hdmi: remove unnecessary files and update low power mode
yzq [Mon, 20 Aug 2012 02:29:14 +0000 (10:29 +0800)]
rk2928 hdmi: remove unnecessary files and update low power mode

12 years agork30 hdmi: Modify Kconfig to support hdcp.
Zheng Yang [Mon, 20 Aug 2012 01:18:06 +0000 (09:18 +0800)]
rk30 hdmi: Modify Kconfig to support hdcp.

12 years agosensor:mask some debug information
lw [Sun, 19 Aug 2012 11:48:54 +0000 (19:48 +0800)]
sensor:mask some debug information

12 years agosensor:add setting gsensor orientation online support
lw@rock-chips.com [Sun, 19 Aug 2012 11:39:42 +0000 (19:39 +0800)]
sensor:add setting gsensor orientation online support

12 years agork2928: a720: cpufreq(1G) && pmic sleep io && backlight && gsensor
kfx [Sun, 19 Aug 2012 11:11:31 +0000 (19:11 +0800)]
rk2928: a720: cpufreq(1G) && pmic sleep io && backlight && gsensor

12 years agork2928 a720:add mma7660 support
lw [Sun, 19 Aug 2012 10:27:06 +0000 (18:27 +0800)]
rk2928 a720:add mma7660 support

12 years agosensor:add gsensor mma7660 support
lw [Sun, 19 Aug 2012 10:17:03 +0000 (18:17 +0800)]
sensor:add gsensor mma7660 support

12 years agork2928:a720: fix vdd_log dvfs error
chenxing [Sun, 19 Aug 2012 07:57:41 +0000 (15:57 +0800)]
rk2928:a720: fix vdd_log dvfs error

12 years agork2928: a720 init
kfx [Sun, 19 Aug 2012 07:18:44 +0000 (15:18 +0800)]
rk2928: a720 init

12 years agoRevert "add usb wifi rtl8188eus support."
黄涛 [Fri, 17 Aug 2012 14:59:47 +0000 (22:59 +0800)]
Revert "add usb wifi rtl8188eus support."

This reverts commit 1c9e9080691b9ce4f7e8c42643fa026bb020c596.

Conflicts:

drivers/net/wireless/Kconfig
drivers/net/wireless/Makefile
drivers/net/wireless/wifi_sys/rkwifi_sys_iface.c

12 years agork2928: sdk: defconfig: disable bmp logo
黄涛 [Fri, 17 Aug 2012 14:40:12 +0000 (22:40 +0800)]
rk2928: sdk: defconfig: disable bmp logo

12 years agork2928: devices.c: add dummy i2c check idle
黄涛 [Fri, 17 Aug 2012 14:37:19 +0000 (22:37 +0800)]
rk2928: devices.c: add dummy i2c check idle

12 years agork30: sdk: board-rk30-sdk.c include board-rk30-sdk-camera.c and board-rk30-sdk-key.c
黄涛 [Fri, 17 Aug 2012 14:16:19 +0000 (22:16 +0800)]
rk30: sdk: board-rk30-sdk.c include board-rk30-sdk-camera.c and board-rk30-sdk-key.c

12 years agork30: phonepad: fix gcc warning, "CONFIG_RK30_PWM_REGULATOR" is not defined
黄涛 [Fri, 17 Aug 2012 14:08:40 +0000 (22:08 +0800)]
rk30: phonepad: fix gcc warning, "CONFIG_RK30_PWM_REGULATOR" is not defined

12 years agork30: sdk: fix gcc warning, "CONFIG_RK30_PWM_REGULATOR" is not defined
黄涛 [Fri, 17 Aug 2012 14:08:24 +0000 (22:08 +0800)]
rk30: sdk: fix gcc warning, "CONFIG_RK30_PWM_REGULATOR" is not defined

12 years agork2928: sdk: fix gcc warning, "CONFIG_RK30_PWM_REGULATOR" is not defined
黄涛 [Fri, 17 Aug 2012 14:08:08 +0000 (22:08 +0800)]
rk2928: sdk: fix gcc warning, "CONFIG_RK30_PWM_REGULATOR" is not defined

12 years agoMerge remote-tracking branch 'origin/develop-3.0-rk2928' into develop-3.0
黄涛 [Fri, 17 Aug 2012 13:48:20 +0000 (21:48 +0800)]
Merge remote-tracking branch 'origin/develop-3.0-rk2928' into develop-3.0

Conflicts:
arch/arm/mach-rk30/include/mach/rk30_camera.h
arch/arm/plat-rk/include/plat/rk_camera.h
drivers/gpio/gpio-tps65910.c
drivers/media/video/rk30_camera_oneframe.c
drivers/mmc/host/rk29_sdmmc.c
drivers/net/wireless/Kconfig
drivers/net/wireless/Makefile
drivers/net/wireless/wifi_sys/rkwifi_sys_iface.c
drivers/regulator/rk30-pwm-regulator.c
drivers/usb/dwc_otg/dwc_otg_driver.c
drivers/usb/dwc_otg/dwc_otg_hcd.c
drivers/usb/dwc_otg/dwc_otg_pcd.c
sound/soc/codecs/Makefile
sound/soc/rk29/Kconfig

12 years agogitignore: ignore scripts/bmptologo
黄涛 [Fri, 17 Aug 2012 11:20:47 +0000 (19:20 +0800)]
gitignore: ignore scripts/bmptologo

12 years agobmptologo: fix gcc warning
黄涛 [Fri, 17 Aug 2012 11:17:19 +0000 (19:17 +0800)]
bmptologo: fix gcc warning

12 years agogsensor code result in system reboot,gsensor code by lw update
ywj [Fri, 17 Aug 2012 10:20:55 +0000 (18:20 +0800)]
gsensor code result in system reboot,gsensor code by lw update

12 years agocamera : support arm and rga to do digital zoom.
zyc [Fri, 17 Aug 2012 10:01:02 +0000 (18:01 +0800)]
camera : support arm and rga to do digital zoom.

12 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0
ywj [Fri, 17 Aug 2012 09:58:04 +0000 (17:58 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0

12 years agoadd bmp photo for factory and del fb test log
ywj [Fri, 17 Aug 2012 09:57:15 +0000 (17:57 +0800)]
add bmp photo for factory and del fb test log

12 years agomerge rk2928 usb
yangkai [Fri, 17 Aug 2012 08:20:17 +0000 (16:20 +0800)]
merge rk2928 usb

12 years agoMerge branch 'develop-3.0-rk2928' of ssh://10.10.10.29/rk/kernel into develop-3.0...
gwl [Fri, 17 Aug 2012 07:10:51 +0000 (15:10 +0800)]
Merge branch 'develop-3.0-rk2928' of ssh://10.10.10.29/rk/kernel into develop-3.0-rk2928

12 years agoadd usb wifi rtl8188eus support.
gwl [Fri, 17 Aug 2012 07:10:37 +0000 (15:10 +0800)]
add usb wifi rtl8188eus support.

12 years agork2929 acodec: for internal audio codec, mclk = 64*bclk = 256*lrclk.
Zheng Yang [Fri, 17 Aug 2012 06:33:23 +0000 (14:33 +0800)]
rk2929 acodec: for internal audio codec, mclk = 64*bclk = 256*lrclk.

12 years agork30:sdk:support wm8326 early suspend and modify dcdc or ldo mode when in early suspend
张晴 [Fri, 17 Aug 2012 06:30:45 +0000 (14:30 +0800)]
rk30:sdk:support wm8326 early suspend and modify dcdc or ldo mode when in early suspend

12 years agocamera rk29: add support zoom by arm, version update to v0.x.11
ddl [Fri, 17 Aug 2012 04:24:33 +0000 (12:24 +0800)]
camera rk29: add support zoom by arm, version update to v0.x.11

12 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0
ywj [Fri, 17 Aug 2012 03:33:49 +0000 (11:33 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0

12 years agoamend DEVICE_ATTR of rk30_factory_adc_battery for cts
ywj [Fri, 17 Aug 2012 03:32:40 +0000 (11:32 +0800)]
amend  DEVICE_ATTR of rk30_factory_adc_battery for cts

12 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0
xbw [Fri, 17 Aug 2012 02:49:46 +0000 (10:49 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0

12 years agosdmmc: prepare for RK2918 and RK31
xbw [Fri, 17 Aug 2012 02:49:17 +0000 (10:49 +0800)]
sdmmc: prepare for RK2918 and RK31

12 years agocamera : fix conflict when merge to rk30
zyc [Fri, 17 Aug 2012 02:31:42 +0000 (10:31 +0800)]
camera : fix conflict when merge to rk30

12 years agocamera rk30 : fix conflict when merge 2928
root [Fri, 17 Aug 2012 02:25:57 +0000 (10:25 +0800)]
camera rk30 : fix conflict when merge 2928

12 years agoMerge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0
ywj [Fri, 17 Aug 2012 02:03:12 +0000 (10:03 +0800)]
Merge branch 'develop-3.0' of ssh://10.10.10.29/rk/kernel into develop-3.0

12 years agoUSB: gadget: f_audio_source: Fix compilation error
Mike Lockwood [Thu, 16 Aug 2012 20:13:20 +0000 (13:13 -0700)]
USB: gadget: f_audio_source: Fix compilation error

Change-Id: I1b785c47bda03208d396473a9d1c94631f5624d9
Signed-off-by: Mike Lockwood <lockwood@google.com>
12 years agoUSB: gadget: f_audio_source: Fix use after free in audio_unbind
Mike Lockwood [Thu, 16 Aug 2012 02:58:28 +0000 (19:58 -0700)]
USB: gadget: f_audio_source: Fix use after free in audio_unbind

When USB was disconnected, we were freeing our audio_dev struct in audio_unbind
before the audio system had cleaned up, resulting in a hang in audio_pcm_close.
We now statically allocate the audio_dev struct to avoid this problem.

Change-Id: I58ad21eaa20dcf4aa74ee614ef3b6ed2c91d52a1
Signed-off-by: Mike Lockwood <lockwood@google.com>
12 years agoHID: uhid: Fix sending events with invalid data
Vinicius Costa Gomes [Sat, 14 Jul 2012 21:59:25 +0000 (18:59 -0300)]
HID: uhid: Fix sending events with invalid data

This was detected because events with invalid types were arriving
to userspace.

The code before this patch would only work for the first event in the
queue (when uhid->tail is 0).

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Reviewed-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: silence gcc warning
Jiri Kosina [Mon, 18 Jun 2012 15:08:08 +0000 (17:08 +0200)]
HID: uhid: silence gcc warning

gcc is giving me:

drivers/hid/uhid.c: In function ‘uhid_hid_get_raw’:
drivers/hid/uhid.c:157: warning: ‘len’ may be used uninitialized in this function

which is clearly bogus, as

- when used as memcpy() argument, it's initialized properly
- the code is structured in a way that either 'ret' or 'len'
  is always initialized, so the return statement always has
  an initialized value.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoMAINTAINERS: add UHID entry
David Herrmann [Sun, 10 Jun 2012 13:16:28 +0000 (15:16 +0200)]
MAINTAINERS: add UHID entry

Add an UHID entry to the MAINTAINERS file.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: add example program
David Herrmann [Sun, 10 Jun 2012 13:16:27 +0000 (15:16 +0200)]
HID: uhid: add example program

This adds an example user-space program that emulates a 3 button mouse
with wheel. It detects keyboard presses and moves the mouse accordingly.

It register a fake HID device to feed the raw HID reports into the kernel.
In this example, you could use uinput to get the same result, but this
shows how to get the same behavior with uhid so you don't need HID parsers
in user-space.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: add documentation
David Herrmann [Sun, 10 Jun 2012 13:16:26 +0000 (15:16 +0200)]
HID: uhid: add documentation

This describes the protocol used by uhid for user-space applications. It
describes the details like non-blocking I/O and readv/writev for multiple
events per syscall.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: implement feature requests
David Herrmann [Sun, 10 Jun 2012 13:16:25 +0000 (15:16 +0200)]
HID: uhid: implement feature requests

HID standard allows sending a feature request to the device which is
answered by an HID report. uhid implements this by sending a UHID_FEATURE
event to user-space which then must answer with UHID_FEATURE_ANSWER. If it
doesn't do this in a timely manner, the request is discarded silently.

We serialize the feature requests, that is, there is always only a single
active feature-request sent to user-space, other requests have to wait.
HIDP and USB-HID do it the same way.

Because we discard feature-requests silently, we must make sure to match
a response to the corresponding request. We use sequence-IDs for this so
user-space must copy the ID from the request into the answer.
Feature-answers are ignored if they do not contain the same ID as the
currently pending feature request.

Internally, we must make sure that feature-requests are synchronized with
UHID_DESTROY and close() events. We must not dead-lock when closing the
HID device, either, so we have to use separate locks.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: forward raw output reports to user-space
David Herrmann [Sun, 10 Jun 2012 13:16:24 +0000 (15:16 +0200)]
HID: uhid: forward raw output reports to user-space

Some drivers that use non-standard HID features require raw output reports
sent to the device. We now forward these requests directly to user-space
so the transport-level driver can correctly send it to the device or
handle it correspondingly.

There is no way to signal back whether the transmission was successful,
moreover, there might be lots of messages coming out from the driver
flushing the output-queue. However, there is currently no driver that
causes this so we are safe. If some drivers need to transmit lots of data
this way, we need a method to synchronize this and can implement another
UHID_OUTPUT_SYNC event.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: forward output request to user-space
David Herrmann [Sun, 10 Jun 2012 13:16:23 +0000 (15:16 +0200)]
HID: uhid: forward output request to user-space

If the hid-driver wants to send standardized data to the device it uses a
linux input_event. We forward this to the user-space transport-level
driver so they can perform the requested action on the device.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: forward open/close events to user-space
David Herrmann [Sun, 10 Jun 2012 13:16:22 +0000 (15:16 +0200)]
HID: uhid: forward open/close events to user-space

HID core notifies us with *_open/*_close callbacks when there is an actual
user of our device. We forward these to user-space so they can react on
this. This allows user-space to skip I/O unless they receive an OPEN
event. When they receive a CLOSE event they can stop I/O again to save
energy.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: add UHID_START and UHID_STOP events
David Herrmann [Sun, 10 Jun 2012 13:16:21 +0000 (15:16 +0200)]
HID: uhid: add UHID_START and UHID_STOP events

We send UHID_START and UHID_STOP events to user-space when the HID core
starts/stops the device. This notifies user-space about driver readiness
and data-I/O can start now.

This directly forwards the callbacks from hid-core to user-space.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: forward hid report-descriptor to hid core
David Herrmann [Sun, 10 Jun 2012 13:16:20 +0000 (15:16 +0200)]
HID: uhid: forward hid report-descriptor to hid core

When the uhid_hid_parse callback is called we simply forward it to
hid_parse_report() with the data that we got in the UHID_CREATE event.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: allow feeding input data into uhid devices
David Herrmann [Sun, 10 Jun 2012 13:16:19 +0000 (15:16 +0200)]
HID: uhid: allow feeding input data into uhid devices

This adds a new event type UHID_INPUT which allows user-space to feed raw
HID reports into the HID subsystem. We copy the data into kernel memory
and directly feed it into the HID core.

There is no error handling of the events couldn't be parsed so user-space
should consider all events successfull unless read() returns an error.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: add UHID_CREATE and UHID_DESTROY events
David Herrmann [Sun, 10 Jun 2012 13:16:18 +0000 (15:16 +0200)]
HID: uhid: add UHID_CREATE and UHID_DESTROY events

UHID_CREATE and UHID_DESTROY are used to create and destroy a device on an
open uhid char-device. Internally, we allocate and register an HID device
with the HID core and immediately start the device. From now on events may
be received or sent to the device.

The UHID_CREATE event has a payload similar to the data used by
Bluetooth-HIDP when creating a new connection.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
12 years agoHID: uhid: implement write() on uhid devices
David Herrmann [Sun, 10 Jun 2012 13:16:17 +0000 (15:16 +0200)]
HID: uhid: implement write() on uhid devices

Similar to read() you can only write() a single event with one call to an
uhid device. To write multiple events use writev() which is supported by
uhid.

We currently always return -EOPNOTSUPP but other events will be added in
later patches.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>