F: drivers/net/appletalk/
F: net/appletalk/
+ + + +APPLIED MICRO (APM) X-GENE DEVICE TREE SUPPORT
+ + + +M: Duc Dang <dhdang@apm.com>
+ + + +S: Supported
+ + + +F: arch/arm64/boot/dts/apm/
+ + + +
APPLIED MICRO (APM) X-GENE SOC ETHERNET DRIVER
M: Iyappan Subramanian <isubramanian@apm.com>
M: Keyur Chudgar <kchudgar@apm.com>
S: Maintained
F: arch/arm/mach-alpine/
- - - -ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES
+ + + +ARM/ATMEL AT91RM9200, AT91SAM9 AND SAMA5 SOC SUPPORT
M: Nicolas Ferre <nicolas.ferre@atmel.com>
M: Alexandre Belloni <alexandre.belloni@free-electrons.com>
M: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
M: Joachim Eastwood <manabian@gmail.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
+ + + +F: arch/arm/boot/dts/lpc43*
+ + + +F: drivers/clk/nxp/clk-lpc18xx*
+ + + +F: drivers/clocksource/time-lpc32xx.c
+ + + +F: drivers/i2c/busses/i2c-lpc2k.c
+ + + +F: drivers/memory/pl172.c
+ + + +F: drivers/mtd/spi-nor/nxp-spifi.c
+ + + +F: drivers/rtc/rtc-lpc24xx.c
N: lpc18xx
ARM/MAGICIAN MACHINE SUPPORT
F: drivers/*/*/*s3c2410*
F: drivers/spi/spi-s3c*
F: sound/soc/samsung/*
+ + + +F: Documentation/arm/Samsung/
+ + + +F: Documentation/devicetree/bindings/arm/samsung/
+ + + +F: Documentation/devicetree/bindings/sram/samsung-sram.txt
+ + + +F: Documentation/devicetree/bindings/power/pd-samsung.txt
N: exynos
ARM/SAMSUNG MOBILE MACHINE SUPPORT
F: arch/arm/boot/dts/r7s*
F: arch/arm/boot/dts/r8a*
F: arch/arm/boot/dts/sh*
- - - -F: arch/arm/configs/bockw_defconfig
- - - -F: arch/arm/configs/marzen_defconfig
F: arch/arm/configs/shmobile_defconfig
F: arch/arm/include/debug/renesas-scif.S
F: arch/arm/mach-shmobile/
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: arch/arm/boot/dts/uniphier*
+ + + +F: arch/arm/include/asm/hardware/cache-uniphier.h
F: arch/arm/mach-uniphier/
+ + + +F: arch/arm/mm/cache-uniphier.c
+ + + +F: drivers/i2c/busses/i2c-uniphier*
F: drivers/pinctrl/uniphier/
F: drivers/tty/serial/8250/8250_uniphier.c
N: uniphier
F: drivers/i2c/busses/i2c-at91.c
ATMEL ISI DRIVER
- ------ -M: Josh Wu <josh.wu@atmel.com>
+ ++++++ +M: Ludovic Desroches <ludovic.desroches@atmel.com>
L: linux-media@vger.kernel.org
S: Supported
F: drivers/media/platform/soc_camera/atmel-isi.c
F: drivers/net/ethernet/cadence/
ATMEL NAND DRIVER
- ------ -M: Josh Wu <josh.wu@atmel.com>
+ ++++++ +M: Wenyou Yang <wenyou.yang@atmel.com>
+ ++++++ +M: Josh Wu <rainyfeeling@outlook.com>
L: linux-mtd@lists.infradead.org
S: Supported
F: drivers/mtd/nand/atmel_nand*
BLOCK LAYER
M: Jens Axboe <axboe@kernel.dk>
+ + + +L: linux-block@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
S: Maintained
F: block/
S: Supported
F: drivers/scsi/bnx2i/
- - - -BROADCOM CYGNUS/IPROC ARM ARCHITECTURE
+ + + +BROADCOM IPROC ARM ARCHITECTURE
M: Ray Jui <rjui@broadcom.com>
M: Scott Branden <sbranden@broadcom.com>
+ + + +M: Jon Mason <jonmason@broadcom.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: bcm-kernel-feedback-list@broadcom.com
T: git git://github.com/broadcom/cygnus-linux.git
S: Maintained
N: iproc
N: cygnus
+ + + +N: nsp
N: bcm9113*
N: bcm9583*
- - - -N: bcm583*
+ + + +N: bcm9585*
+ + + +N: bcm9586*
+ + + +N: bcm988312
N: bcm113*
+ + + +N: bcm583*
+ + + +N: bcm585*
+ + + +N: bcm586*
+ + + +N: bcm88312
BROADCOM BRCMSTB GPIO DRIVER
M: Gregory Fong <gregory.0xf0@gmail.com>
BROADCOM STB NAND FLASH DRIVER
M: Brian Norris <computersforpeace@gmail.com>
+ ++++++ +M: Kamal Dasu <kdasu.kdev@gmail.com>
L: linux-mtd@lists.infradead.org
+ ++++++ +L: bcm-kernel-feedback-list@broadcom.com
S: Maintained
F: drivers/mtd/nand/brcmnand/
CACHEFILES: FS-CACHE BACKEND FOR CACHING ON MOUNTED FILESYSTEMS
M: David Howells <dhowells@redhat.com>
- - - -L: linux-cachefs@redhat.com
+ + + +L: linux-cachefs@redhat.com (moderated for non-subscribers)
S: Supported
F: Documentation/filesystems/caching/cachefiles.txt
F: fs/cachefiles/
F: drivers/net/ethernet/cisco/enic/
CISCO VIC LOW LATENCY NIC DRIVER
- - - -M: Upinder Malhi <umalhi@cisco.com>
+ + + +M: Christian Benvenuti <benve@cisco.com>
+ + + +M: Dave Goodell <dgoodell@cisco.com>
S: Supported
- - - -F: drivers/infiniband/hw/usnic
+ + + +F: drivers/infiniband/hw/usnic/
CIRRUS LOGIC EP93XX ETHERNET DRIVER
M: Hartley Sweeten <hsweeten@visionengravers.com>
F: drivers/platform/x86/compal-laptop.c
CONEXANT ACCESSRUNNER USB DRIVER
- ------ -M: Simon Arlott <cxacru@fire.lp0.eu>
L: accessrunner-general@lists.sourceforge.net
W: http://accessrunner.sourceforge.net/
- ------ -S: Maintained
+ ++++++ +S: Orphan
F: drivers/usb/atm/cxacru.c
CONFIGFS
M: Jani Nikula <jani.nikula@linux.intel.com>
L: intel-gfx@lists.freedesktop.org
L: dri-devel@lists.freedesktop.org
+ + + +W: https://01.org/linuxgraphics/
Q: http://patchwork.freedesktop.org/project/intel-gfx/
T: git git://anongit.freedesktop.org/drm-intel
S: Supported
L: dri-devel@lists.freedesktop.org
S: Maintained
F: drivers/gpu/drm/imx/
+ + + +F: drivers/gpu/ipu-v3/
F: Documentation/devicetree/bindings/display/imx/
DRM DRIVERS FOR GMA500 (Poulsbo, Moorestown and derivative chipsets)
T: git git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon.git
S: Maintained
F: drivers/extcon/
+ + + +F: include/linux/extcon/
+ + + +F: include/linux/extcon.h
F: Documentation/extcon/
+ + + +F: Documentation/devicetree/bindings/extcon/
EXYNOS DP DRIVER
M: Jingoo Han <jingoohan1@gmail.com>
FPGA MANAGER FRAMEWORK
M: Alan Tull <atull@opensource.altera.com>
+ ++++++ +R: Moritz Fischer <moritz.fischer@ettus.com>
S: Maintained
F: drivers/fpga/
F: include/linux/fpga/fpga-mgr.h
FS-CACHE: LOCAL CACHING FOR NETWORK FILESYSTEMS
M: David Howells <dhowells@redhat.com>
- - - -L: linux-cachefs@redhat.com
+ + + +L: linux-cachefs@redhat.com (moderated for non-subscribers)
S: Supported
F: Documentation/filesystems/caching/
F: fs/fscache/
HID CORE LAYER
M: Jiri Kosina <jikos@kernel.org>
+++ ++++++R: Benjamin Tissoires <benjamin.tissoires@redhat.com>
L: linux-input@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git
S: Maintained
F: Documentation/devicetree/bindings/i2c/
F: Documentation/i2c/
F: drivers/i2c/
+ + + +F: drivers/i2c/*/
F: include/linux/i2c.h
F: include/linux/i2c-*.h
F: include/uapi/linux/i2c.h
F: drivers/idle/intel_idle.c
INTEL PSTATE DRIVER
- - - -M: Kristen Carlson Accardi <kristen@linux.intel.com>
+ + + +M: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
+ + + +M: Len Brown <lenb@kernel.org>
L: linux-pm@vger.kernel.org
S: Supported
F: drivers/cpufreq/intel_pstate.c
S: Maintained
F: net/ipv4/netfilter/ipt_MASQUERADE.c
- - - -IP1000A 10/100/1000 GIGABIT ETHERNET DRIVER
- - - -M: Francois Romieu <romieu@fr.zoreil.com>
- - - -M: Sorbica Shieh <sorbica@icplus.com.tw>
- - - -L: netdev@vger.kernel.org
- - - -S: Maintained
- - - -F: drivers/net/ethernet/icplus/ipg.*
- - - -
IPATH DRIVER
M: Mike Marciniszyn <infinipath@intel.com>
L: linux-rdma@vger.kernel.org
LIGHTNVM PLATFORM SUPPORT
M: Matias Bjorling <mb@lightnvm.io>
W: http://github/OpenChannelSSD
+ ++++++ +L: linux-block@vger.kernel.org
S: Maintained
F: drivers/lightnvm/
F: include/linux/lightnvm.h
F: drivers/scsi/megaraid/
MELLANOX ETHERNET DRIVER (mlx4_en)
- - - -M: Amir Vadai <amirv@mellanox.com>
+ + + +M: Eugenia Emantayev <eugenia@mellanox.com>
L: netdev@vger.kernel.org
S: Supported
W: http://www.mellanox.com
Q: http://patchwork.ozlabs.org/project/netdev/list/
F: drivers/net/ethernet/mellanox/mlx4/en_*
+ + + +MELLANOX ETHERNET DRIVER (mlx5e)
+ + + +M: Saeed Mahameed <saeedm@mellanox.com>
+ + + +L: netdev@vger.kernel.org
+ + + +S: Supported
+ + + +W: http://www.mellanox.com
+ + + +Q: http://patchwork.ozlabs.org/project/netdev/list/
+ + + +F: drivers/net/ethernet/mellanox/mlx5/core/en_*
+ + + +
MELLANOX ETHERNET SWITCH DRIVERS
M: Jiri Pirko <jiri@mellanox.com>
M: Ido Schimmel <idosch@mellanox.com>
METAG ARCHITECTURE
M: James Hogan <james.hogan@imgtec.com>
L: linux-metag@vger.kernel.org
- - - -S: Supported
+ + + +S: Odd Fixes
F: arch/metag/
F: Documentation/metag/
F: Documentation/devicetree/bindings/metag/
F: Documentation/filesystems/nilfs2.txt
F: fs/nilfs2/
F: include/linux/nilfs2_fs.h
+ + + +F: include/trace/events/nilfs2.h
NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER
M: YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
F: net/openvswitch/
F: include/uapi/linux/openvswitch.h
+ ++++++ +OPERATING PERFORMANCE POINTS (OPP)
+ ++++++ +M: Viresh Kumar <vireshk@kernel.org>
+ ++++++ +M: Nishanth Menon <nm@ti.com>
+ ++++++ +M: Stephen Boyd <sboyd@codeaurora.org>
+ ++++++ +L: linux-pm@vger.kernel.org
+ ++++++ +S: Maintained
+ ++++++ +T: git git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git
+ ++++++ +F: drivers/base/power/opp/
+ ++++++ +F: include/linux/pm_opp.h
+ ++++++ +F: Documentation/power/opp.txt
+ ++++++ +F: Documentation/devicetree/bindings/opp/
+ ++++++ +
OPL4 DRIVER
M: Clemens Ladisch <clemens@ladisch.de>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Maintained
F: drivers/pnp/
- - - -PNXxxxx I2C DRIVER
- - - -M: Vitaly Wool <vitalywool@gmail.com>
- - - -L: linux-i2c@vger.kernel.org
- - - -S: Maintained
- - - -F: drivers/i2c/busses/i2c-pnx.c
- - - -
PPP PROTOCOL DRIVERS AND COMPRESSORS
M: Paul Mackerras <paulus@samba.org>
L: linux-ppp@vger.kernel.org
F: include/linux/platform_data/i2c-designware.h
SYNOPSYS DESIGNWARE MMC/SD/SDIO DRIVER
- - - -M: Seungwon Jeon <tgih.jun@samsung.com>
M: Jaehoon Chung <jh80.chung@samsung.com>
L: linux-mmc@vger.kernel.org
S: Maintained
S: Supported
F: arch/score/
+ + + +SYSTEM CONTROL & POWER INTERFACE (SCPI) Message Protocol drivers
+ + + +M: Sudeep Holla <sudeep.holla@arm.com>
+ + + +L: linux-arm-kernel@lists.infradead.org
+ + + +S: Maintained
+ + + +F: Documentation/devicetree/bindings/arm/arm,scpi.txt
+ + + +F: drivers/clk/clk-scpi.c
+ + + +F: drivers/cpufreq/scpi-cpufreq.c
+ + + +F: drivers/firmware/arm_scpi.c
+ + + +F: include/linux/scpi_protocol.h
+ + + +
SCSI CDROM DRIVER
M: Jens Axboe <axboe@kernel.dk>
L: linux-scsi@vger.kernel.org
SYNOPSYS ARC ARCHITECTURE
M: Vineet Gupta <vgupta@synopsys.com>
- - - -L: linux-snps-arc@lists.infraded.org
+ + + +L: linux-snps-arc@lists.infradead.org
S: Supported
F: arch/arc/
F: Documentation/devicetree/bindings/arc/*
USB HID/HIDBP DRIVERS (USB KEYBOARDS, MICE, REMOTE CONTROLS, ...)
M: Jiri Kosina <jikos@kernel.org>
+++ ++++++R: Benjamin Tissoires <benjamin.tissoires@redhat.com>
L: linux-usb@vger.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git
S: Maintained
struct led_classdev *leds[MAX_LEDS];
unsigned long quirks;
struct work_struct state_worker;
+++++++ ++ void(*send_output_report)(struct sony_sc*);
struct power_supply *battery;
struct power_supply_desc battery_desc;
int device_id;
__u8 battery_charging;
__u8 battery_capacity;
__u8 led_state[MAX_LEDS];
+++++++ ++ __u8 resume_led_state[MAX_LEDS];
__u8 led_delay_on[MAX_LEDS];
__u8 led_delay_off[MAX_LEDS];
__u8 led_count;
* the gyroscope values to corresponding axes so we need a
* modified one.
*/
------- -- if ((sc->quirks & DUALSHOCK4_CONTROLLER_USB) && *rsize == 467) {
+++++++ ++ if (sc->quirks & DUALSHOCK4_CONTROLLER_USB) {
hid_info(hdev, "Using modified Dualshock 4 report descriptor with gyroscope axes\n");
rdesc = dualshock4_usb_rdesc;
*rsize = sizeof(dualshock4_usb_rdesc);
------- -- } else if ((sc->quirks & DUALSHOCK4_CONTROLLER_BT) && *rsize == 357) {
+++++++ ++ } else if (sc->quirks & DUALSHOCK4_CONTROLLER_BT) {
hid_info(hdev, "Using modified Dualshock 4 Bluetooth report descriptor\n");
rdesc = dualshock4_bt_rdesc;
*rsize = sizeof(dualshock4_bt_rdesc);
enum led_brightness value)
{
struct device *dev = led->dev->parent;
-- ------- struct hid_device *hdev = container_of(dev, struct hid_device, dev);
++ +++++++ struct hid_device *hdev = to_hid_device(dev);
struct sony_sc *drv_data;
int n;
static enum led_brightness sony_led_get_brightness(struct led_classdev *led)
{
struct device *dev = led->dev->parent;
-- ------- struct hid_device *hdev = container_of(dev, struct hid_device, dev);
++ +++++++ struct hid_device *hdev = to_hid_device(dev);
struct sony_sc *drv_data;
int n;
unsigned long *delay_off)
{
struct device *dev = led->dev->parent;
-- ------- struct hid_device *hdev = container_of(dev, struct hid_device, dev);
++ +++++++ struct hid_device *hdev = to_hid_device(dev);
struct sony_sc *drv_data = hid_get_drvdata(hdev);
int n;
__u8 new_on, new_off;
return ret;
}
------- --static void sixaxis_state_worker(struct work_struct *work)
+++++++ ++static void sixaxis_send_output_report(struct sony_sc *sc)
{
static const union sixaxis_output_report_01 default_report = {
.buf = {
0x00, 0x00, 0x00, 0x00, 0x00
}
};
------- -- struct sony_sc *sc = container_of(work, struct sony_sc, state_worker);
struct sixaxis_output_report *report =
(struct sixaxis_output_report *)sc->output_report_dmabuf;
int n;
HID_OUTPUT_REPORT, HID_REQ_SET_REPORT);
}
------- --static void dualshock4_state_worker(struct work_struct *work)
+++++++ ++static void dualshock4_send_output_report(struct sony_sc *sc)
{
------- -- struct sony_sc *sc = container_of(work, struct sony_sc, state_worker);
struct hid_device *hdev = sc->hdev;
__u8 *buf = sc->output_report_dmabuf;
int offset;
HID_OUTPUT_REPORT, HID_REQ_SET_REPORT);
}
------- --static void motion_state_worker(struct work_struct *work)
+++++++ ++static void motion_send_output_report(struct sony_sc *sc)
{
------- -- struct sony_sc *sc = container_of(work, struct sony_sc, state_worker);
struct hid_device *hdev = sc->hdev;
struct motion_output_report_02 *report =
(struct motion_output_report_02 *)sc->output_report_dmabuf;
hid_hw_output_report(hdev, (__u8 *)report, MOTION_REPORT_0x02_SIZE);
}
+++++++ ++static inline void sony_send_output_report(struct sony_sc *sc)
+++++++ ++{
+++++++ ++ if (sc->send_output_report)
+++++++ ++ sc->send_output_report(sc);
+++++++ ++}
+++++++ ++
+++++++ ++static void sony_state_worker(struct work_struct *work)
+++++++ ++{
+++++++ ++ struct sony_sc *sc = container_of(work, struct sony_sc, state_worker);
+++++++ ++ sc->send_output_report(sc);
+++++++ ++}
+++++++ ++
static int sony_allocate_output_report(struct sony_sc *sc)
{
if ((sc->quirks & SIXAXIS_CONTROLLER) ||
}
}
------- --static inline void sony_init_work(struct sony_sc *sc,
------- -- void (*worker)(struct work_struct *))
+++++++ ++static inline void sony_init_output_report(struct sony_sc *sc,
+++++++ ++ void(*send_output_report)(struct sony_sc*))
{
+++++++ ++ sc->send_output_report = send_output_report;
+++++++ ++
if (!sc->worker_initialized)
------- -- INIT_WORK(&sc->state_worker, worker);
+++++++ ++ INIT_WORK(&sc->state_worker, sony_state_worker);
sc->worker_initialized = 1;
}
hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP;
hdev->quirks |= HID_QUIRK_SKIP_OUTPUT_REPORT_ID;
ret = sixaxis_set_operational_usb(hdev);
------- -- sony_init_work(sc, sixaxis_state_worker);
+++++++ ++ sony_init_output_report(sc, sixaxis_send_output_report);
} else if ((sc->quirks & SIXAXIS_CONTROLLER_BT) ||
(sc->quirks & NAVIGATION_CONTROLLER_BT)) {
/*
*/
hdev->quirks |= HID_QUIRK_NO_OUTPUT_REPORTS_ON_INTR_EP;
ret = sixaxis_set_operational_bt(hdev);
------- -- sony_init_work(sc, sixaxis_state_worker);
+++++++ ++ sony_init_output_report(sc, sixaxis_send_output_report);
} else if (sc->quirks & DUALSHOCK4_CONTROLLER) {
if (sc->quirks & DUALSHOCK4_CONTROLLER_BT) {
/*
}
}
------- -- sony_init_work(sc, dualshock4_state_worker);
+++++++ ++ sony_init_output_report(sc, dualshock4_send_output_report);
} else if (sc->quirks & MOTION_CONTROLLER) {
------- -- sony_init_work(sc, motion_state_worker);
+++++++ ++ sony_init_output_report(sc, motion_send_output_report);
} else {
ret = 0;
}
hid_hw_stop(hdev);
}
+++++++ ++#ifdef CONFIG_PM
+++++++ ++
+++++++ ++static int sony_suspend(struct hid_device *hdev, pm_message_t message)
+++++++ ++{
+++++++ ++ /*
+++++++ ++ * On suspend save the current LED state,
+++++++ ++ * stop running force-feedback and blank the LEDS.
+++++++ ++ */
+++++++ ++ if (SONY_LED_SUPPORT || SONY_FF_SUPPORT) {
+++++++ ++ struct sony_sc *sc = hid_get_drvdata(hdev);
+++++++ ++
+++++++ ++#ifdef CONFIG_SONY_FF
+++++++ ++ sc->left = sc->right = 0;
+++++++ ++#endif
+++++++ ++
+++++++ ++ memcpy(sc->resume_led_state, sc->led_state,
+++++++ ++ sizeof(sc->resume_led_state));
+++++++ ++ memset(sc->led_state, 0, sizeof(sc->led_state));
+++++++ ++
+++++++ ++ sony_send_output_report(sc);
+++++++ ++ }
+++++++ ++
+++++++ ++ return 0;
+++++++ ++}
+++++++ ++
+++++++ ++static int sony_resume(struct hid_device *hdev)
+++++++ ++{
+++++++ ++ /* Restore the state of controller LEDs on resume */
+++++++ ++ if (SONY_LED_SUPPORT) {
+++++++ ++ struct sony_sc *sc = hid_get_drvdata(hdev);
+++++++ ++
+++++++ ++ memcpy(sc->led_state, sc->resume_led_state,
+++++++ ++ sizeof(sc->led_state));
+++++++ ++
+++++++ ++ /*
+++++++ ++ * The Sixaxis and navigation controllers on USB need to be
+++++++ ++ * reinitialized on resume or they won't behave properly.
+++++++ ++ */
+++++++ ++ if ((sc->quirks & SIXAXIS_CONTROLLER_USB) ||
+++++++ ++ (sc->quirks & NAVIGATION_CONTROLLER_USB))
+++++++ ++ sixaxis_set_operational_usb(sc->hdev);
+++++++ ++
+++++++ ++ sony_set_leds(sc);
+++++++ ++ }
+++++++ ++
+++++++ ++ return 0;
+++++++ ++}
+++++++ ++
+++++++ ++#endif
+++++++ ++
static const struct hid_device_id sony_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER),
.driver_data = SIXAXIS_CONTROLLER_USB },
.probe = sony_probe,
.remove = sony_remove,
.report_fixup = sony_report_fixup,
------- -- .raw_event = sony_raw_event
+++++++ ++ .raw_event = sony_raw_event,
+++++++ ++
+++++++ ++#ifdef CONFIG_PM
+++++++ ++ .suspend = sony_suspend,
+++++++ ++ .resume = sony_resume,
+++++++ ++ .reset_resume = sony_resume,
+++++++ ++#endif
};
static int __init sony_init(void)
*/
#define WACOM_CONTACT_AREA_SCALE 2607
+++++++++ static void wacom_report_numbered_buttons(struct input_dev *input_dev,
+++++++++ int button_count, int mask);
+++++++++
/*
* Percent of battery capacity for Graphire.
* 8th value means AC online and show 100% capacity.
static void wacom_intuos_schedule_prox_event(struct wacom_wac *wacom_wac)
{
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
+++++++++ struct wacom_features *features = &wacom_wac->features;
struct hid_report *r;
struct hid_report_enum *re;
re = &(wacom->hdev->report_enum[HID_FEATURE_REPORT]);
--------- r = re->report_id_hash[WACOM_REPORT_INTUOSREAD];
+++++++++ if (features->type == INTUOSHT2)
+++++++++ r = re->report_id_hash[WACOM_REPORT_INTUOSHT2_ID];
+++++++++ else
+++++++++ r = re->report_id_hash[WACOM_REPORT_INTUOS_ID1];
if (r) {
hid_hw_request(wacom->hdev, r, HID_REQ_GET_REPORT);
}
}
+++++++++ static int wacom_intuos_pad(struct wacom_wac *wacom)
+++++++++ {
+++++++++ struct wacom_features *features = &wacom->features;
+++++++++ unsigned char *data = wacom->data;
+++++++++ struct input_dev *input = wacom->pad_input;
+++++++++ int i;
+++++++++ int buttons = 0, nbuttons = features->numbered_buttons;
+++++++++ int keys = 0, nkeys = 0;
+++++++++ int ring1 = 0, ring2 = 0;
+++++++++ int strip1 = 0, strip2 = 0;
+++++++++ bool prox = false;
+++++++++
+++++++++ /* pad packets. Works as a second tool and is always in prox */
+++++++++ if (!(data[0] == WACOM_REPORT_INTUOSPAD || data[0] == WACOM_REPORT_INTUOS5PAD ||
+++++++++ data[0] == WACOM_REPORT_CINTIQPAD))
+++++++++ return 0;
+++++++++
+++++++++ if (features->type >= INTUOS4S && features->type <= INTUOS4L) {
+++++++++ buttons = (data[3] << 1) | (data[2] & 0x01);
+++++++++ ring1 = data[1];
+++++++++ } else if (features->type == DTK) {
+++++++++ buttons = data[6];
+++++++++ } else if (features->type == WACOM_13HD) {
+++++++++ buttons = (data[4] << 1) | (data[3] & 0x01);
+++++++++ } else if (features->type == WACOM_24HD) {
+++++++++ buttons = (data[8] << 8) | data[6];
+++++++++ ring1 = data[1];
+++++++++ ring2 = data[2];
+++++++++
+++++++++ /*
+++++++++ * Three "buttons" are available on the 24HD which are
+++++++++ * physically implemented as a touchstrip. Each button
+++++++++ * is approximately 3 bits wide with a 2 bit spacing.
+++++++++ * The raw touchstrip bits are stored at:
+++++++++ * ((data[3] & 0x1f) << 8) | data[4])
+++++++++ */
+++++++++ nkeys = 3;
+++++++++ keys = ((data[3] & 0x1C) ? 1<<2 : 0) |
+++++++++ ((data[4] & 0xE0) ? 1<<1 : 0) |
+++++++++ ((data[4] & 0x07) ? 1<<0 : 0);
+++++++++ } else if (features->type == WACOM_27QHD) {
+++++++++ nkeys = 3;
+++++++++ keys = data[2] & 0x07;
+++++++++
+++++++++ input_report_abs(input, ABS_X, be16_to_cpup((__be16 *)&data[4]));
+++++++++ input_report_abs(input, ABS_Y, be16_to_cpup((__be16 *)&data[6]));
+++++++++ input_report_abs(input, ABS_Z, be16_to_cpup((__be16 *)&data[8]));
+++++++++ } else if (features->type == CINTIQ_HYBRID) {
+++++++++ /*
+++++++++ * Do not send hardware buttons under Android. They
+++++++++ * are already sent to the system through GPIO (and
+++++++++ * have different meaning).
+++++++++ *
+++++++++ * d-pad right -> data[4] & 0x10
+++++++++ * d-pad up -> data[4] & 0x20
+++++++++ * d-pad left -> data[4] & 0x40
+++++++++ * d-pad down -> data[4] & 0x80
+++++++++ * d-pad center -> data[3] & 0x01
+++++++++ */
+++++++++ buttons = (data[4] << 1) | (data[3] & 0x01);
+++++++++ } else if (features->type == CINTIQ_COMPANION_2) {
+++++++++ /* d-pad right -> data[4] & 0x10
+++++++++ * d-pad up -> data[4] & 0x20
+++++++++ * d-pad left -> data[4] & 0x40
+++++++++ * d-pad down -> data[4] & 0x80
+++++++++ * d-pad center -> data[3] & 0x01
+++++++++ */
+++++++++ buttons = ((data[2] >> 4) << 7) |
+++++++++ ((data[1] & 0x04) << 6) |
+++++++++ ((data[2] & 0x0F) << 2) |
+++++++++ (data[1] & 0x03);
+++++++++ } else if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
+++++++++ /*
+++++++++ * ExpressKeys on Intuos5/Intuos Pro have a capacitive sensor in
+++++++++ * addition to the mechanical switch. Switch data is
+++++++++ * stored in data[4], capacitive data in data[5].
+++++++++ *
+++++++++ * Touch ring mode switch (data[3]) has no capacitive sensor
+++++++++ */
+++++++++ buttons = (data[4] << 1) | (data[3] & 0x01);
+++++++++ ring1 = data[2];
+++++++++ } else {
+++++++++ if (features->type == WACOM_21UX2 || features->type == WACOM_22HD) {
+++++++++ buttons = (data[8] << 10) | ((data[7] & 0x01) << 9) |
+++++++++ (data[6] << 1) | (data[5] & 0x01);
+++++++++
+++++++++ if (features->type == WACOM_22HD) {
+++++++++ nkeys = 3;
+++++++++ keys = data[9] & 0x07;
+++++++++ }
+++++++++ } else {
+++++++++ buttons = ((data[6] & 0x10) << 10) |
+++++++++ ((data[5] & 0x10) << 9) |
+++++++++ ((data[6] & 0x0F) << 4) |
+++++++++ (data[5] & 0x0F);
+++++++++ }
+++++++++ strip1 = ((data[1] & 0x1f) << 8) | data[2];
+++++++++ strip2 = ((data[3] & 0x1f) << 8) | data[4];
+++++++++ }
+++++++++
+++++++++ prox = (buttons & ~(~0 << nbuttons)) | (keys & ~(~0 << nkeys)) |
+++++++++ (ring1 & 0x80) | (ring2 & 0x80) | strip1 | strip2;
+++++++++
+++++++++ wacom_report_numbered_buttons(input, nbuttons, buttons);
+++++++++
+++++++++ for (i = 0; i < nkeys; i++)
+++++++++ input_report_key(input, KEY_PROG1 + i, keys & (1 << i));
+++++++++
+++++++++ input_report_abs(input, ABS_RX, strip1);
+++++++++ input_report_abs(input, ABS_RY, strip2);
+++++++++
+++++++++ input_report_abs(input, ABS_WHEEL, (ring1 & 0x80) ? (ring1 & 0x7f) : 0);
+++++++++ input_report_abs(input, ABS_THROTTLE, (ring2 & 0x80) ? (ring2 & 0x7f) : 0);
+++++++++
+++++++++ input_report_key(input, wacom->tool[1], prox ? 1 : 0);
+++++++++ input_report_abs(input, ABS_MISC, prox ? PAD_DEVICE_ID : 0);
+++++++++
+++++++++ input_event(input, EV_MSC, MSC_SERIAL, 0xffffffff);
+++++++++
+++++++++ return 1;
+++++++++ }
+++++++++
static int wacom_intuos_inout(struct wacom_wac *wacom)
{
struct wacom_features *features = &wacom->features;
return 0;
}
--------- static void wacom_intuos_general(struct wacom_wac *wacom)
+++++++++ static int wacom_intuos_general(struct wacom_wac *wacom)
{
struct wacom_features *features = &wacom->features;
unsigned char *data = wacom->data;
struct input_dev *input = wacom->pen_input;
--------- unsigned int t;
+++++++++ int idx = (features->type == INTUOS) ? (data[1] & 0x01) : 0;
+++++++++ unsigned char type = (data[1] >> 1) & 0x0F;
+++++++++ unsigned int x, y, distance, t;
--------- /* general pen packet */
--------- if ((data[1] & 0xb8) == 0xa0) {
--------- t = (data[6] << 2) | ((data[7] >> 6) & 3);
--------- if (features->pressure_max == 2047) {
--------- t = (t << 1) | (data[1] & 1);
--------- }
+++++++++ if (data[0] != WACOM_REPORT_PENABLED && data[0] != WACOM_REPORT_CINTIQ &&
+++++++++ data[0] != WACOM_REPORT_INTUOS_PEN)
+++++++++ return 0;
+++++++++
+++++++++ x = (be16_to_cpup((__be16 *)&data[2]) << 1) | ((data[9] >> 1) & 1);
+++++++++ y = (be16_to_cpup((__be16 *)&data[4]) << 1) | (data[9] & 1);
+++++++++ distance = data[9] >> 2;
+++++++++ if (features->type < INTUOS3S) {
+++++++++ x >>= 1;
+++++++++ y >>= 1;
+++++++++ distance >>= 1;
+++++++++ }
+++++++++ input_report_abs(input, ABS_X, x);
+++++++++ input_report_abs(input, ABS_Y, y);
+++++++++ input_report_abs(input, ABS_DISTANCE, distance);
+++++++++
+++++++++ switch (type) {
+++++++++ case 0x00:
+++++++++ case 0x01:
+++++++++ case 0x02:
+++++++++ case 0x03:
+++++++++ /* general pen packet */
+++++++++ t = (data[6] << 3) | ((data[7] & 0xC0) >> 5) | (data[1] & 1);
+++++++++ if (features->pressure_max < 2047)
+++++++++ t >>= 1;
input_report_abs(input, ABS_PRESSURE, t);
if (features->type != INTUOSHT2) {
input_report_abs(input, ABS_TILT_X,
input_report_key(input, BTN_STYLUS, data[1] & 2);
input_report_key(input, BTN_STYLUS2, data[1] & 4);
input_report_key(input, BTN_TOUCH, t > 10);
--------- }
+++++++++ break;
--------- /* airbrush second packet */
--------- if ((data[1] & 0xbc) == 0xb4) {
+++++++++ case 0x0a:
+++++++++ /* airbrush second packet */
input_report_abs(input, ABS_WHEEL,
(data[6] << 2) | ((data[7] >> 6) & 3));
input_report_abs(input, ABS_TILT_X,
(((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64);
input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64);
+++++++++ break;
+++++++++
+++++++++ case 0x05:
+++++++++ /* Rotation packet */
+++++++++ if (features->type >= INTUOS3S) {
+++++++++ /* I3 marker pen rotation */
+++++++++ t = (data[6] << 3) | ((data[7] >> 5) & 7);
+++++++++ t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) :
+++++++++ ((t-1) / 2 + 450)) : (450 - t / 2) ;
+++++++++ input_report_abs(input, ABS_Z, t);
+++++++++ } else {
+++++++++ /* 4D mouse 2nd packet */
+++++++++ t = (data[6] << 3) | ((data[7] >> 5) & 7);
+++++++++ input_report_abs(input, ABS_RZ, (data[7] & 0x20) ?
+++++++++ ((t - 1) / 2) : -t / 2);
+++++++++ }
+++++++++ break;
+++++++++
+++++++++ case 0x04:
+++++++++ /* 4D mouse 1st packet */
+++++++++ input_report_key(input, BTN_LEFT, data[8] & 0x01);
+++++++++ input_report_key(input, BTN_MIDDLE, data[8] & 0x02);
+++++++++ input_report_key(input, BTN_RIGHT, data[8] & 0x04);
+++++++++
+++++++++ input_report_key(input, BTN_SIDE, data[8] & 0x20);
+++++++++ input_report_key(input, BTN_EXTRA, data[8] & 0x10);
+++++++++ t = (data[6] << 2) | ((data[7] >> 6) & 3);
+++++++++ input_report_abs(input, ABS_THROTTLE, (data[8] & 0x08) ? -t : t);
+++++++++ break;
+++++++++
+++++++++ case 0x06:
+++++++++ /* I4 mouse */
+++++++++ input_report_key(input, BTN_LEFT, data[6] & 0x01);
+++++++++ input_report_key(input, BTN_MIDDLE, data[6] & 0x02);
+++++++++ input_report_key(input, BTN_RIGHT, data[6] & 0x04);
+++++++++ input_report_rel(input, REL_WHEEL, ((data[7] & 0x80) >> 7)
+++++++++ - ((data[7] & 0x40) >> 6));
+++++++++ input_report_key(input, BTN_SIDE, data[6] & 0x08);
+++++++++ input_report_key(input, BTN_EXTRA, data[6] & 0x10);
+++++++++
+++++++++ input_report_abs(input, ABS_TILT_X,
+++++++++ (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64);
+++++++++ input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64);
+++++++++ break;
+++++++++
+++++++++ case 0x08:
+++++++++ if (wacom->tool[idx] == BTN_TOOL_MOUSE) {
+++++++++ /* 2D mouse packet */
+++++++++ input_report_key(input, BTN_LEFT, data[8] & 0x04);
+++++++++ input_report_key(input, BTN_MIDDLE, data[8] & 0x08);
+++++++++ input_report_key(input, BTN_RIGHT, data[8] & 0x10);
+++++++++ input_report_rel(input, REL_WHEEL, (data[8] & 0x01)
+++++++++ - ((data[8] & 0x02) >> 1));
+++++++++
+++++++++ /* I3 2D mouse side buttons */
+++++++++ if (features->type >= INTUOS3S && features->type <= INTUOS3L) {
+++++++++ input_report_key(input, BTN_SIDE, data[8] & 0x40);
+++++++++ input_report_key(input, BTN_EXTRA, data[8] & 0x20);
+++++++++ }
+++++++++ }
+++++++++ else if (wacom->tool[idx] == BTN_TOOL_LENS) {
+++++++++ /* Lens cursor packets */
+++++++++ input_report_key(input, BTN_LEFT, data[8] & 0x01);
+++++++++ input_report_key(input, BTN_MIDDLE, data[8] & 0x02);
+++++++++ input_report_key(input, BTN_RIGHT, data[8] & 0x04);
+++++++++ input_report_key(input, BTN_SIDE, data[8] & 0x10);
+++++++++ input_report_key(input, BTN_EXTRA, data[8] & 0x08);
+++++++++ }
+++++++++ break;
+++++++++
+++++++++ case 0x07:
+++++++++ case 0x09:
+++++++++ case 0x0b:
+++++++++ case 0x0c:
+++++++++ case 0x0d:
+++++++++ case 0x0e:
+++++++++ case 0x0f:
+++++++++ /* unhandled */
+++++++++ break;
}
+++++++++
+++++++++ input_report_abs(input, ABS_MISC, wacom->id[idx]); /* report tool id */
+++++++++ input_report_key(input, wacom->tool[idx], 1);
+++++++++ input_event(input, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
+++++++++ wacom->reporting_data = true;
+++++++++ return 2;
}
static int wacom_intuos_irq(struct wacom_wac *wacom)
{
--------- struct wacom_features *features = &wacom->features;
unsigned char *data = wacom->data;
struct input_dev *input = wacom->pen_input;
--------- unsigned int t;
--------- int idx = 0, result;
+++++++++ int result;
if (data[0] != WACOM_REPORT_PENABLED &&
--------- data[0] != WACOM_REPORT_INTUOSREAD &&
--------- data[0] != WACOM_REPORT_INTUOSWRITE &&
+++++++++ data[0] != WACOM_REPORT_INTUOS_ID1 &&
+++++++++ data[0] != WACOM_REPORT_INTUOS_ID2 &&
data[0] != WACOM_REPORT_INTUOSPAD &&
data[0] != WACOM_REPORT_INTUOS_PEN &&
data[0] != WACOM_REPORT_CINTIQ &&
return 0;
}
--------- /* tool number */
--------- if (features->type == INTUOS)
--------- idx = data[1] & 0x01;
---------
--------- /* pad packets. Works as a second tool and is always in prox */
--------- if (data[0] == WACOM_REPORT_INTUOSPAD || data[0] == WACOM_REPORT_INTUOS5PAD ||
--------- data[0] == WACOM_REPORT_CINTIQPAD) {
--------- input = wacom->pad_input;
--------- if (features->type >= INTUOS4S && features->type <= INTUOS4L) {
--------- input_report_key(input, BTN_0, (data[2] & 0x01));
--------- input_report_key(input, BTN_1, (data[3] & 0x01));
--------- input_report_key(input, BTN_2, (data[3] & 0x02));
--------- input_report_key(input, BTN_3, (data[3] & 0x04));
--------- input_report_key(input, BTN_4, (data[3] & 0x08));
--------- input_report_key(input, BTN_5, (data[3] & 0x10));
--------- input_report_key(input, BTN_6, (data[3] & 0x20));
--------- if (data[1] & 0x80) {
--------- input_report_abs(input, ABS_WHEEL, (data[1] & 0x7f));
--------- } else {
--------- /* Out of proximity, clear wheel value. */
--------- input_report_abs(input, ABS_WHEEL, 0);
--------- }
--------- if (features->type != INTUOS4S) {
--------- input_report_key(input, BTN_7, (data[3] & 0x40));
--------- input_report_key(input, BTN_8, (data[3] & 0x80));
--------- }
--------- if (data[1] | (data[2] & 0x01) | data[3]) {
--------- input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
--------- } else {
--------- input_report_abs(input, ABS_MISC, 0);
--------- }
--------- } else if (features->type == DTK) {
--------- input_report_key(input, BTN_0, (data[6] & 0x01));
--------- input_report_key(input, BTN_1, (data[6] & 0x02));
--------- input_report_key(input, BTN_2, (data[6] & 0x04));
--------- input_report_key(input, BTN_3, (data[6] & 0x08));
--------- input_report_key(input, BTN_4, (data[6] & 0x10));
--------- input_report_key(input, BTN_5, (data[6] & 0x20));
--------- if (data[6] & 0x3f) {
--------- input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
--------- } else {
--------- input_report_abs(input, ABS_MISC, 0);
--------- }
--------- } else if (features->type == WACOM_13HD) {
--------- input_report_key(input, BTN_0, (data[3] & 0x01));
--------- input_report_key(input, BTN_1, (data[4] & 0x01));
--------- input_report_key(input, BTN_2, (data[4] & 0x02));
--------- input_report_key(input, BTN_3, (data[4] & 0x04));
--------- input_report_key(input, BTN_4, (data[4] & 0x08));
--------- input_report_key(input, BTN_5, (data[4] & 0x10));
--------- input_report_key(input, BTN_6, (data[4] & 0x20));
--------- input_report_key(input, BTN_7, (data[4] & 0x40));
--------- input_report_key(input, BTN_8, (data[4] & 0x80));
--------- if ((data[3] & 0x01) | data[4]) {
--------- input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
--------- } else {
--------- input_report_abs(input, ABS_MISC, 0);
--------- }
--------- } else if (features->type == WACOM_24HD) {
--------- input_report_key(input, BTN_0, (data[6] & 0x01));
--------- input_report_key(input, BTN_1, (data[6] & 0x02));
--------- input_report_key(input, BTN_2, (data[6] & 0x04));
--------- input_report_key(input, BTN_3, (data[6] & 0x08));
--------- input_report_key(input, BTN_4, (data[6] & 0x10));
--------- input_report_key(input, BTN_5, (data[6] & 0x20));
--------- input_report_key(input, BTN_6, (data[6] & 0x40));
--------- input_report_key(input, BTN_7, (data[6] & 0x80));
--------- input_report_key(input, BTN_8, (data[8] & 0x01));
--------- input_report_key(input, BTN_9, (data[8] & 0x02));
--------- input_report_key(input, BTN_A, (data[8] & 0x04));
--------- input_report_key(input, BTN_B, (data[8] & 0x08));
--------- input_report_key(input, BTN_C, (data[8] & 0x10));
--------- input_report_key(input, BTN_X, (data[8] & 0x20));
--------- input_report_key(input, BTN_Y, (data[8] & 0x40));
--------- input_report_key(input, BTN_Z, (data[8] & 0x80));
---------
--------- /*
--------- * Three "buttons" are available on the 24HD which are
--------- * physically implemented as a touchstrip. Each button
--------- * is approximately 3 bits wide with a 2 bit spacing.
--------- * The raw touchstrip bits are stored at:
--------- * ((data[3] & 0x1f) << 8) | data[4])
--------- */
--------- input_report_key(input, KEY_PROG1, data[4] & 0x07);
--------- input_report_key(input, KEY_PROG2, data[4] & 0xE0);
--------- input_report_key(input, KEY_PROG3, data[3] & 0x1C);
---------
--------- if (data[1] & 0x80) {
--------- input_report_abs(input, ABS_WHEEL, (data[1] & 0x7f));
--------- } else {
--------- /* Out of proximity, clear wheel value. */
--------- input_report_abs(input, ABS_WHEEL, 0);
--------- }
---------
--------- if (data[2] & 0x80) {
--------- input_report_abs(input, ABS_THROTTLE, (data[2] & 0x7f));
--------- } else {
--------- /* Out of proximity, clear second wheel value. */
--------- input_report_abs(input, ABS_THROTTLE, 0);
--------- }
---------
--------- if (data[1] | data[2] | (data[3] & 0x1f) | data[4] | data[6] | data[8]) {
--------- input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
--------- } else {
--------- input_report_abs(input, ABS_MISC, 0);
--------- }
--------- } else if (features->type == WACOM_27QHD) {
--------- input_report_key(input, KEY_PROG1, data[2] & 0x01);
--------- input_report_key(input, KEY_PROG2, data[2] & 0x02);
--------- input_report_key(input, KEY_PROG3, data[2] & 0x04);
---------
--------- input_report_abs(input, ABS_X, be16_to_cpup((__be16 *)&data[4]));
--------- input_report_abs(input, ABS_Y, be16_to_cpup((__be16 *)&data[6]));
--------- input_report_abs(input, ABS_Z, be16_to_cpup((__be16 *)&data[8]));
--------- if ((data[2] & 0x07) | data[4] | data[5] | data[6] | data[7] | data[8] | data[9]) {
--------- input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
--------- } else {
--------- input_report_abs(input, ABS_MISC, 0);
--------- }
--------- } else if (features->type == CINTIQ_HYBRID) {
--------- /*
--------- * Do not send hardware buttons under Android. They
--------- * are already sent to the system through GPIO (and
--------- * have different meaning).
--------- */
--------- input_report_key(input, BTN_1, (data[4] & 0x01));
--------- input_report_key(input, BTN_2, (data[4] & 0x02));
--------- input_report_key(input, BTN_3, (data[4] & 0x04));
--------- input_report_key(input, BTN_4, (data[4] & 0x08));
---------
--------- input_report_key(input, BTN_5, (data[4] & 0x10)); /* Right */
--------- input_report_key(input, BTN_6, (data[4] & 0x20)); /* Up */
--------- input_report_key(input, BTN_7, (data[4] & 0x40)); /* Left */
--------- input_report_key(input, BTN_8, (data[4] & 0x80)); /* Down */
--------- input_report_key(input, BTN_0, (data[3] & 0x01)); /* Center */
---------
--------- if (data[4] | (data[3] & 0x01)) {
--------- input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
--------- } else {
--------- input_report_abs(input, ABS_MISC, 0);
--------- }
---------
--------- } else if (features->type == CINTIQ_COMPANION_2) {
--------- input_report_key(input, BTN_1, (data[1] & 0x02));
--------- input_report_key(input, BTN_2, (data[2] & 0x01));
--------- input_report_key(input, BTN_3, (data[2] & 0x02));
--------- input_report_key(input, BTN_4, (data[2] & 0x04));
--------- input_report_key(input, BTN_5, (data[2] & 0x08));
--------- input_report_key(input, BTN_6, (data[1] & 0x04));
---------
--------- input_report_key(input, BTN_7, (data[2] & 0x10)); /* Right */
--------- input_report_key(input, BTN_8, (data[2] & 0x20)); /* Up */
--------- input_report_key(input, BTN_9, (data[2] & 0x40)); /* Left */
--------- input_report_key(input, BTN_A, (data[2] & 0x80)); /* Down */
--------- input_report_key(input, BTN_0, (data[1] & 0x01)); /* Center */
---------
--------- if (data[2] | (data[1] & 0x07)) {
--------- input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
--------- } else {
--------- input_report_abs(input, ABS_MISC, 0);
--------- }
---------
--------- } else if (features->type >= INTUOS5S && features->type <= INTUOSPL) {
--------- int i;
---------
--------- /* Touch ring mode switch has no capacitive sensor */
--------- input_report_key(input, BTN_0, (data[3] & 0x01));
---------
--------- /*
--------- * ExpressKeys on Intuos5/Intuos Pro have a capacitive sensor in
--------- * addition to the mechanical switch. Switch data is
--------- * stored in data[4], capacitive data in data[5].
--------- */
--------- for (i = 0; i < 8; i++)
--------- input_report_key(input, BTN_1 + i, data[4] & (1 << i));
---------
--------- if (data[2] & 0x80) {
--------- input_report_abs(input, ABS_WHEEL, (data[2] & 0x7f));
--------- } else {
--------- /* Out of proximity, clear wheel value. */
--------- input_report_abs(input, ABS_WHEEL, 0);
--------- }
---------
--------- if (data[2] | (data[3] & 0x01) | data[4] | data[5]) {
--------- input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
--------- } else {
--------- input_report_abs(input, ABS_MISC, 0);
--------- }
--------- } else {
--------- if (features->type == WACOM_21UX2 || features->type == WACOM_22HD) {
--------- input_report_key(input, BTN_0, (data[5] & 0x01));
--------- input_report_key(input, BTN_1, (data[6] & 0x01));
--------- input_report_key(input, BTN_2, (data[6] & 0x02));
--------- input_report_key(input, BTN_3, (data[6] & 0x04));
--------- input_report_key(input, BTN_4, (data[6] & 0x08));
--------- input_report_key(input, BTN_5, (data[6] & 0x10));
--------- input_report_key(input, BTN_6, (data[6] & 0x20));
--------- input_report_key(input, BTN_7, (data[6] & 0x40));
--------- input_report_key(input, BTN_8, (data[6] & 0x80));
--------- input_report_key(input, BTN_9, (data[7] & 0x01));
--------- input_report_key(input, BTN_A, (data[8] & 0x01));
--------- input_report_key(input, BTN_B, (data[8] & 0x02));
--------- input_report_key(input, BTN_C, (data[8] & 0x04));
--------- input_report_key(input, BTN_X, (data[8] & 0x08));
--------- input_report_key(input, BTN_Y, (data[8] & 0x10));
--------- input_report_key(input, BTN_Z, (data[8] & 0x20));
--------- input_report_key(input, BTN_BASE, (data[8] & 0x40));
--------- input_report_key(input, BTN_BASE2, (data[8] & 0x80));
---------
--------- if (features->type == WACOM_22HD) {
--------- input_report_key(input, KEY_PROG1, data[9] & 0x01);
--------- input_report_key(input, KEY_PROG2, data[9] & 0x02);
--------- input_report_key(input, KEY_PROG3, data[9] & 0x04);
--------- }
--------- } else {
--------- input_report_key(input, BTN_0, (data[5] & 0x01));
--------- input_report_key(input, BTN_1, (data[5] & 0x02));
--------- input_report_key(input, BTN_2, (data[5] & 0x04));
--------- input_report_key(input, BTN_3, (data[5] & 0x08));
--------- input_report_key(input, BTN_4, (data[6] & 0x01));
--------- input_report_key(input, BTN_5, (data[6] & 0x02));
--------- input_report_key(input, BTN_6, (data[6] & 0x04));
--------- input_report_key(input, BTN_7, (data[6] & 0x08));
--------- input_report_key(input, BTN_8, (data[5] & 0x10));
--------- input_report_key(input, BTN_9, (data[6] & 0x10));
--------- }
--------- input_report_abs(input, ABS_RX, ((data[1] & 0x1f) << 8) | data[2]);
--------- input_report_abs(input, ABS_RY, ((data[3] & 0x1f) << 8) | data[4]);
---------
--------- if ((data[5] & 0x1f) | data[6] | (data[1] & 0x1f) |
--------- data[2] | (data[3] & 0x1f) | data[4] | data[8] |
--------- (data[7] & 0x01)) {
--------- input_report_abs(input, ABS_MISC, PAD_DEVICE_ID);
--------- } else {
--------- input_report_abs(input, ABS_MISC, 0);
--------- }
--------- }
--------- return 1;
--------- }
+++++++++ /* process pad events */
+++++++++ result = wacom_intuos_pad(wacom);
+++++++++ if (result)
+++++++++ return result;
/* process in/out prox events */
result = wacom_intuos_inout(wacom);
if (result)
--------- return result - 1;
---------
--------- if (features->type >= INTUOS3S) {
--------- input_report_abs(input, ABS_X, (data[2] << 9) | (data[3] << 1) | ((data[9] >> 1) & 1));
--------- input_report_abs(input, ABS_Y, (data[4] << 9) | (data[5] << 1) | (data[9] & 1));
--------- input_report_abs(input, ABS_DISTANCE, ((data[9] >> 2) & 0x3f));
--------- } else {
--------- input_report_abs(input, ABS_X, be16_to_cpup((__be16 *)&data[2]));
--------- input_report_abs(input, ABS_Y, be16_to_cpup((__be16 *)&data[4]));
--------- input_report_abs(input, ABS_DISTANCE, ((data[9] >> 3) & 0x1f));
--------- }
+++++++++ return result - 1;
/* process general packets */
--------- wacom_intuos_general(wacom);
---------
--------- /* 4D mouse, 2D mouse, marker pen rotation, tilt mouse, or Lens cursor packets */
--------- if ((data[1] & 0xbc) == 0xa8 || (data[1] & 0xbe) == 0xb0 || (data[1] & 0xbc) == 0xac) {
---------
--------- if (data[1] & 0x02) {
--------- /* Rotation packet */
--------- if (features->type >= INTUOS3S) {
--------- /* I3 marker pen rotation */
--------- t = (data[6] << 3) | ((data[7] >> 5) & 7);
--------- t = (data[7] & 0x20) ? ((t > 900) ? ((t-1) / 2 - 1350) :
--------- ((t-1) / 2 + 450)) : (450 - t / 2) ;
--------- input_report_abs(input, ABS_Z, t);
--------- } else {
--------- /* 4D mouse rotation packet */
--------- t = (data[6] << 3) | ((data[7] >> 5) & 7);
--------- input_report_abs(input, ABS_RZ, (data[7] & 0x20) ?
--------- ((t - 1) / 2) : -t / 2);
--------- }
---------
--------- } else if (!(data[1] & 0x10) && features->type < INTUOS3S) {
--------- /* 4D mouse packet */
--------- input_report_key(input, BTN_LEFT, data[8] & 0x01);
--------- input_report_key(input, BTN_MIDDLE, data[8] & 0x02);
--------- input_report_key(input, BTN_RIGHT, data[8] & 0x04);
---------
--------- input_report_key(input, BTN_SIDE, data[8] & 0x20);
--------- input_report_key(input, BTN_EXTRA, data[8] & 0x10);
--------- t = (data[6] << 2) | ((data[7] >> 6) & 3);
--------- input_report_abs(input, ABS_THROTTLE, (data[8] & 0x08) ? -t : t);
---------
--------- } else if (wacom->tool[idx] == BTN_TOOL_MOUSE) {
--------- /* I4 mouse */
--------- if (features->type >= INTUOS4S && features->type <= INTUOSPL) {
--------- input_report_key(input, BTN_LEFT, data[6] & 0x01);
--------- input_report_key(input, BTN_MIDDLE, data[6] & 0x02);
--------- input_report_key(input, BTN_RIGHT, data[6] & 0x04);
--------- input_report_rel(input, REL_WHEEL, ((data[7] & 0x80) >> 7)
--------- - ((data[7] & 0x40) >> 6));
--------- input_report_key(input, BTN_SIDE, data[6] & 0x08);
--------- input_report_key(input, BTN_EXTRA, data[6] & 0x10);
---------
--------- input_report_abs(input, ABS_TILT_X,
--------- (((data[7] << 1) & 0x7e) | (data[8] >> 7)) - 64);
--------- input_report_abs(input, ABS_TILT_Y, (data[8] & 0x7f) - 64);
--------- } else {
--------- /* 2D mouse packet */
--------- input_report_key(input, BTN_LEFT, data[8] & 0x04);
--------- input_report_key(input, BTN_MIDDLE, data[8] & 0x08);
--------- input_report_key(input, BTN_RIGHT, data[8] & 0x10);
--------- input_report_rel(input, REL_WHEEL, (data[8] & 0x01)
--------- - ((data[8] & 0x02) >> 1));
---------
--------- /* I3 2D mouse side buttons */
--------- if (features->type >= INTUOS3S && features->type <= INTUOS3L) {
--------- input_report_key(input, BTN_SIDE, data[8] & 0x40);
--------- input_report_key(input, BTN_EXTRA, data[8] & 0x20);
--------- }
--------- }
--------- } else if ((features->type < INTUOS3S || features->type == INTUOS3L ||
--------- features->type == INTUOS4L || features->type == INTUOS5L ||
--------- features->type == INTUOSPL) &&
--------- wacom->tool[idx] == BTN_TOOL_LENS) {
--------- /* Lens cursor packets */
--------- input_report_key(input, BTN_LEFT, data[8] & 0x01);
--------- input_report_key(input, BTN_MIDDLE, data[8] & 0x02);
--------- input_report_key(input, BTN_RIGHT, data[8] & 0x04);
--------- input_report_key(input, BTN_SIDE, data[8] & 0x10);
--------- input_report_key(input, BTN_EXTRA, data[8] & 0x08);
--------- }
--------- }
+++++++++ result = wacom_intuos_general(wacom);
+++++++++ if (result)
+++++++++ return result - 1;
--------- input_report_abs(input, ABS_MISC, wacom->id[idx]); /* report tool id */
--------- input_report_key(input, wacom->tool[idx], 1);
--------- input_event(input, EV_MSC, MSC_SERIAL, wacom->serial[idx]);
--------- wacom->reporting_data = true;
--------- return 1;
+++++++++ return 0;
}
static int int_dist(int x1, int y1, int x2, int y2)
if (features->pktlen == WACOM_PKGLEN_BBTOUCH3) {
if (features->touch_max)
features->device_type |= WACOM_DEVICETYPE_TOUCH;
- - - if (features->type >= INTUOSHT || features->type <= BAMBOO_PT)
+ + + if (features->type >= INTUOSHT && features->type <= BAMBOO_PT)
features->device_type |= WACOM_DEVICETYPE_PAD;
features->x_max = 4096;
features->quirks |= WACOM_QUIRK_BATTERY;
/* quirk for bamboo touch with 2 low res touches */
--------- if (features->type == BAMBOO_PT &&
+++++++++ if ((features->type == BAMBOO_PT || features->type == BAMBOO_TOUCH) &&
features->pktlen == WACOM_PKGLEN_BBTOUCH) {
features->x_max <<= 5;
features->y_max <<= 5;
__set_bit(BTN_BASE + (i-16), input_dev->keybit);
}
+++++++++ static void wacom_report_numbered_buttons(struct input_dev *input_dev,
+++++++++ int button_count, int mask)
+++++++++ {
+++++++++ int i;
+++++++++
+++++++++ for (i = 0; i < button_count && i < 10; i++)
+++++++++ input_report_key(input_dev, BTN_0 + i, mask & (1 << i));
+++++++++ for (i = 10; i < button_count && i < 16; i++)
+++++++++ input_report_key(input_dev, BTN_A + (i-10), mask & (1 << i));
+++++++++ for (i = 16; i < button_count && i < 18; i++)
+++++++++ input_report_key(input_dev, BTN_BASE + (i-16), mask & (1 << i));
+++++++++ }
+++++++++
int wacom_setup_pad_input_capabilities(struct input_dev *input_dev,
struct wacom_wac *wacom_wac)
{
WACOM_DTU_OFFSET, WACOM_DTU_OFFSET };
static const struct wacom_features wacom_features_0x336 =
{ "Wacom DTU1141", 23472, 13203, 1023, 0,
- - - DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4 };
+ + + DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4,
+ + + WACOM_DTU_OFFSET, WACOM_DTU_OFFSET };
static const struct wacom_features wacom_features_0x57 =
{ "Wacom DTK2241", 95640, 54060, 2047, 63,
DTK, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES, 6,