kernel-ark/drivers/hid
Antonio Borneo beb9d007a8 HID: cp2112: fix gpio value in gpio_direction_output
CP2112 does not offer an atomic method to set both gpio
direction and value.
Also it does not permit to set gpio value before putting
gpio in output. In fact, accordingly to Silicon Labs
AN495, Rev. 0.2, cpt. 4.4, the HID report to set gpio
values "does not affect any pins that are not configured
as outputs".

This is confirmed on evaluation board CP2112-EK.
With current driver, after execute:
	echo in > /sys/class/gpio/gpio248/direction
	echo low > /sys/class/gpio/gpio248/direction
gpio output is still high. Only after a following
	echo low > /sys/class/gpio/gpio248/direction
gpio output gets low.

Fix driver by changing order of operations; first set
direction then set value.

The drawback of this new sequence is that we can have
a pulse on gpio pin when direction is changed from
input to output-low, but this cannot be avoided on
current CP2112.

Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-07-07 17:07:27 +02:00
..
i2c-hid HID: i2c-hid: hid report descriptor retrieval changes 2014-05-13 11:19:22 +02:00
usbhid Merge branches 'for-3.15/upstream-fixes' and 'for-3.16/upstream' into for-linus 2014-06-04 13:09:01 +02:00
hid-a4tech.c
hid-apple.c HID: apple: add Apple wireless keyboard 2011 JIS model support 2014-02-06 14:35:18 +01:00
hid-appleir.c HID: appleir: force input to be set 2013-11-21 09:58:19 +01:00
hid-aureal.c
hid-axff.c HID: enable Mayflash USB Gamecube Adapter 2013-11-12 19:06:23 +01:00
hid-belkin.c
hid-cherry.c
hid-chicony.c
hid-core.c Merge branches 'for-3.16/i2c-hid', 'for-3.16/rmi4', 'for-3.16/sony' and 'for-3.16/thingm' into for-linus 2014-06-04 13:09:43 +02:00
hid-cp2112.c HID: cp2112: fix gpio value in gpio_direction_output 2014-07-07 17:07:27 +02:00
hid-cypress.c
hid-debug.c HID: core: add two new usages for digitizer 2014-06-03 13:27:24 +02:00
hid-dr.c
hid-elecom.c
hid-elo.c HID: hid-elo: some systems cannot stomach work around 2013-09-25 11:28:50 +02:00
hid-emsff.c
hid-ezkey.c
hid-gaff.c
hid-generic.c
hid-gyration.c
hid-holtek-kbd.c
hid-holtek-mouse.c HID: hid-holtek-mouse: add new a070 mouse 2014-01-16 22:58:43 +01:00
hid-holtekff.c
hid-huion.c
hid-hyperv.c Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-linus 2014-04-01 19:05:09 +02:00
hid-icade.c
hid-ids.h Merge branches 'for-3.15/upstream-fixes' and 'for-3.16/upstream' into for-linus 2014-06-04 13:09:01 +02:00
hid-input.c HID: core: add two new usages for digitizer 2014-06-03 13:27:24 +02:00
hid-kensington.c
hid-keytouch.c
hid-kye.c HID: kye: Fix missing break in kye_report_fixup() 2013-12-02 15:17:04 +01:00
hid-lcpower.c
hid-lenovo-tpkbd.c HID: lenovo-tpkbd: remove usb dependency 2013-09-24 11:47:47 +02:00
hid-lg2ff.c HID: logitech - lg2ff: Add IDs for Formula Vibration Feedback Wheel 2013-10-09 12:06:02 +02:00
hid-lg3ff.c
hid-lg4ff.c HID: hid-lg4ff: Support new version of G27 2014-03-14 15:43:34 +01:00
hid-lg.c HID: replace hid_output_raw_report with hid_hw_raw_request for feature requests 2014-02-17 14:56:50 +01:00
hid-lg.h
hid-lgff.c
hid-logitech-dj.c HID: logitech-dj: remove hid_output_raw_report call 2014-02-17 14:55:52 +01:00
hid-logitech-dj.h
hid-magicmouse.c HID: replace hid_output_raw_report with hid_hw_raw_request for feature requests 2014-02-17 14:56:50 +01:00
hid-microsoft.c Revert "HID: microsoft: Add ID's for Surface Type/Touch Cover 2" 2014-04-07 09:54:43 +02:00
hid-monterey.c
hid-multitouch.c HID: multitouch: add support of EliteGroup 05D8 panels 2014-04-24 11:45:56 +02:00
hid-ntrig.c
hid-ortek.c
hid-petalynx.c
hid-picolcd_backlight.c
hid-picolcd_cir.c [media] rc: abstract access to allowed/enabled protocols 2014-03-11 13:24:39 -03:00
hid-picolcd_core.c
hid-picolcd_debugfs.c
hid-picolcd_fb.c
hid-picolcd_lcd.c
hid-picolcd_leds.c
hid-picolcd.h
hid-pl.c
hid-primax.c
hid-prodikeys.c HID: prodikeys: Convert to snd_card_new() with a device pointer 2014-02-14 08:14:09 +01:00
hid-rmi.c HID: rmi: do not handle touchscreens through hid-rmi 2014-05-22 11:11:46 +02:00
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c HID: roccat: generalize some common code 2013-10-30 14:17:31 +01:00
hid-roccat-common.h HID: roccat: generalize some common code 2013-10-30 14:17:31 +01:00
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c HID: roccat: Fix "cannot create duplicate filename" problems 2013-09-30 10:51:31 +02:00
hid-roccat-kone.h
hid-roccat-koneplus.c HID: roccat: Fix "cannot create duplicate filename" problems 2013-09-30 10:51:31 +02:00
hid-roccat-koneplus.h
hid-roccat-konepure.c HID: roccat: generalize some common code 2013-10-30 14:17:31 +01:00
hid-roccat-kovaplus.c HID: roccat: fix Coverity CID 141438 2013-11-04 10:55:20 +01:00
hid-roccat-kovaplus.h
hid-roccat-lua.c
hid-roccat-lua.h
hid-roccat-pyra.c HID: roccat: Fix "cannot create duplicate filename" problems 2013-09-30 10:51:31 +02:00
hid-roccat-pyra.h
hid-roccat-ryos.c HID: roccat: add support for Ryos MK keyboards 2013-10-30 14:17:31 +01:00
hid-roccat-savu.c HID: roccat: generalize some common code 2013-10-30 14:17:31 +01:00
hid-roccat-savu.h HID: roccat: generalize some common code 2013-10-30 14:17:31 +01:00
hid-roccat.c
hid-saitek.c HID: quirk for Saitek RAT7 and MMO7 mices' mode button 2014-05-20 21:28:42 +02:00
hid-samsung.c
hid-sensor-hub.c Merge branches 'for-3.15/upstream-fixes' and 'for-3.16/upstream' into for-linus 2014-06-04 13:09:01 +02:00
hid-sjoy.c
hid-sony.c HID: hid-sony - allow 3rd party INTEC controller to turn off all leds 2014-04-24 18:53:42 +02:00
hid-speedlink.c
hid-steelseries.c
hid-sunplus.c
hid-thingm.c HID: thingm: thingm_fwinfo[] doesn't need to be global 2014-06-03 13:29:38 +02:00
hid-tivo.c
hid-tmff.c
hid-topseed.c
hid-twinhan.c
hid-uclogic.c
hid-wacom.c HID: replace hid_output_raw_report with hid_hw_raw_request for feature requests 2014-02-17 14:56:50 +01:00
hid-waltop.c
hid-wiimote-core.c HID: wiimote: replace hid_output_raw_report with hid_hw_output_report for output requests 2014-02-17 14:57:17 +01:00
hid-wiimote-debug.c
hid-wiimote-modules.c HID: wiimote: add pro-controller analog stick calibration 2013-10-30 14:13:29 +01:00
hid-wiimote.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2013-11-15 16:48:22 -08:00
hid-xinmo.c
hid-zpff.c
hid-zydacron.c
hidraw.c Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-linus 2014-04-01 19:05:09 +02:00
Kconfig Merge branches 'for-3.16/i2c-hid', 'for-3.16/rmi4', 'for-3.16/sony' and 'for-3.16/thingm' into for-linus 2014-06-04 13:09:43 +02:00
Makefile HID: rmi: introduce RMI driver for Synaptics touchpads 2014-04-09 15:34:59 +02:00
uhid.c HID: uhid: Use kmemdup instead of kmalloc + memcpy 2014-05-27 00:41:05 +02:00