From 5360c7ef94c9415fd0decd99b6a2d243f9c52e4c Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Sun, 19 Feb 2017 01:18:09 -0800 Subject: drivers/i2c: Use I2C HID driver for wacom devices Wacom I2C driver does the same thing as I2C HID driver, other than defining macros for Wacom HID. Instead of maintaining two separate drivers providing the same functionality, update all wacom devices to use generic I2C HID driver. BUG=None BRANCH=None TEST=Verified that ACPI nodes for wacom devices are unchanged. Change-Id: Ibb3226d1f3934f5c3c5d98b939756775d11b792c Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/18401 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Duncan Laurie --- src/mainboard/google/reef/Kconfig | 1 - .../google/reef/variants/baseboard/devicetree.cb | 11 ++++------ .../google/reef/variants/pyro/devicetree.cb | 25 ++++++++++------------ .../google/reef/variants/snappy/devicetree.cb | 11 ++++------ 4 files changed, 19 insertions(+), 29 deletions(-) (limited to 'src/mainboard/google/reef') diff --git a/src/mainboard/google/reef/Kconfig b/src/mainboard/google/reef/Kconfig index 8612747a12..d099be4b8e 100644 --- a/src/mainboard/google/reef/Kconfig +++ b/src/mainboard/google/reef/Kconfig @@ -7,7 +7,6 @@ config BOARD_GOOGLE_BASEBOARD_REEF select DRIVERS_I2C_DA7219 select DRIVERS_I2C_GENERIC select DRIVERS_I2C_HID - select DRIVERS_I2C_WACOM select DRIVERS_PS2_KEYBOARD select EC_GOOGLE_CHROMEEC select EC_GOOGLE_CHROMEEC_LPC diff --git a/src/mainboard/google/reef/variants/baseboard/devicetree.cb b/src/mainboard/google/reef/variants/baseboard/devicetree.cb index 2ccf277299..6e51838ecd 100644 --- a/src/mainboard/google/reef/variants/baseboard/devicetree.cb +++ b/src/mainboard/google/reef/variants/baseboard/devicetree.cb @@ -196,13 +196,10 @@ chip soc/intel/apollolake end end # - I2C 4 device pci 17.1 on - chip drivers/i2c/wacom - register "generic" = "{ - .hid = WCOM50C1_HID, - .cid = PNP0C50_CID, - .desc = WCOM_DT_DESC, - .irq = IRQ_LEVEL_LOW(GPIO_13_IRQ), - }" + chip drivers/i2c/hid + register "generic.hid" = ""WCOM50C1"" + register "generic.desc" = ""WCOM Digitizer"" + register "generic.irq" = "IRQ_LEVEL_LOW(GPIO_13_IRQ)" register "hid_desc_reg_offset" = "0x1" device i2c 0x9 on end end diff --git a/src/mainboard/google/reef/variants/pyro/devicetree.cb b/src/mainboard/google/reef/variants/pyro/devicetree.cb index c36d19d94c..a01fa04d35 100644 --- a/src/mainboard/google/reef/variants/pyro/devicetree.cb +++ b/src/mainboard/google/reef/variants/pyro/devicetree.cb @@ -181,20 +181,17 @@ chip soc/intel/apollolake end end # - I2C 2 device pci 16.3 on - chip drivers/i2c/wacom - register "generic" = "{ - .hid = WCOMNTN2_HID, - .cid = PNP0C50_CID, - .desc = WCOM_TS_DESC, - .irq = IRQ_LEVEL_LOW(GPIO_21_IRQ), - .probed = 1, - .reset_gpio = ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_36), - .reset_delay_ms = 20, - .enable_gpio = ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_152), - .enable_delay_ms = 1, - .has_power_resource = 1, - .disable_gpio_export_in_crs = 1, - }" + chip drivers/i2c/hid + register "generic.hid" = ""WCOMNTN2"" + register "generic.desc" = ""WCOM Touchscreen"" + register "generic.irq" = "IRQ_LEVEL_LOW(GPIO_21_IRQ)" + register "generic.probed" = "1" + register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_36)" + register "generic.reset_delay_ms" = "20" + register "generic.enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_152)" + register "generic.enable_delay_ms" = "1" + register "generic.has_power_resource" = "1" + register "generic.disable_gpio_export_in_crs" = "1" register "hid_desc_reg_offset" = "0x1" device i2c 0xA on end end diff --git a/src/mainboard/google/reef/variants/snappy/devicetree.cb b/src/mainboard/google/reef/variants/snappy/devicetree.cb index c83306d3d1..8d9d307228 100644 --- a/src/mainboard/google/reef/variants/snappy/devicetree.cb +++ b/src/mainboard/google/reef/variants/snappy/devicetree.cb @@ -210,13 +210,10 @@ chip soc/intel/apollolake end end # - I2C 4 device pci 17.1 on - chip drivers/i2c/wacom - register "generic" = "{ - .hid = WCOM50C1_HID, - .cid = PNP0C50_CID, - .desc = WCOM_DT_DESC, - .irq = IRQ_LEVEL_LOW(GPIO_13_IRQ), - }" + chip drivers/i2c/hid + register "generic.hid" = ""WCOM50C1"" + register "generic.desc" = ""WCOM Digitizer"" + register "generic.irq" = "IRQ_LEVEL_LOW(GPIO_13_IRQ)" register "hid_desc_reg_offset" = "0x1" device i2c 0x9 on end end -- cgit v1.2.3