Goodix touchscreen enhancements
Subsystems (4)
v3 cover Goodix touchscreen enhancements
Add several enhancements to the Goodix touchscreen driver:
- write configuration data to the device
- power management support
- ESD
For testing the ACPI changes "ACPI: Translate Linux IRQ number directly from GpioInt" patchset might be needed [1]. This patchset has been merged in the GPIO tree.
This patches are based on Goodix datasheets for GT911 and GT9271 and on Goodix driver gt9xx.c for Android (publicly available in Android kernel trees for various devices). Commit 771d8f1b178e ("Input: goodix - add device tree support") references a set of public datasheets that can be used for reference.
[1] https://lkml.org/lkml/2015/5/6/281
Changes in v3:
- dropped the first 3 patches that got merged
- handle -EPROBE_DEFER and -ENOENT for gpio pins
- skip functionality depending on the gpio pins if the pins are not
properly initialized from ACPI/DT (reset, write config, power management, ESD)
- dropped #ifdef CONFIG_PM_SLEEP and annotated with __maybe_unused instead
- use sysfs property to set ESD timeout instead of ACPI/DT property
- use request_firmware_nowait to read configuration firmware and use defaults
if firmware is not found
- use ACPI IDs to determine the order of the GPIO pins in the ACPI tables
(interrupt pin first or reset pin first)
Changes in v2:
- use request_firmware instead of ACPI/DT property for config
- dropped "input: goodix: add ACPI IDs for GT911 and GT9271" patch
- add ACPI DSDT excerpt in commit message where necessary
- add comments for suspend/resume sleep values
- dropped the checkpatch fixes that did not make sense
- added Bastien's ack to the first patch
Irina Tirdea (5):
Input: goodix - reset device at init
Input: goodix - write configuration data to device
Input: goodix - add power management support
Input: goodix - use goodix_i2c_write_u8 instead of i2c_master_send
Input: goodix - add support for ESD
.../bindings/input/touchscreen/goodix.txt | 5 + drivers/input/touchscreen/goodix.c | 591 +++++++++++++++++++-- 2 files changed, 558 insertions(+), 38 deletions(-)
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v3 1/5 Input: goodix - reset device at init
After power on, it is recommended that the driver resets the device. The reset procedure timing is described in the datasheet and is used at device init (before writing device configuration) and for power management. It is a sequence of setting the interrupt and reset pins high/low at specific timing intervals. This procedure also includes setting the slave address to the one specified in the ACPI/device tree.
This is based on Goodix datasheets for GT911 and GT9271 and on Goodix driver gt9xx.c for Android (publicly available in Android kernel trees for various devices).
For reset the driver needs to control the interrupt and reset gpio pins (configured through ACPI/device tree). For devices that do not have the gpio pins declared, the functionality depending on these pins will not be available, but the device can still be used with basic functionality.
--- .../bindings/input/touchscreen/goodix.txt | 5 + drivers/input/touchscreen/goodix.c | 131 ++++++++++++++++++++- 2 files changed, 134 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/input/touchscreen/goodix.txt +5 -0
@@ -12,6 +12,8 @@ Required properties: - reg : I2C address of the chip. Should be 0x5d or 0x14 - interrupt-parent : Interrupt controller to which the chip is connected - interrupts : Interrupt to which the chip is connected + - gpios : GPIOS the chip is connected to: first one is the + interrupt gpio and second one the reset gpio. Example:
@@ -23,6 +25,9 @@ Example: reg = <0x5d>; interrupt-parent = <&gpio>; interrupts = <0 0>; + + gpios = <&gpio1 0 0>, /* INT */ + <&gpio1 1 0>; /* RST */ }; /* ... */
drivers/input/touchscreen/goodix.c +129 -2
172 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v3 2/5 Input: goodix - write configuration data to device
In reply to Irina TirdeaGoodix devices can be configured by writing custom data to the device at init. The configuration data is read with request_firmware from "goodix_<id>_cfg.bin", where <id> is the product id read from the device (e.g.: goodix_911_cfg.bin for Goodix GT911, goodix_9271_cfg.bin for GT9271).
The configuration information has a specific format described in the Goodix datasheet. It includes X/Y resolution, maximum supported touch points, interrupt flags, various sesitivity factors and settings for advanced features (like gesture recognition).
Before writing the firmware, it is necessary to reset the device. If the device ACPI/DT information does not declare gpio pins (needed for reset), writing the firmware will not be available for these devices.
This is based on Goodix datasheets for GT911 and GT9271 and on Goodix driver gt9xx.c for Android (publicly available in Android kernel trees for various devices).
--- drivers/input/touchscreen/goodix.c | 223 +++++++++++++++++++++++++++++++------ 1 file changed, 191 insertions(+), 32 deletions(-)
drivers/input/touchscreen/goodix.c +191 -32
@@ -24,6 +24,7 @@#include <linux/interrupt.h> #include <linux/slab.h> #include <linux/acpi.h> +#include <linux/firmware.h> #include <linux/gpio.h> #include <linux/of.h> #include <asm/unaligned.h>
@@ -37,6 +38,9 @@ struct goodix_ts_data {unsigned int int_trigger_type;struct gpio_desc *gpiod_int;struct gpio_desc *gpiod_rst; +u16 id; +u16 version; +char *cfg_name; };struct goodix_gpio_data {
@@ -107,6 +111,39 @@ static int goodix_i2c_read(struct i2c_client *client,return ret <0 ? ret : (ret !=ARRAY_SIZE (msgs) ? -EIO :0 ); } +/** +* goodix_i2c_write - write data to a register of the i2c slave device. +* +* @client: i2c device. +* @reg: the register to write to. +* @buf: raw data buffer to write. +* @len: length of the buffer to write +*/ +static int goodix_i2c_write (struct i2c_client *client,u16 reg,const u8 *buf, +unsigned len) +{ +u8 *addr_buf; +struct i2c_msg msg; +int ret; + + addr_buf =kmalloc (len +2 ,GFP_KERNEL ); +if (!addr_buf) +return -ENOMEM ; + + addr_buf[0 ] = reg >>8 ; + addr_buf[1 ] = reg &0xFF ; +memcpy (&addr_buf[2 ], buf, len); + + msg.flags =0 ; + msg.addr = client->addr; + msg.buf = addr_buf; + msg.len = len +2 ; + + ret =i2c_transfer (client->adapter, &msg,1 ); +kfree (addr_buf); +return ret <0 ? ret : (ret !=1 ? -EIO :0 ); +} +static int goodix_ts_read_input_report (struct goodix_ts_data *ts,u8 *data) {int touch_num;
@@ -204,6 +241,73 @@ static irqreturn_t goodix_ts_irq_handler(int irq, void *dev_id)return IRQ_HANDLED ; } +/** +* goodix_check_cfg - Checks if config fw is valid +* +* @ts: goodix_ts_data pointer +* @cfg: firmware config data +*/ +static int goodix_check_cfg (struct goodix_ts_data *ts, +const struct firmware *cfg) +{ +int i, raw_cfg_len; +u8 check_sum =0 ; + +if (cfg->size >GOODIX_CONFIG_MAX_LENGTH ) { +dev_err (&ts->client->dev, +"The length of the config fw is not correct" ); +return -EINVAL ; + } + + raw_cfg_len = cfg->size -2 ; +for (i =0 ; i < raw_cfg_len; i++) + check_sum += cfg->data[i]; + check_sum = (~check_sum) +1 ; +if (check_sum != cfg->data[raw_cfg_len]) { +dev_err (&ts->client->dev, +"The checksum of the config fw is not correct" ); +return -EINVAL ; + } + +if (cfg->data[raw_cfg_len +1 ] !=1 ) { +dev_err (&ts->client->dev, +"Config fw must have Config_Fresh register set" ); +return -EINVAL ; + } + +return 0 ; +} + +/** +* goodix_send_cfg - Write fw config to device +* +* @ts: goodix_ts_data pointer +* @cfg: config firmware to write to device +*/ +static int goodix_send_cfg (struct goodix_ts_data *ts, +const struct firmware *cfg) +{ +int ret; + + ret =goodix_check_cfg (ts, cfg); +if (ret) +return ret; + + ret =goodix_i2c_write (ts->client,GOODIX_REG_CONFIG_DATA , cfg->data, + cfg->size); +if (ret) { +dev_err (&ts->client->dev,"Failed to write config data: %d" , + ret); +return ret; + } +dev_dbg (&ts->client->dev,"Config sent successfully." ); + +/* Let the firmware reconfigure itself, so sleep for 10ms */ +usleep_range (10000 ,11000 ); + +return 0 ; +} +static int goodix_int_sync (struct goodix_ts_data *ts) {int ret;
@@ -342,30 +446,29 @@ static void goodix_read_config(struct goodix_ts_data *ts)/** * goodix_read_version - Read goodix touchscreen version * -* @client: the i2c client -* @version: output buffer containing the version on success -* @id: output buffer containing the id on success +* @ts: our goodix_ts_data pointer */ -static int goodix_read_version (struct i2c_client *client,u16 *version,u16 *id) +static int goodix_read_version (struct goodix_ts_data *ts) {int error;u8 buf[6 ];char id_str[5 ]; - error =goodix_i2c_read (client,GOODIX_REG_ID , buf,sizeof (buf)); + error =goodix_i2c_read (ts->client,GOODIX_REG_ID , buf,sizeof (buf));if (error) { -dev_err (&client->dev,"read version failed: %d\n" , error); +dev_err (&ts->client->dev,"read version failed: %d\n" , error);return error; }memcpy (id_str, buf,4 ); id_str[4 ] =0 ; -if (kstrtou16 (id_str,10 , id)) - *id =0x1001 ; +if (kstrtou16 (id_str,10 , &ts->id)) + ts->id =0x1001 ; - *version =get_unaligned_le16 (&buf[4 ]); + ts->version =get_unaligned_le16 (&buf[4 ]); -dev_info (&client->dev,"ID %d, version: %04x\n" , *id, *version); +dev_info (&ts->client->dev,"ID %d, version: %04x\n" , ts->id, + ts->version);return 0 ; }
@@ -399,13 +502,10 @@ static int goodix_i2c_test(struct i2c_client *client)* goodix_request_input_dev - Allocate, populate and register the input device * * @ts: our goodix_ts_data pointer -* @version: device firmware version -* @id: device ID * * Must be called during probe */ -static int goodix_request_input_dev (struct goodix_ts_data *ts,u16 version, -u16 id) +static int goodix_request_input_dev (struct goodix_ts_data *ts) {int error;
@@ -429,8 +529,8 @@ static int goodix_request_input_dev(struct goodix_ts_data *ts, u16 version, ts->input_dev->phys ="input/ts" ; ts->input_dev->id.bustype =BUS_I2C ; ts->input_dev->id.vendor =0x0416 ; - ts->input_dev->id.product = id; - ts->input_dev->id.version = version; + ts->input_dev->id.product = ts->id; + ts->input_dev->id.version = ts->version; error =input_register_device (ts->input_dev);if (error) {
@@ -442,13 +542,68 @@ static int goodix_request_input_dev(struct goodix_ts_data *ts, u16 version,return 0 ; } +/** +* goodix_configure_dev - Finish device initialization +* +* @ts: our goodix_ts_data pointer +* +* Must be called from request_firmware_wait callback to +* finish initialization of the device. +*/ +static int goodix_configure_dev (struct goodix_ts_data *ts) +{ +int error; +unsigned long irq_flags; + +goodix_read_config (ts); + + error =goodix_request_input_dev (ts); +if (error) +return error; + + irq_flags = goodix_irq_flags[ts->int_trigger_type] |IRQF_ONESHOT ; + error =devm_request_threaded_irq (&ts->client->dev, ts->client->irq, +NULL , goodix_ts_irq_handler, + irq_flags, ts->client->name, ts); +if (error) { +dev_err (&ts->client->dev,"request IRQ failed: %d\n" , error); +return error; + } + +return 0 ; +} + +/** +* goodix_config_cb - Callback to finish device init +* +* @ts: our goodix_ts_data pointer +* +* request_firmware_wait callback that finishes +* initialization of the device. +*/ +static void goodix_config_cb (const struct firmware *cfg,void *ctx) +{ +struct goodix_ts_data *ts = (struct goodix_ts_data *)ctx; +int error; + +if (cfg) { +/* send device configuration to the firmware */ + error =goodix_send_cfg (ts, cfg); +if (error) + goto err_release_cfg; + } +goodix_configure_dev (ts); + +err_release_cfg: +kfree (ts->cfg_name); +release_firmware (cfg); +} +static int goodix_ts_probe (struct i2c_client *client,const struct i2c_device_id *id) {struct goodix_ts_data *ts; -unsigned long irq_flags;int error; -u16 version_info, id_info;dev_dbg (&client->dev,"I2C Address: 0x%02x\n" , client->addr);
@@ -470,7 +625,7 @@ static int goodix_ts_probe(struct i2c_client *client,return error; } - error =goodix_read_version (client, &version_info, &id_info); + error =goodix_read_version (ts);if (error) {dev_err (&client->dev,"Read version failed.\n" );return error;
@@ -487,24 +642,28 @@ static int goodix_ts_probe(struct i2c_client *client,dev_err (&client->dev,"Controller reset failed.\n" );return error; } - } -goodix_read_config (ts); +/* update device config */ + ts->cfg_name =kasprintf (GFP_KERNEL ,"goodix_%d_cfg.bin" , + ts->id); +if (!ts->cfg_name) +return -ENOMEM ; - error =goodix_request_input_dev (ts, version_info, id_info); -if (error) -return error; + error =request_firmware_nowait (THIS_MODULE , true, ts->cfg_name, + &client->dev,GFP_KERNEL , ts, + goodix_config_cb); +if (error) { +dev_err (&client->dev, +"Failed to invoke firmware loader: %d\n" , + error); +kfree (ts->cfg_name); +return error; + } - irq_flags = goodix_irq_flags[ts->int_trigger_type] |IRQF_ONESHOT ; - error =devm_request_threaded_irq (&ts->client->dev, client->irq, -NULL , goodix_ts_irq_handler, - irq_flags, client->name, ts); -if (error) { -dev_err (&client->dev,"request IRQ failed: %d\n" , error); -return error; +return 0 ; } -return 0 ; +return goodix_configure_dev (ts); }static const struct i2c_device_id goodix_ts_id[] = {
Signature · 1 line
1.9.1
PATCH v3 3/5 Input: goodix - add power management support
In reply to Irina TirdeaImplement suspend/resume for goodix driver.
The suspend and resume process uses the gpio pins. If the device ACPI/DT information does not declare gpio pins, suspend/resume will not be available for these devices.
This is based on Goodix datasheets for GT911 and GT9271 and on Goodix driver gt9xx.c for Android (publicly available in Android kernel trees for various devices).
--- drivers/input/touchscreen/goodix.c | 94 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 89 insertions(+), 5 deletions(-)
drivers/input/touchscreen/goodix.c +89 -5
@@ -41,6 +41,7 @@ struct goodix_ts_data {u16 id;u16 version;char *cfg_name; +unsigned long irq_flags; };struct goodix_gpio_data {
@@ -57,6 +58,9 @@ struct goodix_gpio_data {#define GOODIX_CONFIG_MAX_LENGTH 240/* Register defines */ +#define GOODIX_REG_COMMAND 0x8040 +#define GOODIX_CMD_SCREEN_OFF 0x05 +#define GOODIX_READ_COOR_ADDR 0x814E#define GOODIX_REG_CONFIG_DATA 0x8047#define GOODIX_REG_ID 0x8140
@@ -144,6 +148,11 @@ static int goodix_i2c_write(struct i2c_client *client, u16 reg, const u8 *buf,return ret <0 ? ret : (ret !=1 ? -EIO :0 ); } +static int goodix_i2c_write_u8 (struct i2c_client *client,u16 reg,u8 value) +{ +return goodix_i2c_write (client, reg, &value,sizeof (value)); +} +static int goodix_ts_read_input_report (struct goodix_ts_data *ts,u8 *data) {int touch_num;
@@ -241,6 +250,18 @@ static irqreturn_t goodix_ts_irq_handler(int irq, void *dev_id)return IRQ_HANDLED ; } +static void goodix_free_irq (struct goodix_ts_data *ts) +{ +devm_free_irq (&ts->client->dev, ts->client->irq, ts); +} + +static int goodix_request_irq (struct goodix_ts_data *ts) +{ +return devm_request_threaded_irq (&ts->client->dev, ts->client->irq, +NULL , goodix_ts_irq_handler, + ts->irq_flags, ts->client->name, ts); +} +/** * goodix_check_cfg - Checks if config fw is valid *
@@ -553,7 +574,6 @@ static int goodix_request_input_dev(struct goodix_ts_data *ts)static int goodix_configure_dev (struct goodix_ts_data *ts) {int error; -unsigned long irq_flags;goodix_read_config (ts);
@@ -561,10 +581,8 @@ static int goodix_configure_dev(struct goodix_ts_data *ts)if (error)return error; - irq_flags = goodix_irq_flags[ts->int_trigger_type] |IRQF_ONESHOT ; - error =devm_request_threaded_irq (&ts->client->dev, ts->client->irq, -NULL , goodix_ts_irq_handler, - irq_flags, ts->client->name, ts); + ts->irq_flags = goodix_irq_flags[ts->int_trigger_type] |IRQF_ONESHOT ; + error =goodix_request_irq (ts);if (error) {dev_err (&ts->client->dev,"request IRQ failed: %d\n" , error);return error;
@@ -666,6 +684,71 @@ static int goodix_ts_probe(struct i2c_client *client,return goodix_configure_dev (ts); } +static int __maybe_unused goodix_suspend (struct device *dev) +{ +struct i2c_client *client =to_i2c_client (dev); +struct goodix_ts_data *ts =i2c_get_clientdata (client); +int ret; + +/* We need gpio pins to suspend/resume */ +if (!ts->gpiod_int || !ts->gpiod_rst) +return 0 ; + +/* Free IRQ as IRQ pin is used as output in the suspend sequence */ +goodix_free_irq (ts); +/* Output LOW on the INT pin for 5 ms */ + ret =gpiod_direction_output (ts->gpiod_int,0 ); +if (ret) { +goodix_request_irq (ts); +return ret; + } +usleep_range (5000 ,6000 ); + + ret =goodix_i2c_write_u8 (ts->client,GOODIX_REG_COMMAND , +GOODIX_CMD_SCREEN_OFF ); +if (ret) { +dev_err (&ts->client->dev,"Screen off command failed\n" ); +gpiod_direction_input (ts->gpiod_int); +goodix_request_irq (ts); +return -EAGAIN ; + } + +/* +* The datasheet specifies that the interval between sending screen-off +* command and wake-up should be longer than 58 ms. To avoid waking up +* sooner, delay 58ms here. +*/ +msleep (58 ); +return 0 ; +} + +static int __maybe_unused goodix_resume (struct device *dev) +{ +struct i2c_client *client =to_i2c_client (dev); +struct goodix_ts_data *ts =i2c_get_clientdata (client); +int ret; + +if (!ts->gpiod_int || !ts->gpiod_rst) +return 0 ; + +/* +* Exit sleep mode by outputting HIGH level to INT pin +* for 2ms~5ms. +*/ + ret =gpiod_direction_output (ts->gpiod_int,1 ); +if (ret) +return ret; +usleep_range (2000 ,5000 ); + + ret =goodix_int_sync (ts); +if (ret) +return ret; + +return goodix_request_irq (ts); +} + +static SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume); +static const struct i2c_device_id goodix_ts_id[] = { {"GDIX1001:00" , (kernel_ulong_t)&goodix_gpio_rst_irq }, { }
@@ -701,6 +784,7 @@ static struct i2c_driver goodix_ts_driver = { .owner = THIS_MODULE, .acpi_match_table = ACPI_PTR(goodix_acpi_match), .of_match_table = of_match_ptr(goodix_of_match), + .pm = &goodix_pm_ops, }, };module_i2c_driver (goodix_ts_driver);
Signature · 1 line
1.9.1
PATCH v3 4/5 Input: goodix - use goodix_i2c_write_u8 instead of i2c_master_send
In reply to Irina TirdeaUse goodix_i2c_write_u8 instead of i2c_master_send to simplify code.
--- drivers/input/touchscreen/goodix.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/input/touchscreen/goodix.c +1 -6
@@ -235,16 +235,11 @@ static void goodix_process_events(struct goodix_ts_data *ts)*/ static irqreturn_t goodix_ts_irq_handler (int irq,void *dev_id) { -static const u8 end_cmd[] = { -GOODIX_READ_COOR_ADDR >>8 , -GOODIX_READ_COOR_ADDR &0xff , -0 - };struct goodix_ts_data *ts = dev_id;goodix_process_events (ts); -if (i2c_master_send (ts->client, end_cmd,sizeof (end_cmd)) <0 ) +if (goodix_i2c_write_u8 (ts->client,GOODIX_READ_COOR_ADDR ,0 ) <0 )dev_err (&ts->client->dev,"I2C write end_cmd error\n" );return IRQ_HANDLED ;
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v3 5/5 Input: goodix - add support for ESD
In reply to Irina TirdeaAdd ESD (Electrostatic Discharge) protection mechanism.
The driver enables ESD protection in HW and checks a register to determine if ESD occurred. If ESD is signalled by the HW, the driver will reset the device.
The ESD poll time (in ms) can be set through the sysfs property esd_timeout. If it is set to 0, ESD protection is disabled. Recommended value is 2000 ms. By default, at init ESD protection is disabled.
The ESD protection mechanism is only available if the gpio pins are properly initialized from ACPI/DT.
This is based on Goodix datasheets for GT911 and GT9271 and on Goodix driver gt9xx.c for Android (publicly available in Android kernel trees for various devices).
--- drivers/input/touchscreen/goodix.c | 162 +++++++++++++++++++++++++++++++++++-- 1 file changed, 156 insertions(+), 6 deletions(-)
drivers/input/touchscreen/goodix.c +156 -6
@@ -42,6 +42,8 @@ struct goodix_ts_data {u16 version;char *cfg_name;unsigned long irq_flags; +atomic_t esd_timeout; +struct delayed_work esd_work; };struct goodix_gpio_data {
@@ -60,6 +62,8 @@ struct goodix_gpio_data {/* Register defines */ #define GOODIX_REG_COMMAND 0x8040#define GOODIX_CMD_SCREEN_OFF 0x05 +#define GOODIX_CMD_ESD_ENABLED 0xAA +#define GOODIX_REG_ESD_CHECK 0x8041#define GOODIX_READ_COOR_ADDR 0x814E#define GOODIX_REG_CONFIG_DATA 0x8047
@@ -366,6 +370,117 @@ static int goodix_reset(struct goodix_ts_data *ts)return goodix_int_sync (ts); } +static void goodix_disable_esd (struct goodix_ts_data *ts) +{ +if (!atomic_read (&ts->esd_timeout)) +return ; +cancel_delayed_work_sync (&ts->esd_work); +} + +static int goodix_enable_esd (struct goodix_ts_data *ts) +{ +int ret, esd_timeout; + + esd_timeout =atomic_read (&ts->esd_timeout); +if (!esd_timeout) +return 0 ; + + ret =goodix_i2c_write_u8 (ts->client,GOODIX_REG_ESD_CHECK , +GOODIX_CMD_ESD_ENABLED ); +if (ret) { +dev_err (&ts->client->dev,"Failed to enable ESD: %d\n" , ret); +return ret; + } + +schedule_delayed_work (&ts->esd_work,round_jiffies_relative ( +msecs_to_jiffies (esd_timeout))); +return 0 ; +} + +static void goodix_esd_work (struct work_struct *work) +{ + struct goodix_ts_data *ts = container_of(work, struct goodix_ts_data, + esd_work.work); +int retries =3 , ret; +u8 esd_data[2 ]; +const struct firmware *cfg =NULL ; + +while (--retries) { + ret =goodix_i2c_read (ts->client,GOODIX_REG_COMMAND , esd_data, +sizeof (esd_data)); +if (ret) +continue ; +if (esd_data[0 ] !=GOODIX_CMD_ESD_ENABLED && + esd_data[1 ] ==GOODIX_CMD_ESD_ENABLED ) { +/* feed the watchdog */ +goodix_i2c_write_u8 (ts->client, +GOODIX_REG_COMMAND , +GOODIX_CMD_ESD_ENABLED ); +break ; + } + } + +if (!retries) { +dev_dbg (&ts->client->dev,"Performing ESD recovery.\n" ); +goodix_free_irq (ts); +goodix_reset (ts); + ret =request_firmware (&cfg, ts->cfg_name, &ts->client->dev); +if (!ret) { +goodix_send_cfg (ts, cfg); +release_firmware (cfg); + } +goodix_request_irq (ts); +goodix_enable_esd (ts); +return ; + } + +schedule_delayed_work (&ts->esd_work,round_jiffies_relative ( +msecs_to_jiffies (atomic_read (&ts->esd_timeout)))); +} + +static ssize_t goodix_esd_timeout_show (struct device *dev, +struct device_attribute *attr,char *buf) +{ +struct goodix_ts_data *ts =dev_get_drvdata (dev); + +return scnprintf (buf,PAGE_SIZE ,"%d\n" ,atomic_read (&ts->esd_timeout)); +} + +static ssize_t goodix_esd_timeout_store (struct device *dev, +struct device_attribute *attr, +const char *buf,size_t count) +{ +struct goodix_ts_data *ts =dev_get_drvdata (dev); +int ret, esd_timeout, new_esd_timeout; + + ret =kstrtouint (buf,10 , &new_esd_timeout); +if (ret) +return ret; + + esd_timeout =atomic_read (&ts->esd_timeout); +if (esd_timeout && !new_esd_timeout) +goodix_disable_esd (ts); + +atomic_set (&ts->esd_timeout, new_esd_timeout); +if (!esd_timeout && new_esd_timeout) +goodix_enable_esd (ts); + +return count; +} + +/* ESD timeout in ms. Default disabled (0). Recommended 2000 ms. */ +static DEVICE_ATTR(esd_timeout, S_IRUGO | S_IWUSR, goodix_esd_timeout_show, + goodix_esd_timeout_store); + +static struct attribute *goodix_attrs[] = { + &dev_attr_esd_timeout.attr, +NULL +}; + +static const struct attribute_group goodix_attr_group = { + .attrs = goodix_attrs, +}; +/** * goodix_get_gpio_config - Get GPIO config from ACPI/DT *
@@ -608,7 +723,6 @@ static void goodix_config_cb(const struct firmware *cfg, void *ctx)goodix_configure_dev (ts); err_release_cfg: -kfree (ts->cfg_name);release_firmware (cfg); }
@@ -631,6 +745,7 @@ static int goodix_ts_probe(struct i2c_client *client, ts->client = client;i2c_set_clientdata (client, ts); +INIT_DELAYED_WORK (&ts->esd_work, goodix_esd_work); error =goodix_i2c_test (client);if (error) {
@@ -656,11 +771,22 @@ static int goodix_ts_probe(struct i2c_client *client,return error; } + error =sysfs_create_group (&client->dev.kobj, + &goodix_attr_group); +if (error) { +dev_err (&client->dev, +"Failed to create sysfs group: %d\n" , + error); +return error; + } +/* update device config */ ts->cfg_name =kasprintf (GFP_KERNEL ,"goodix_%d_cfg.bin" , ts->id); -if (!ts->cfg_name) -return -ENOMEM ; +if (!ts->cfg_name) { + error = -ENOMEM ; + goto err_sysfs_remove_group; + } error = request_firmware_nowait(THIS_MODULE, true, ts->cfg_name, &client->dev, GFP_KERNEL, ts,
@@ -669,14 +795,32 @@ static int goodix_ts_probe(struct i2c_client *client,dev_err (&client->dev,"Failed to invoke firmware loader: %d\n" , error); -kfree (ts->cfg_name); -return error; + goto err_free_cfg_name; }return 0 ; }return goodix_configure_dev (ts); + +err_free_cfg_name: +if (ts->gpiod_int && ts->gpiod_rst) +kfree (ts->cfg_name); +err_sysfs_remove_group: +if (ts->gpiod_int && ts->gpiod_rst) +sysfs_remove_group (&client->dev.kobj, &goodix_attr_group); +return error; +} + +static int goodix_ts_remove (struct i2c_client *client) +{ +struct goodix_ts_data *ts =i2c_get_clientdata (client); + +if (ts->gpiod_int && ts->gpiod_rst) +sysfs_remove_group (&client->dev.kobj, &goodix_attr_group); +goodix_disable_esd (ts); +kfree (ts->cfg_name); +return 0 ; }static int __maybe_unused goodix_suspend (struct device *dev)
@@ -689,6 +833,7 @@ static int __maybe_unused goodix_suspend(struct device *dev)if (!ts->gpiod_int || !ts->gpiod_rst)return 0 ; +goodix_disable_esd (ts);/* Free IRQ as IRQ pin is used as output in the suspend sequence */ goodix_free_irq (ts);/* Output LOW on the INT pin for 5 ms */
@@ -739,7 +884,11 @@ static int __maybe_unused goodix_resume(struct device *dev)if (ret)return ret; -return goodix_request_irq (ts); + ret =goodix_request_irq (ts); +if (ret) +return ret; + +return goodix_enable_esd (ts); } static SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume);
@@ -773,6 +922,7 @@ MODULE_DEVICE_TABLE(of, goodix_of_match);static struct i2c_driver goodix_ts_driver = { .probe = goodix_ts_probe, + .remove = goodix_ts_remove, .id_table = goodix_ts_id, .driver = { .name ="Goodix-TS" ,
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 3/5] Input: goodix - add power management support
In reply to Irina TirdeaQuoted 9 lines · Irina Tirdea
Implement suspend/resume for goodix driver.
The suspend and resume process uses the gpio pins. If the device ACPI/DT information does not declare gpio pins, suspend/resume will not be available for these devices.
This is based on Goodix datasheets for GT911 and GT9271 and on Goodix driver
gt9xx.cfor Android (publicly available in Android kernel trees for various devices).
How can I functionally test this?
Re: [PATCH v3 1/5] Input: goodix - reset device at init
In reply to Irina TirdeaQuoted 12 lines · Irina Tirdea
After power on, it is recommended that the driver resets the device. The reset procedure timing is described in the datasheet and is used at device init (before writing device configuration) and for power management. It is a sequence of setting the interrupt and reset pins high/low at specific timing intervals. This procedure also includes setting the slave address to the one specified in the ACPI/device tree.
This is based on Goodix datasheets for GT911 and GT9271 and on Goodix driver
gt9xx.cfor Android (publicly available in Android kernel trees for various devices).
Quoted 5 lines
For reset the driver needs to control the interrupt and reset gpio pins (configured through ACPI/device tree). For devices that do not have the gpio pins declared, the functionality depending on these pins will not be available, but the device can still be used with basic functionality.
I'm having a little trouble with this first patch, on a 4.2 "pre" Linus tree and on a 4.1 kernel.
[ 6.720214] ------------[ cut here ]------------ [ 6.720230] WARNING: CPU: 2 PID: 475 at drivers/pinctrl/intel/pinctrl-baytrail.c:338 byt_gpio_direction_output+0x97/0xa0() [ 6.720234] Potential Error: Setting GPIO with direct_irq_en to output [ 6.720238] Modules linked in: [ 6.720241] regmap_i2c intel_soc_dts_iosf int340x_thermal_zone soundcore industrialio battery iosf_mbi acpi_thermal_rel dell_smo8800 snd_soc_sst_acpi goodix_backport(OE+) i2c_hid acpi_pad ac rfkill_gpio i2c_designware_platform rfkill pwm_lpss_platform pwm_lpss i2c_designware_core nfsd auth_rpcgss nfs_acl lockd grace sunrpc i915 mmc_block i2c_algo_bit drm_kms_helper drm video sdhci_acpi sdhci mmc_core [ 6.720292] CPU: 2 PID: 475 Comm: systemd-udevd Tainted: G W OE 4.2.0-0.rc0.git2.2.fc22.i686 #1 [ 6.720295] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014 [ 6.720299] c0d39967 11197204 00000000 f6d37bc8 c0a9ce3c f6d37c08 f6d37bf8 c045c677 [ 6.720311] c0cb62a4 f6d37c28 000001db c0cb62e0 00000152 c073bfc7 c073bfc7 f7c580b8 [ 6.720321] f441409c f7c580b0 f6d37c14 c045c6ee 00000009 f6d37c08 c0cb62a4 f6d37c28 [ 6.720331] Call Trace: [ 6.720342] [<c0a9ce3c>] dump_stack+0x41/0x52 [ 6.720349] [<c045c677>] warn_slowpath_common+0x87/0xc0 [ 6.720355] [<c073bfc7>] ? byt_gpio_direction_output+0x97/0xa0 [ 6.720360] [<c073bfc7>] ? byt_gpio_direction_output+0x97/0xa0 [ 6.720365] [<c045c6ee>] warn_slowpath_fmt+0x3e/0x60 [ 6.720370] [<c073bfc7>] byt_gpio_direction_output+0x97/0xa0 [ 6.720376] [<c073bf30>] ? byt_gpio_irq_handler+0xc0/0xc0 [ 6.720382] [<c073e939>] _gpiod_direction_output_raw+0x59/0x1c0 [ 6.720388] [<c0aa202d>] ? _raw_spin_unlock_irqrestore+0xd/0x10 [ 6.720393] [<c073bb73>] ? byt_gpio_direction_input+0x43/0x50 [ 6.720398] [<c073bb30>] ? byt_gpio_set+0x70/0x70 [ 6.720404] [<c073eb0a>] gpiod_direction_output+0x2a/0x50 [ 6.720413] [<f7fe768b>] goodix_ts_probe+0x2fb/0x5fd [goodix_backport] [ 6.720422] [<c0909691>] i2c_device_probe+0x101/0x1b0 [ 6.720428] [<c0612e95>] ? sysfs_create_link+0x25/0x50 [ 6.720436] [<f7fe7390>] ? goodix_ts_irq_handler+0x1f0/0x1f0 [goodix_backport] [ 6.720442] [<c0819c52>] ? driver_sysfs_add+0x62/0x80 [ 6.720448] [<c081a56a>] driver_probe_device+0x1ca/0x460 [ 6.720454] [<c081a800>] ? driver_probe_device+0x460/0x460 [ 6.720461] [<c078d0b1>] ? acpi_driver_match_device+0x36/0x3f [ 6.720467] [<c081a879>] __driver_attach+0x79/0x80 [ 6.720473] [<c081a800>] ? driver_probe_device+0x460/0x460 [ 6.720478] [<c0818467>] bus_for_each_dev+0x57/0xa0 [ 6.720484] [<c0819dfe>] driver_attach+0x1e/0x20 [ 6.720489] [<c081a800>] ? driver_probe_device+0x460/0x460 [ 6.720494] [<c08199bf>] bus_add_driver+0x1ef/0x290 [ 6.720501] [<f7ca7000>] ? 0xf7ca7000 [ 6.720506] [<f7ca7000>] ? 0xf7ca7000 [ 6.720512] [<c081b07d>] driver_register+0x5d/0xf0 [ 6.720518] [<c090a3ca>] i2c_register_driver+0x2a/0xa0 [ 6.720524] [<c040046f>] ? do_one_initcall+0x9f/0x200 [ 6.720531] [<f7ca7012>] goodix_ts_driver_init+0x12/0x1000 [goodix_backport] [ 6.720536] [<c040047a>] do_one_initcall+0xaa/0x200 [ 6.720541] [<f7ca7000>] ? 0xf7ca7000 [ 6.720547] [<c05801c8>] ? free_vmap_area_noflush+0x38/0x80 [ 6.720554] [<c0594b95>] ? kmem_cache_alloc_trace+0x175/0x1f0 [ 6.720560] [<c0a9c64f>] ? do_init_module+0x21/0x1a1 [ 6.720565] [<c0a9c64f>] ? do_init_module+0x21/0x1a1 [ 6.720572] [<c0a9c67e>] do_init_module+0x50/0x1a1 [ 6.720578] [<c04d917b>] load_module+0x1ceb/0x22f0 [ 6.720585] [<c04d6159>] ? copy_module_from_fd.isra.47+0xf9/0x190 [ 6.720592] [<c04d99a5>] SyS_finit_module+0xa5/0xf0 [ 6.720598] [<c056490b>] ? vm_mmap_pgoff+0x9b/0xc0 [ 6.720605] [<c0aa26df>] sysenter_do_call+0x12/0x12 [ 6.720610] ---[ end trace d5183b3e60f0f675 ]---
RE: [PATCH v3 1/5] Input: goodix - reset device at init
Quoted 83 lines
-----Original Message-----
From: Bastien Nocera [mailto:[email protected]]
Sent: 30 June, 2015 18:57
To: Tirdea, Irina; Dmitry Torokhov; Mark Rutland; [email protected]; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at initQuoted 12 lines · Irina Tirdea
After power on, it is recommended that the driver resets the device. The reset procedure timing is described in the datasheet and is used at device init (before writing device configuration) and for power management. It is a sequence of setting the interrupt and reset pins high/low at specific timing intervals. This procedure also includes setting the slave address to the one specified in the ACPI/device tree.
This is based on Goodix datasheets for GT911 and GT9271 and on Goodix driver
gt9xx.cfor Android (publicly available in Android kernel trees for various devices).Quoted 5 lines
For reset the driver needs to control the interrupt and reset gpio pins (configured through ACPI/device tree). For devices that do not have the gpio pins declared, the functionality depending on these pins will not be available, but the device can still be used with basic functionality.
I'm having a little trouble with this first patch, on a 4.2 "pre" Linus tree and on a 4.1 kernel.
[ 6.720214] ------------[ cut here ]------------ [ 6.720230] WARNING: CPU: 2 PID: 475 at drivers/pinctrl/intel/pinctrl-baytrail.c:338 byt_gpio_direction_output+0x97/0xa0() [ 6.720234] Potential Error: Setting GPIO with direct_irq_en to output [ 6.720238] Modules linked in: [ 6.720241] regmap_i2c intel_soc_dts_iosf int340x_thermal_zone soundcore industrialio battery iosf_mbi acpi_thermal_rel dell_smo8800 snd_soc_sst_acpi goodix_backport(OE+) i2c_hid acpi_pad ac rfkill_gpio i2c_designware_platform rfkill pwm_lpss_platform pwm_lpss i2c_designware_core nfsd auth_rpcgss nfs_acl lockd grace sunrpc i915 mmc_block i2c_algo_bit drm_kms_helper drm video sdhci_acpi sdhci mmc_core [ 6.720292] CPU: 2 PID: 475 Comm: systemd-udevd Tainted: G W OE 4.2.0-0.rc0.git2.2.fc22.i686 #1 [ 6.720295] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014 [ 6.720299] c0d39967 11197204 00000000 f6d37bc8 c0a9ce3c f6d37c08 f6d37bf8 c045c677 [ 6.720311] c0cb62a4 f6d37c28 000001db c0cb62e0 00000152 c073bfc7 c073bfc7 f7c580b8 [ 6.720321] f441409c f7c580b0 f6d37c14 c045c6ee 00000009 f6d37c08 c0cb62a4 f6d37c28 [ 6.720331] Call Trace: [ 6.720342] [<c0a9ce3c>] dump_stack+0x41/0x52 [ 6.720349] [<c045c677>] warn_slowpath_common+0x87/0xc0 [ 6.720355] [<c073bfc7>] ? byt_gpio_direction_output+0x97/0xa0 [ 6.720360] [<c073bfc7>] ? byt_gpio_direction_output+0x97/0xa0 [ 6.720365] [<c045c6ee>] warn_slowpath_fmt+0x3e/0x60 [ 6.720370] [<c073bfc7>] byt_gpio_direction_output+0x97/0xa0 [ 6.720376] [<c073bf30>] ? byt_gpio_irq_handler+0xc0/0xc0 [ 6.720382] [<c073e939>] _gpiod_direction_output_raw+0x59/0x1c0 [ 6.720388] [<c0aa202d>] ? _raw_spin_unlock_irqrestore+0xd/0x10 [ 6.720393] [<c073bb73>] ? byt_gpio_direction_input+0x43/0x50 [ 6.720398] [<c073bb30>] ? byt_gpio_set+0x70/0x70 [ 6.720404] [<c073eb0a>] gpiod_direction_output+0x2a/0x50 [ 6.720413] [<f7fe768b>] goodix_ts_probe+0x2fb/0x5fd [goodix_backport] [ 6.720422] [<c0909691>] i2c_device_probe+0x101/0x1b0 [ 6.720428] [<c0612e95>] ? sysfs_create_link+0x25/0x50 [ 6.720436] [<f7fe7390>] ? goodix_ts_irq_handler+0x1f0/0x1f0 [goodix_backport] [ 6.720442] [<c0819c52>] ? driver_sysfs_add+0x62/0x80 [ 6.720448] [<c081a56a>] driver_probe_device+0x1ca/0x460 [ 6.720454] [<c081a800>] ? driver_probe_device+0x460/0x460 [ 6.720461] [<c078d0b1>] ? acpi_driver_match_device+0x36/0x3f [ 6.720467] [<c081a879>] __driver_attach+0x79/0x80 [ 6.720473] [<c081a800>] ? driver_probe_device+0x460/0x460 [ 6.720478] [<c0818467>] bus_for_each_dev+0x57/0xa0 [ 6.720484] [<c0819dfe>] driver_attach+0x1e/0x20 [ 6.720489] [<c081a800>] ? driver_probe_device+0x460/0x460 [ 6.720494] [<c08199bf>] bus_add_driver+0x1ef/0x290 [ 6.720501] [<f7ca7000>] ? 0xf7ca7000 [ 6.720506] [<f7ca7000>] ? 0xf7ca7000 [ 6.720512] [<c081b07d>] driver_register+0x5d/0xf0 [ 6.720518] [<c090a3ca>] i2c_register_driver+0x2a/0xa0 [ 6.720524] [<c040046f>] ? do_one_initcall+0x9f/0x200 [ 6.720531] [<f7ca7012>] goodix_ts_driver_init+0x12/0x1000 [goodix_backport] [ 6.720536] [<c040047a>] do_one_initcall+0xaa/0x200 [ 6.720541] [<f7ca7000>] ? 0xf7ca7000 [ 6.720547] [<c05801c8>] ? free_vmap_area_noflush+0x38/0x80 [ 6.720554] [<c0594b95>] ? kmem_cache_alloc_trace+0x175/0x1f0 [ 6.720560] [<c0a9c64f>] ? do_init_module+0x21/0x1a1
Quoted 8 lines
[ 6.720565] [<c0a9c64f>] ? do_init_module+0x21/0x1a1 [ 6.720572] [<c0a9c67e>] do_init_module+0x50/0x1a1 [ 6.720578] [<c04d917b>] load_module+0x1ceb/0x22f0 [ 6.720585] [<c04d6159>] ? copy_module_from_fd.isra.47+0xf9/0x190 [ 6.720592] [<c04d99a5>] SyS_finit_module+0xa5/0xf0 [ 6.720598] [<c056490b>] ? vm_mmap_pgoff+0x9b/0xc0 [ 6.720605] [<c0aa26df>] sysenter_do_call+0x12/0x12 [ 6.720610] ---[ end trace d5183b3e60f0f675 ]---
Hi Bastien,
I've been looking into the warning you mentioned above.
All the Goodix patches in this series must use the interrupt pin as output:
the functionality implemented depends on this, as specified in the Goodix datasheet (functionality includes reset, writing configuration, power management, ESD protection). The Baytrail pinctrl driver prints some warnings when pins marked with the DIRECT_IRQ flag are used as output [1] [2]. This flag is set by the BIOS and could indicate an actual HW problem or a buggy BIOS. I am actually testing these changes on a Baytrail platform that has the same pinctrl driver, but did not run into this problem.
As far as I can tell, the only way to find out if it is a HW or a BIOS problem is to test if using the interrupt pin as output actually works (by testing the functionality that directly depends on it).
I think we have two options here.
1. I could remove the new functionality for your platforms. Unfortunately this would mean none of the new features will be available on your devices, but that will get rid of the warning entirely.
2. I can send some additional patches that will simplify testing the configuration update to the Goodix device. I think this feature is the easiest to test so we can determine if writing to the interrupt pin actually works. However, even if it is a BIOS problem and the code will work, the warning will still be printed in dmesg.
What do you think?
Thanks,
Irina
[1] https://lkml.org/lkml/2014/6/2/654
[2] https://lkml.org/lkml/2014/9/18/129
RE: [PATCH v3 3/5] Input: goodix - add power management support
In reply to Bastien NoceraQuoted 16 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bastien Nocera
Sent: 30 June, 2015 18:56
To: Tirdea, Irina; Dmitry Torokhov; Mark Rutland; [email protected]; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian
Subject: Re: [PATCH v3 3/5] Input: goodix - add power management supportQuoted 6 lines · Irina Tirdea
Implement suspend/resume for goodix driver.
The suspend and resume process uses the gpio pins. If the device ACPI/DT information does not declare gpio pins, suspend/resume will not be available for these devices.
Quoted 5 lines
Quoted 3 lines
This is based on Goodix datasheets for GT911 and GT9271 and on Goodix driver
gt9xx.cfor Android (publicly available in Android kernel trees for various devices).How can I functionally test this?
We are testing the power management feature by putting the system in suspend and measuring the power consumed by the touchscreen using HW measurement tools.
I can send a set of patches that export an interface to put the touchscreen into suspend from sysfs (something similar to what ads7846 has). In this way you can test what happens to the touchscreen alone without putting the entire system into suspend.
When suspending the device you will see that there are no events received from the touchscreen (the interrupt is unregistered before suspending the device). To actually check that the device has been suspended and is not consuming power you need to measure the power consumed by the touchscreen. To do that entirely from software, you could compare the power consumed by the battery when the touchscreen is powered on with the power consumed by the battery when the touchscreen is powered off (batteries export interfaces in sysfs that can be used for that). The difference should match the device specifications. I am doing some tests to see how that works, but I am not getting the expected results so far (seems there are other components that affect the measurements). I will look more into this and come back with details if you think this would work for you.
Thanks,
Irina
Quoted 4 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 1/5] Input: goodix - reset device at init
In reply to Tirdea, IrinaQuoted 8 lines · Irina
I can send some additional patches that will simplify testing the configuration update to the Goodix device. I think this feature is the easiest
to test so we can determine if writing to the interrupt pin actually works.
However, even if it is a BIOS problem and the code will work, the warning
will still be printed in dmesg.
Somehow missed this mail before replying to the current patchset. I'd be fine with that, though it's still not clear to me whether the BIOS/hardware is at fault, or the code that's being added to the driver ;)
Cheers
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v3 1/5] Input: goodix - reset device at init
Quoted 21 lines
-----Original Message-----
From: Bastien Nocera [mailto:[email protected]]
Sent: 09 September, 2015 20:03
To: Tirdea, Irina; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark Rutland; [email protected]
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at initQuoted 8 lines · Irina
I can send some additional patches that will simplify testing the configuration update to the Goodix device. I think this feature is the easiest
to test so we can determine if writing to the interrupt pin actually works.
However, even if it is a BIOS problem and the code will work, the warning
will still be printed in dmesg.
Quoted 5 lines
Somehow missed this mail before replying to the current patchset. I'd be fine with that, though it's still not clear to me whether the BIOS/hardware is at fault, or the code that's being added to the driver ;)
The reset procedure is described in the Goodix GT911 datasheet [1] and is used for power-on reset and power management. The power-on sequence is described in chapter 6.1. I2C Timing, in the Power-on Timing diagram. The sequence for putting the device to sleep is described in chapter 7.1. Operating Modes, c) Sleep mode. These sequences use the interrupt pin as output.
The warning you mentioned comes from the following code in the goodix driver, which sets the interrupt to be used as output:
+ error = gpiod_direction_output(ts->gpiod_int, ts->client->addr == 0x14);
The gpiod_direction_output() call ends up in drivers/pinctrl/intel/pinctrl-baytrail.c:
/*
* Before making any direction modifications, do a check if gpio
* is set for direct IRQ. On baytrail, setting GPIO to output does
* not make sense, so let's at least warn the caller before they shoot
* themselves in the foot.
*/
WARN(readl(conf_reg) & BYT_DIRECT_IRQ_EN,
"Potential Error: Setting GPIO with direct_irq_en to output");
So the problem comes from using the gpio interrupt pin as output, which should not work on Baytrail if BYT_DIRECT_IRQ_EN is set by BIOS. The above warning is introduced and discussed in [2] and [3]. As I mentioned, this could be a real HW issue or the BIOS sets BYT_DIRECT_IRQ_EN when it should not. I have also tested these patches on a Baytrail plarform (that uses the same pinctrl driver), but I did not see any issues since BYT_DIRECT_IRQ_EN is not set in my case for the interrupt gpio pin.
To determine if using the interrupt pin as output works, you can test updating the goodix configuration [4]. Normally if something goes wrong with the reset procedure, the configuration will not be updated. To make that easier, I have already included a sysfs interface to dump the current configuration [5] and a script to help generate a new configuration [6] (with details on how to use it in the commit message). Please let me know if you need something more to test this.
Thanks,
Irina
[1] https://drive.google.com/a/intel.com/folderview?id=0BxCVOQS3ZymGfmJyY2RKbE5XbVlKNlktVTlwV0lxNEdxd2dzeWZER094cmJPVnMxN1F0Yzg
[2] https://lkml.org/lkml/2014/6/2/654
[3] https://lkml.org/lkml/2014/9/18/129
[4] https://lkml.org/lkml/2015/9/7/339
[5] https://lkml.org/lkml/2015/9/7/337
[6] https://lkml.org/lkml/2015/7/31/706
Re: [PATCH v3 1/5] Input: goodix - reset device at init
Quoted 59 lines · Irina
Quoted 23 lines
-----Original Message-----
From: Bastien Nocera [mailto:[email protected]]
Sent: 09 September, 2015 20:03
To: Tirdea, Irina; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark Rutland; [email protected]
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at initQuoted 10 lines · Irina
I can send some additional patches that will simplify testing the configuration update to the Goodix device. I think this feature is
the easiest
to test so we can determine if writing to the interrupt pin actually
works.
However, even if it is a BIOS problem and the code will work, the warning
will still be printed in dmesg.Quoted 7 lines
Somehow missed this mail before replying to the current patchset. I'd
be fine with that, though it's still not clear to me whether the BIOS/hardware is at fault, or the code that's being added to the driver
;)The reset procedure is described in the Goodix GT911 datasheet [1] and is
used for power-on reset and power management. The power-on sequence is described in chapter 6.1. I2C Timing, in the Power-on Timing diagram.
The sequence for putting the device to sleep is described in chapter 7.1. Operating Modes, c) Sleep mode. These sequences use the interrupt
pin as output.The warning you mentioned comes from the following code in the goodix driver, which sets the interrupt to be used as output:
+ error = gpiod_direction_output(ts->gpiod_int, ts->client-
Quoted 1 line
addr ==
0x14);The
gpiod_direction_output()call ends up indrivers/pinctrl/intel/pinctrl-baytrail.c:
/*
* Before making any direction modifications, do a check if gpio
* is set for direct IRQ. On baytrail, setting GPIO to output does
* not make sense, so let's at least warn the caller before they shoot
* themselves in the foot.
*/
WARN(readl(conf_reg) &BYT_DIRECT_IRQ_EN,"Potential Error: Setting GPIO with direct_irq_en to output");
Quoted 11 lines
So the problem comes from using the gpio interrupt pin as output, which
should not work on Baytrail ifBYT_DIRECT_IRQ_ENis set by BIOS. The above warning is introduced and discussed in [2] and [3]. As I mentioned,
this could be a real HW issue or the BIOS setsBYT_DIRECT_IRQ_ENwhen it should not. I have also tested these patches on a Baytrail plarform
(that uses the same pinctrl driver), but I did not see any issues sinceBYT_DIRECT_IRQ_ENis not set in my case for the interrupt gpio pin.
Do we have a way to work-around this in the GPIO driver?
Quoted 3 lines
To determine if using the interrupt pin as output works, you can test updating
the goodix configuration [4].
Right, the problem being that it's a later patch in the branch, and that the driver will fail to probe if there's an error from the GPIO call.
Would you have a patch for me to test that would bypass this error, or at least fallback gracefully to not resetting, not probing GPIOs if they're badly setup?
Cheers
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v3 1/5] Input: goodix - reset device at init
Quoted 84 lines
-----Original Message-----
From: Bastien Nocera [mailto:[email protected]]
Sent: 25 September, 2015 17:44
To: Tirdea, Irina; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark Rutland; [email protected]
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at initQuoted 59 lines · Irina
Quoted 23 lines
-----Original Message-----
From: Bastien Nocera [mailto:[email protected]]
Sent: 09 September, 2015 20:03
To: Tirdea, Irina; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark Rutland; [email protected]
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at initQuoted 10 lines · Irina
I can send some additional patches that will simplify testing the configuration update to the Goodix device. I think this feature is
the easiest
to test so we can determine if writing to the interrupt pin actually
works.
However, even if it is a BIOS problem and the code will work, the warning
will still be printed in dmesg.Quoted 7 lines
Somehow missed this mail before replying to the current patchset. I'd
be fine with that, though it's still not clear to me whether the BIOS/hardware is at fault, or the code that's being added to the driver
;)The reset procedure is described in the Goodix GT911 datasheet [1] and is
used for power-on reset and power management. The power-on sequence is described in chapter 6.1. I2C Timing, in the Power-on Timing diagram.
The sequence for putting the device to sleep is described in chapter 7.1. Operating Modes, c) Sleep mode. These sequences use the interrupt
pin as output.The warning you mentioned comes from the following code in the goodix driver, which sets the interrupt to be used as output:
+ error = gpiod_direction_output(ts->gpiod_int, ts->client-
Quoted 1 line
addr ==
0x14);The
gpiod_direction_output()call ends up indrivers/pinctrl/intel/pinctrl-baytrail.c:
/*
* Before making any direction modifications, do a check if gpio
* is set for direct IRQ. On baytrail, setting GPIO to output does
* not make sense, so let's at least warn the caller before they shoot
* themselves in the foot.
*/
WARN(readl(conf_reg) &BYT_DIRECT_IRQ_EN,"Potential Error: Setting GPIO with direct_irq_en to output");Quoted 11 lines
So the problem comes from using the gpio interrupt pin as output, which
should not work on Baytrail ifBYT_DIRECT_IRQ_ENis set by BIOS. The above warning is introduced and discussed in [2] and [3]. As I mentioned,
this could be a real HW issue or the BIOS setsBYT_DIRECT_IRQ_ENwhen it should not. I have also tested these patches on a Baytrail plarform
(that uses the same pinctrl driver), but I did not see any issues sinceBYT_DIRECT_IRQ_ENis not set in my case for the interrupt gpio pin.Do we have a way to work-around this in the GPIO driver?
Quoted 8 lines
Quoted 3 lines
To determine if using the interrupt pin as output works, you can test updating
the goodix configuration [4].Right, the problem being that it's a later patch in the branch, and that the driver will fail to probe if there's an error from the GPIO call.
The warning from your dmesg output will not cause probe to fail. If you look at the code for byt_gpio_direction_output, it will just print a warning and continue [1]:
WARN(readl(conf_reg) & BYT_DIRECT_IRQ_EN, "Potential Error: Setting GPIO with direct_irq_en to output");
I thought probe finishes successfully, but due to the warning in dmesg you are not sure whether the IRQ GPIO pin can be used as output.
If probe fails, it must be for another reason than the direct_irq_en warning.
Quoted 3 lines
Would you have a patch for me to test that would bypass this error, or at least fallback gracefully to not resetting, not probing GPIOs if they're badly setup?
If the driver fails to initialize the GPIOs, it will at least print some "Failed to get GPIO" warnings in dmesg. Do you have such messages in dmesg or any additional information on why probe fails?
The current code will ignore GPIOs if they are not defined in ACPI (see the check for -ENOENT), but does not ignore other error codes. If you want to bypass all GPIO errors, you can use the code below.
Thanks,
Irina
drivers/input/touchscreen/goodix.c +1 -3
@@ -528,9 +528,7 @@ static int goodix_ts_probe(struct i2c_client *client, ts->client = client;i2c_set_clientdata (client, ts); - error =goodix_get_gpio_config (ts, id); -if (error) -return error; +goodix_get_gpio_config (ts, id);if (ts->gpiod_int && ts->gpiod_rst) {/* reset the controller */
[1] http://lxr.free-electrons.com/source/drivers/pinctrl/intel/pinctrl-baytrail.c#L337
Re: [PATCH v3 1/5] Input: goodix - reset device at init
Quoted 128 lines · Irina
Quoted 104 lines
-----Original Message-----
From: Bastien Nocera [mailto:[email protected]]
Sent: 25 September, 2015 17:44
To: Tirdea, Irina; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark
Rutland; [email protected]
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at initQuoted 71 lines · Irina
Quoted 27 lines
-----Original Message-----
From: Bastien Nocera [mailto:[email protected]]
Sent: 09 September, 2015 20:03
To: Tirdea, Irina; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark
Rutland; [email protected]
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at
initQuoted 5 lines · Irina
I can send some additional patches that will simplify testing the
configuration update to the Goodix device. I think this feature
isQuoted 8 lines
the easiest
to test so we can determine if writing to the interrupt pin actually
works.
However, even if it is a BIOS problem and the code will work, the
warning
will still be printed in dmesg.Quoted 10 lines
Somehow missed this mail before replying to the current patchset.
I'd
be fine with that, though it's still not clear to me whether the
BIOS/hardware is at fault, or the code that's being added to the
driver
;)The reset procedure is described in the Goodix GT911 datasheet
[1]
and is
used for power-on reset and power management. The power-on sequence
is described in chapter 6.1. I2C Timing, in the Power-on Timing diagram.
The sequence for putting the device to sleep is described in chapter
7.1. Operating Modes, c) Sleep mode. These sequences use the interrupt
pin as output.The warning you mentioned comes from the following code in the goodix
driver, which sets the interrupt to be used as output:+ error = gpiod_direction_output(ts->gpiod_int, ts->client-
Quoted 1 line
addr ==
0x14);The
gpiod_direction_output()call ends up indrivers/pinctrl/intel/pinctrl-baytrail.c:
/*
* Before making any direction modifications, do a check if gpio
* is set for direct IRQ. On baytrail, setting GPIO to output does
* not make sense, so let's at least warn the caller before they shoot
* themselves in the foot.
*/
WARN(readl(conf_reg) &BYT_DIRECT_IRQ_EN,"Potential Error: Setting GPIO with direct_irq_en to output");Quoted 14 lines
So the problem comes from using the gpio interrupt pin as output, which
should not work on Baytrail ifBYT_DIRECT_IRQ_ENis set by BIOS. The above warning is introduced and discussed in [2] and [3]. As I
mentioned,
this could be a real HW issue or the BIOS setsBYT_DIRECT_IRQ_ENwhen
it should not. I have also tested these patches on a Baytrail plarform
(that uses the same pinctrl driver), but I did not see any issues sinceBYT_DIRECT_IRQ_ENis not set in my case for the interrupt gpio pin.Do we have a way to work-around this in the GPIO driver?
Quoted 4 lines
To determine if using the interrupt pin as output works, you can test
updating
the goodix configuration [4].Quoted 5 lines
Right, the problem being that it's a later patch in the branch, and that the driver will fail to probe if there's an error from the GPIO
call.The warning from your dmesg output will not cause probe to fail. If you look at the code for
byt_gpio_direction_output, it will just print
a warning and continue [1]:
WARN(readl(conf_reg) &BYT_DIRECT_IRQ_EN,
"Potential Error: Setting GPIO withdirect_irq_ento
output");
I thought probe finishes successfully, but due to the warning in dmesg you
are not sure whether the IRQ GPIO pin can be used as output. If probe fails, it must be for another reason than thedirect_irq_enwarning.Quoted 4 lines
Would you have a patch for me to test that would bypass this error, or
at least fallback gracefully to not resetting, not probing GPIOs if they're badly setup?
Quoted 8 lines
If the driver fails to initialize the GPIOs, it will at least print some
"Failed to get GPIO" warnings in dmesg. Do you have such messages in dmesg or any additional information on why probe fails?The current code will ignore GPIOs if they are not defined in ACPI (see the check for
-ENOENT), but does not ignore other error codes. If you want to bypass all GPIO errors, you can use the code below.
The failure isn't there, it's when running goodix_i2c_test():
Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: I2C communication failure: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS: probe of i2c-GDIX1001:00 failed with error -121
The GPIO setup seems to work (bar the warnings), and the reset as well, but then the device fails to communicate. Likely a fallout from the reset actually failing.
Swapping around the RST and INT pins leads to the same problem. Either this device's GPIO PINs aren't actually functional, and the firmware contains garbage, or something else is wrong.
I'm not sure how we can detect, and blacklist, those devices. At least my original device, the Onda v975w, and the WinBook TW100 would have those problems.
Cheers
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
RE: [PATCH v3 1/5] Input: goodix - reset device at init
Quoted 12 lines
-----Original Message-----
From: Bastien Nocera [mailto:[email protected]]
Sent: 29 September, 2015 5:04
To: Tirdea, Irina; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark Rutland; [email protected]
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at initQuoted 1 line · Irina
<snip>
Quoted 28 lines
Quoted 19 lines
The warning from your dmesg output will not cause probe to fail. If you look at the code for
byt_gpio_direction_output, it will just print
a warning and continue [1]:
WARN(readl(conf_reg) &BYT_DIRECT_IRQ_EN,
"Potential Error: Setting GPIO withdirect_irq_ento
output");
I thought probe finishes successfully, but due to the warning in dmesg you
are not sure whether the IRQ GPIO pin can be used as output. If probe fails, it must be for another reason than thedirect_irq_enwarning.Quoted 4 lines
Would you have a patch for me to test that would bypass this error, or
at least fallback gracefully to not resetting, not probing GPIOs if they're badly setup?Quoted 8 lines
If the driver fails to initialize the GPIOs, it will at least print some
"Failed to get GPIO" warnings in dmesg. Do you have such messages in dmesg or any additional information on why probe fails?The current code will ignore GPIOs if they are not defined in ACPI (see the check for
-ENOENT), but does not ignore other error codes. If you want to bypass all GPIO errors, you can use the code below.
Quoted 6 lines
The failure isn't there, it's when running goodix_i2c_test():
Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: I2C communication failure: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS: probe of i2c-GDIX1001:00 failed with error -121
Are you using v6 of the patches? There was an issue with reset that Aleksei reported and was fixed in v6 (although he had a different i2c error and a different scenario).
Quoted 8 lines
The GPIO setup seems to work (bar the warnings), and the reset as well, but then the device fails to communicate. Likely a fallout from the reset actually failing.
Swapping around the RST and INT pins leads to the same problem. Either this device's GPIO PINs aren't actually functional, and the firmware contains garbage, or something else is wrong.
I agree. Either the interrupt pin cannot be used as output in your configuration or there are some specifics in the ACPI tables that prevent using these pins.
Quoted 4 lines
I'm not sure how we can detect, and blacklist, those devices. At least my original device, the Onda v975w, and the WinBook TW100 would have those problems.
I can use DMI quirks to exclude these devices from using the features that depend on the gpio pins. I already have the DMI information for WinBook TW100 and WinBook TW700. Could you tell me the DMI_SYS_VENDOR and DMI_PRODUCT_NAME for Onda v975w so I can add it as well?
Thanks,
Irina
Quoted 1 line
Cheers
Re: [PATCH v3 1/5] Input: goodix - reset device at init
Quoted 61 lines · Irina
Quoted 12 lines
-----Original Message-----
From: Bastien Nocera [mailto:[email protected]]
Sent: 29 September, 2015 5:04
To: Tirdea, Irina; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark
Rutland; [email protected]
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at initQuoted 1 line · Irina
<snip>
Quoted 38 lines
Quoted 30 lines
The warning from your dmesg output will not cause probe to fail. If you look at the code for
byt_gpio_direction_output, it will just
a warning and continue [1]:
WARN(readl(conf_reg) &BYT_DIRECT_IRQ_EN,
"Potential Error: Setting GPIO withdirect_irq_ento
output");
I thought probe finishes successfully, but due to the warning in dmesg you
are not sure whether the IRQ GPIO pin can be used as output. If probe fails, it must be for another reason than thedirect_irq_en
warning.Quoted 6 lines
Would you have a patch for me to test that would bypass this error,
or
at least fallback gracefully to not resetting, not probing GPIOs if
they're badly setup?If the driver fails to initialize the GPIOs, it will at least print
some
"Failed to get GPIO" warnings in dmesg. Do you have such messages in
dmesg or any additional information on why probe fails?Quoted 6 lines
The current code will ignore GPIOs if they are not defined in ACPI
(see the check for-ENOENT), but does not ignore other error codes.
If you want to bypass all GPIO errors, you can use the code below.The failure isn't there, it's when running goodix_i2c_test():
Quoted 9 lines
Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: I2C communication failure: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS: probe of i2c-GDIX1001:00failed with error -121
Quoted 4 lines
Are you using v6 of the patches? There was an issue with reset that Aleksei reported
and was fixed in v6 (although he had a different i2c error and a different scenario).
Pretty certain. Your current patchset is at:
https://github.com/hadess/gt9xx/tree/irina-tirdea
And the patches are yours, with the prefix and Documentation removed.
Quoted 24 lines
Quoted 11 lines
The GPIO setup seems to work (bar the warnings), and the reset as well,
but then the device fails to communicate. Likely a fallout from the reset actually failing.Swapping around the RST and INT pins leads to the same problem. Either
this device's GPIO PINs aren't actually functional, and the firmware
contains garbage, or something else is wrong.I agree. Either the interrupt pin cannot be used as output in your configuration
or there are some specifics in the ACPI tables that prevent using these pins.Quoted 6 lines
I'm not sure how we can detect, and blacklist, those devices. At least
my original device, the Onda v975w, and the WinBook TW100 would have
those problems.
Quoted 6 lines
I can use DMI quirks to exclude these devices from using the features that
depend on the gpio pins. I already have the DMI information for WinBook TW100
and WinBook TW700. Could you tell me theDMI_SYS_VENDORandDMI_PRODUCT_NAMEfor Onda v975w so I can add it as well?
I don't have access to the Onda v975w anymore, but let me CC: a few people that could also help with testing.
Carlos, Cosimo, Christian, there's a patchset for you to test on the Onda v975w at:
https://github.com/hadess/gt9xx/commits/irina-tirdea
Doing an "rmmod goodix ; insmod ./goodix_backport.ko" should be enough to test whether the patch set works. If it doesn't work correctly, you'll need to reboot the machine, swap the irq_idx and rst_idx values at:
https://github.com/hadess/gt9xx/commit/c27de79f494c2b2e7a198ff4d27976ae93669dbd#diff-dddc2849e36327439530f3e2faacec4fR321
and try again.
If all that fails, could you please send the output of "dmidecode" to Irina?
Cheers
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v3 1/5] Input: goodix - reset device at init
Hey,
Quoted 110 lines · Bastien Nocera
Quoted 61 lines · Irina
Quoted 12 lines
-----Original Message-----
From: Bastien Nocera [mailto:[email protected]]
Sent: 29 September, 2015 5:04
To: Tirdea, Irina; [email protected]
Cc: [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark
Rutland; [email protected]
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at initQuoted 1 line · Irina
<snip>
Quoted 38 lines
Quoted 30 lines
The warning from your dmesg output will not cause probe to fail. If you look at the code for
byt_gpio_direction_output, it will just
a warning and continue [1]:
WARN(readl(conf_reg) &BYT_DIRECT_IRQ_EN,
"Potential Error: Setting GPIO withdirect_irq_ento
output");
I thought probe finishes successfully, but due to the warning in dmesg you
are not sure whether the IRQ GPIO pin can be used as output. If probe fails, it must be for another reason than thedirect_irq_en
warning.Quoted 6 lines
Would you have a patch for me to test that would bypass this error,
or
at least fallback gracefully to not resetting, not probing GPIOs if
they're badly setup?If the driver fails to initialize the GPIOs, it will at least print
some
"Failed to get GPIO" warnings in dmesg. Do you have such messages in
dmesg or any additional information on why probe fails?Quoted 6 lines
The current code will ignore GPIOs if they are not defined in ACPI
(see the check for-ENOENT), but does not ignore other error codes.
If you want to bypass all GPIO errors, you can use the code below.The failure isn't there, it's when running
goodix_i2c_test():Quoted 9 lines
Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS i2c-GDIX1001:00: I2C communication failure: -121 Sep 25 16:39:20 winbook kernel: Goodix-TS: probe of i2c-GDIX1001:00failed with error -121
Quoted 4 lines
Are you using v6 of the patches? There was an issue with reset that Aleksei reported
and was fixed in v6 (although he had a different i2c error and a different scenario).Pretty certain. Your current patchset is at:
https://github.com/hadess/gt9xx/tree/irina-tirdeaAnd the patches are yours, with the prefix and Documentation removed.
Quoted 24 lines
Quoted 11 lines
The GPIO setup seems to work (bar the warnings), and the reset as well,
but then the device fails to communicate. Likely a fallout from the reset actually failing.Swapping around the RST and INT pins leads to the same problem. Either
this device's GPIO PINs aren't actually functional, and the firmware
contains garbage, or something else is wrong.I agree. Either the interrupt pin cannot be used as output in your configuration
or there are some specifics in the ACPI tables that prevent using these pins.Quoted 6 lines
I'm not sure how we can detect, and blacklist, those devices. At least
my original device, the Onda v975w, and the WinBook TW100 would have
those problems.Quoted 6 lines
I can use DMI quirks to exclude these devices from using the features that
depend on the gpio pins. I already have the DMI information for WinBook TW100
and WinBook TW700. Could you tell me theDMI_SYS_VENDORandDMI_PRODUCT_NAMEfor Onda v975w so I can add it as well?I don't have access to the Onda v975w anymore, but let me CC: a few people that could also help with testing.
Carlos, Cosimo, Christian, there's a patchset for you to test on the Onda v975w at:
https://github.com/hadess/gt9xx/commits/irina-tirdea
Quoted 7 lines
Doing an "rmmod goodix ; insmod ./goodix_backport.ko" should be enough to test whether the patch set works. If it doesn't work correctly, you'll need to reboot the machine, swap the
irq_idxandrst_idxvalues at:
https://github.com/hadess/gt9xx/commit/c27de79f494c2b2e7a198ff4d27976ae93669dbd#diff-dddc2849e36327439530f3e2faacec4fR321and try again.
Unswapped does fail with:
sep 30 15:37:29 tablet kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -121
sep 30 15:37:29 tablet kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -121
sep 30 15:37:29 tablet kernel: Goodix-TS i2c-GDIX1001:00: I2C communication failure: -121
sep 30 15:37:29 tablet kernel: Goodix-TS: probe of i2c-GDIX1001:00 failed with error -121
Swapping the values triggers some errors:
sep 30 15:48:17 tablet kernel: ------------[ cut here ]------------ sep 30 15:48:17 tablet kernel: WARNING: CPU: 1 PID: 2341 at drivers/pinctrl/intel/pinctrl-baytrail.c:342 byt_gpio_direction_output+0xa1/0xb0()
sep 30 15:48:17 tablet kernel: Potential Error: Setting GPIO with direct_irq_en to output
sep 30 15:48:17 tablet kernel: Modules linked in:
sep 30 15:48:17 tablet kernel: goodix_backport(OE+) r8723bs(OE) nfsd lockd grace sunrpc [last unloaded: goodix]
sep 30 15:48:17 tablet kernel: CPU: 1 PID: 2341 Comm: insmod Tainted:
G OE 4.3.0-rc1+ #36
sep 30 15:48:17 tablet kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014 sep 30 15:48:17 tablet kernel: 00000000 00000000 d3f61c08 c13b347f d3f61c48 d3f61c38 c10a9e1d c20f10e0
sep 30 15:48:17 tablet kernel: d3f61c64 00000925 c20f111c 00000156 c13e7ce1 c13e7ce1 f80580b8 f53a4b0c
sep 30 15:48:17 tablet kernel: 00000156 d3f61c50 c10a9e93 00000009 d3f61c48 c20f10e0 d3f61c64 d3f61c78
sep 30 15:48:17 tablet kernel: Call Trace:
sep 30 15:48:17 tablet kernel: [<c13b347f>] dump_stack+0x48/0x69 sep 30 15:48:17 tablet kernel: [<c10a9e1d>] warn_slowpath_common+0x8d/0xd0 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c10a9e93>] warn_slowpath_fmt+0x33/0x40 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c13e7c40>] ? byt_gpio_irq_handler+0xb0/0xb0 sep 30 15:48:17 tablet kernel: [<c13eabc3>] _gpiod_direction_output_raw+0x63/0x350 sep 30 15:48:17 tablet kernel: [<c13eaf1a>] gpiod_direction_output+0x2a/0x50 sep 30 15:48:17 tablet kernel: [<c112b846>] ? msleep+0x36/0x40 sep 30 15:48:17 tablet kernel: [<f9ff38ae>] goodix_reset+0x3e/0x90 [goodix_backport] sep 30 15:48:17 tablet kernel: [<f9ff40fa>] goodix_ts_probe+0x12a/0x5aa [goodix_backport] sep 30 15:48:17 tablet kernel: [<c142a5a4>] ? acpi_device_wakeup+0x7a/0x80 sep 30 15:48:17 tablet kernel: [<c142ad84>] ? acpi_dev_pm_attach+0x71/0x87 sep 30 15:48:17 tablet kernel: [<c1924271>] i2c_device_probe+0x121/0x1d0 sep 30 15:48:17 tablet kernel: [<c1c77da2>] ? _raw_spin_unlock+0x22/0x30 sep 30 15:48:17 tablet kernel: [<f9ff3fd0>] ? goodix_config_cb+0xc0/0xc0 [goodix_backport] sep 30 15:48:17 tablet kernel: [<c15b2125>] ? driver_sysfs_add+0x75/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2b24>] driver_probe_device+0x204/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b2e3c>] ? __driver_attach+0x5c/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2e3c>] ? __driver_attach+0x5c/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2e79>] __driver_attach+0x99/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2de0>] ? driver_probe_device+0x4c0/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b092f>] bus_for_each_dev+0x4f/0x80 sep 30 15:48:17 tablet kernel: [<c15b22de>] driver_attach+0x1e/0x20 sep 30 15:48:17 tablet kernel: [<c15b2de0>] ? driver_probe_device+0x4c0/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b1e77>] bus_add_driver+0x1f7/0x2a0 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<c15b398d>] driver_register+0x5d/0xf0 sep 30 15:48:17 tablet kernel: [<c1924daa>] i2c_register_driver+0x2a/0xa0 sep 30 15:48:17 tablet kernel: [<c100045f>] ? do_one_initcall+0x9f/0x1f0 sep 30 15:48:17 tablet kernel: [<f9ff7012>] goodix_ts_driver_init+0x12/0x14 [goodix_backport] sep 30 15:48:17 tablet kernel: [<c100046a>] do_one_initcall+0xaa/0x1f0 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<c10d2486>] ? __might_sleep+0x36/0xa0 sep 30 15:48:17 tablet kernel: [<c1103fd4>] ? trace_hardirqs_on_caller+0x14/0x220 sep 30 15:48:17 tablet kernel: [<c11c1c5c>] ? free_pages_prepare+0x19c/0x380 sep 30 15:48:17 tablet kernel: [<c120bce8>] ? kmem_cache_alloc_trace+0xa8/0x2a0 sep 30 15:48:17 tablet kernel: [<c11bac3f>] ? do_init_module+0x21/0x1b0 sep 30 15:48:17 tablet kernel: [<c11bac6e>] do_init_module+0x50/0x1b0 sep 30 15:48:17 tablet kernel: [<c114b69b>] load_module+0x13db/0x1980 sep 30 15:48:17 tablet kernel: [<c114be29>] SyS_finit_module+0x89/0xd0 sep 30 15:48:17 tablet kernel: [<c11d9532>] ? vm_mmap_pgoff+0x62/0x80 sep 30 15:48:17 tablet kernel: [<c1c787f0>] sysenter_do_call+0x12/0x12
sep 30 15:48:17 tablet kernel: ---[ end trace e0f66305648b0639 ]--- sep 30 15:48:17 tablet kernel: ------------[ cut here ]------------ sep 30 15:48:17 tablet kernel: WARNING: CPU: 1 PID: 2341 at drivers/pinctrl/intel/pinctrl-baytrail.c:342 byt_gpio_direction_output+0xa1/0xb0()
sep 30 15:48:17 tablet kernel: Potential Error: Setting GPIO with direct_irq_en to output
sep 30 15:48:17 tablet kernel: Modules linked in:
sep 30 15:48:17 tablet kernel: goodix_backport(OE+) r8723bs(OE) nfsd lockd grace sunrpc [last unloaded: goodix]
sep 30 15:48:17 tablet kernel: CPU: 1 PID: 2341 Comm: insmod Tainted:
G W OE 4.3.0-rc1+ #36
sep 30 15:48:17 tablet kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014 sep 30 15:48:17 tablet kernel: 00000000 00000000 d3f61bfc c13b347f d3f61c3c d3f61c2c c10a9e1d c20f10e0
sep 30 15:48:17 tablet kernel: d3f61c58 00000925 c20f111c 00000156 c13e7ce1 c13e7ce1 f80580b8 f53a4b0c
sep 30 15:48:17 tablet kernel: 00000156 d3f61c44 c10a9e93 00000009 d3f61c3c c20f10e0 d3f61c58 d3f61c6c
sep 30 15:48:17 tablet kernel: Call Trace:
sep 30 15:48:17 tablet kernel: [<c13b347f>] dump_stack+0x48/0x69 sep 30 15:48:17 tablet kernel: [<c10a9e1d>] warn_slowpath_common+0x8d/0xd0 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c10a9e93>] warn_slowpath_fmt+0x33/0x40 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c13e7c40>] ? byt_gpio_irq_handler+0xb0/0xb0 sep 30 15:48:17 tablet kernel: [<c13eabc3>] _gpiod_direction_output_raw+0x63/0x350 sep 30 15:48:17 tablet kernel: [<c13e7853>] ? byt_gpio_direction_input+0x43/0x50 sep 30 15:48:17 tablet kernel: [<c13eaf1a>] gpiod_direction_output+0x2a/0x50 sep 30 15:48:17 tablet kernel: [<f9ff37e4>] goodix_int_sync.isra.4+0x14/0x30 [goodix_backport] sep 30 15:48:17 tablet kernel: [<f9ff38f5>] goodix_reset+0x85/0x90 [goodix_backport] sep 30 15:48:17 tablet kernel: [<f9ff40fa>] goodix_ts_probe+0x12a/0x5aa [goodix_backport] sep 30 15:48:17 tablet kernel: [<c142a5a4>] ? acpi_device_wakeup+0x7a/0x80 sep 30 15:48:17 tablet kernel: [<c142ad84>] ? acpi_dev_pm_attach+0x71/0x87 sep 30 15:48:17 tablet kernel: [<c1924271>] i2c_device_probe+0x121/0x1d0 sep 30 15:48:17 tablet kernel: [<c1c77da2>] ? _raw_spin_unlock+0x22/0x30 sep 30 15:48:17 tablet kernel: [<f9ff3fd0>] ? goodix_config_cb+0xc0/0xc0 [goodix_backport] sep 30 15:48:17 tablet kernel: [<c15b2125>] ? driver_sysfs_add+0x75/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2b24>] driver_probe_device+0x204/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b2e3c>] ? __driver_attach+0x5c/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2e3c>] ? __driver_attach+0x5c/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2e79>] __driver_attach+0x99/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2de0>] ? driver_probe_device+0x4c0/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b092f>] bus_for_each_dev+0x4f/0x80 sep 30 15:48:17 tablet kernel: [<c15b22de>] driver_attach+0x1e/0x20 sep 30 15:48:17 tablet kernel: [<c15b2de0>] ? driver_probe_device+0x4c0/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b1e77>] bus_add_driver+0x1f7/0x2a0 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<c15b398d>] driver_register+0x5d/0xf0 sep 30 15:48:17 tablet kernel: [<c1924daa>] i2c_register_driver+0x2a/0xa0 sep 30 15:48:17 tablet kernel: [<c100045f>] ? do_one_initcall+0x9f/0x1f0 sep 30 15:48:17 tablet kernel: [<f9ff7012>] goodix_ts_driver_init+0x12/0x14 [goodix_backport] sep 30 15:48:17 tablet kernel: [<c100046a>] do_one_initcall+0xaa/0x1f0 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<c10d2486>] ? __might_sleep+0x36/0xa0 sep 30 15:48:17 tablet kernel: [<c1103fd4>] ? trace_hardirqs_on_caller+0x14/0x220 sep 30 15:48:17 tablet kernel: [<c11c1c5c>] ? free_pages_prepare+0x19c/0x380 sep 30 15:48:17 tablet kernel: [<c120bce8>] ? kmem_cache_alloc_trace+0xa8/0x2a0 sep 30 15:48:17 tablet kernel: [<c11bac3f>] ? do_init_module+0x21/0x1b0 sep 30 15:48:17 tablet kernel: [<c11bac6e>] do_init_module+0x50/0x1b0 sep 30 15:48:17 tablet kernel: [<c114b69b>] load_module+0x13db/0x1980 sep 30 15:48:17 tablet kernel: [<c114be29>] SyS_finit_module+0x89/0xd0 sep 30 15:48:17 tablet kernel: [<c11d9532>] ? vm_mmap_pgoff+0x62/0x80 sep 30 15:48:17 tablet kernel: [<c1c787f0>] sysenter_do_call+0x12/0x12
sep 30 15:48:17 tablet kernel: ---[ end trace e0f66305648b063a ]--- sep 30 15:48:17 tablet kernel: Goodix-TS i2c-GDIX1001:00: ID 9271, version: 1020 sep 30 15:48:17 tablet kernel: Goodix-TS i2c-GDIX1001:00: Direct firmware load for goodix_9271_cfg.bin failed with error -2
sep 30 15:48:17 tablet kernel: Goodix-TS i2c-GDIX1001:00: Falling back to user helper
... and after a while:
sep 30 15:49:17 tablet kernel: input: Goodix Capacitive TouchScreen as /devices/platform/80860F41:05/i2c-5/i2c-GDIX1001:00/input/input6 sep 30 15:49:17 tablet kernel: ------------[ cut here ]------------ sep 30 15:49:17 tablet kernel: WARNING: CPU: 1 PID: 75 at drivers/pinctrl/intel/pinctrl-baytrail.c:342 byt_gpio_direction_output+0xa1/0xb0()
sep 30 15:49:17 tablet kernel: Potential Error: Setting GPIO with direct_irq_en to output
sep 30 15:49:17 tablet kernel: Modules linked in:
sep 30 15:49:17 tablet kernel: goodix_backport(OE) r8723bs(OE) nfsd lockd grace sunrpc [last unloaded: goodix]
sep 30 15:49:17 tablet kernel: CPU: 1 PID: 75 Comm: kworker/1:2
Tainted: G W OE 4.3.0-rc1+ #36
sep 30 15:49:17 tablet kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014
sep 30 15:49:17 tablet kernel: Workqueue: events request_firmware_work_func sep 30 15:49:17 tablet kernel: 00000000 00000000 f7219ce8 c13b347f f7219d28 f7219d18 c10a9e1d c20f10e0
sep 30 15:49:17 tablet kernel: f7219d44 0000004b c20f111c 00000156 c13e7ce1 c13e7ce1 f80580b8 f53a4b0c
sep 30 15:49:17 tablet kernel: 00000156 f7219d30 c10a9e93 00000009 f7219d28 c20f10e0 f7219d44 f7219d58
sep 30 15:49:17 tablet kernel: Call Trace:
sep 30 15:49:17 tablet kernel: [<c13b347f>] dump_stack+0x48/0x69 sep 30 15:49:17 tablet kernel: [<c10a9e1d>] warn_slowpath_common+0x8d/0xd0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c10a9e93>] warn_slowpath_fmt+0x33/0x40 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7c40>] ? byt_gpio_irq_handler+0xb0/0xb0 sep 30 15:49:17 tablet kernel: [<c13eabc3>] _gpiod_direction_output_raw+0x63/0x350 sep 30 15:49:17 tablet kernel: [<c111d30b>] ? free_irq+0x4b/0xc0 sep 30 15:49:17 tablet kernel: [<c142a87d>] ? acpi_dev_runtime_suspend+0x7b/0x7b sep 30 15:49:17 tablet kernel: [<c13eaf1a>] gpiod_direction_output+0x2a/0x50 sep 30 15:49:17 tablet kernel: [<f9ff32d0>] goodix_suspend+0x50/0x100
[goodix_backport]
sep 30 15:49:17 tablet kernel: [<c15bc0fd>] ? __rpm_callback+0x5d/0x80 sep 30 15:49:17 tablet kernel: [<c15ba3a2>] pm_generic_runtime_suspend+0x22/0x40
sep 30 15:49:17 tablet kernel: [<c142a88d>]
acpi_subsys_runtime_suspend+0x10/0x1e sep 30 15:49:17 tablet kernel: [<c15bc0d2>] __rpm_callback+0x32/0x80 sep 30 15:49:17 tablet kernel: [<c142a87d>] ? acpi_dev_runtime_suspend+0x7b/0x7b sep 30 15:49:17 tablet kernel: [<c15bc148>] rpm_callback+0x28/0x90 sep 30 15:49:17 tablet kernel: [<c142a87d>] ? acpi_dev_runtime_suspend+0x7b/0x7b sep 30 15:49:17 tablet kernel: [<c15bce3a>] rpm_suspend+0x12a/0x720 sep 30 15:49:17 tablet kernel: [<c10fffbb>] ? trace_hardirqs_off+0xb/0x10 sep 30 15:49:17 tablet kernel: [<c10f3fd4>] ? __wake_up+0x44/0x50 sep 30 15:49:17 tablet kernel: [<c15bd5a6>] rpm_idle+0xa6/0x410 sep 30 15:49:17 tablet kernel: [<c15be1ab>] update_autosuspend+0x3b/0x60 sep 30 15:49:17 tablet kernel: [<c15be218>] pm_runtime_set_autosuspend_delay+0x48/0x60 sep 30 15:49:17 tablet kernel: [<c10c4942>] ? process_one_work+0x132/0x5e0 sep 30 15:49:17 tablet kernel: [<f9ff3f82>] goodix_config_cb+0x72/0xc0 [goodix_backport] sep 30 15:49:17 tablet kernel: [<c15c81ab>] request_firmware_work_func+0x2b/0x50 sep 30 15:49:17 tablet kernel: [<c10c49e0>] process_one_work+0x1d0/0x5e0 sep 30 15:49:17 tablet kernel: [<c10c4942>] ? process_one_work+0x132/0x5e0 sep 30 15:49:17 tablet kernel: [<c10c4e29>] worker_thread+0x39/0x430 sep 30 15:49:17 tablet kernel: [<c10c4df0>] ? process_one_work+0x5e0/0x5e0 sep 30 15:49:17 tablet kernel: [<c10cae16>] kthread+0xa6/0xc0 sep 30 15:49:17 tablet kernel: [<c1c77e17>] ? _raw_spin_unlock_irq+0x27/0x40 sep 30 15:49:17 tablet kernel: [<c1c78721>] ret_from_kernel_thread+0x21/0x30
sep 30 15:49:17 tablet kernel: [<c10cad70>] ? kthread_create_on_node+0x130/0x130
sep 30 15:49:17 tablet kernel: ---[ end trace e0f66305648b063b ]--- sep 30 15:49:17 tablet kernel: ------------[ cut here ]------------ sep 30 15:49:17 tablet kernel: WARNING: CPU: 2 PID: 2353 at drivers/pinctrl/intel/pinctrl-baytrail.c:342 byt_gpio_direction_output+0xa1/0xb0()
sep 30 15:49:17 tablet kernel: Potential Error: Setting GPIO with direct_irq_en to output
sep 30 15:49:17 tablet kernel: Modules linked in:
sep 30 15:49:17 tablet kernel: goodix_backport(OE) r8723bs(OE) nfsd lockd grace sunrpc [last unloaded: goodix]
sep 30 15:49:17 tablet kernel: CPU: 2 PID: 2353 Comm: systemd-udevd
Tainted: G W OE 4.3.0-rc1+ #36
sep 30 15:49:17 tablet kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014 sep 30 15:49:17 tablet kernel: 00000000 00000000 d8bbdc70 c13b347f d8bbdcb0 d8bbdca0 c10a9e1d c20f10e0
sep 30 15:49:17 tablet kernel: d8bbdccc 00000931 c20f111c 00000156 c13e7ce1 c13e7ce1 f80580b8 f53a4b0c
sep 30 15:49:17 tablet kernel: 00000156 d8bbdcb8 c10a9e93 00000009 d8bbdcb0 c20f10e0 d8bbdccc d8bbdce0
sep 30 15:49:17 tablet kernel: Call Trace:
sep 30 15:49:17 tablet kernel: [<c13b347f>] dump_stack+0x48/0x69 sep 30 15:49:17 tablet kernel: [<c10a9e1d>] warn_slowpath_common+0x8d/0xd0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c10a9e93>] warn_slowpath_fmt+0x33/0x40 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7c40>] ? byt_gpio_irq_handler+0xb0/0xb0 sep 30 15:49:17 tablet kernel: [<c13eabc3>] _gpiod_direction_output_raw+0x63/0x350 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c13eaf1a>] gpiod_direction_output+0x2a/0x50 sep 30 15:49:17 tablet kernel: [<c142a5a4>] ? acpi_device_wakeup+0x7a/0x80 sep 30 15:49:17 tablet kernel: [<f9ff3827>] goodix_resume+0x27/0x70 [goodix_backport] sep 30 15:49:17 tablet kernel: [<c15ba3e2>] pm_generic_runtime_resume+0x22/0x40 sep 30 15:49:17 tablet kernel: [<c142a6c5>] acpi_subsys_runtime_resume+0x1b/0x1e sep 30 15:49:17 tablet kernel: [<c15bc0d2>] __rpm_callback+0x32/0x80 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c15bc148>] rpm_callback+0x28/0x90 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c15bcab3>] rpm_resume+0x503/0x760 sep 30 15:49:17 tablet kernel: [<c10f4710>] ? wake_atomic_t_function+0x70/0x70 sep 30 15:49:17 tablet kernel: [<c15bde1e>] __pm_runtime_resume+0x4e/0x90 sep 30 15:49:17 tablet kernel: [<f9ff3777>] goodix_open+0x37/0x90 [goodix_backport] sep 30 15:49:17 tablet kernel: [<c18f9e3f>] input_open_device+0x7f/0xa0 sep 30 15:49:17 tablet kernel: [<c1902c5b>] evdev_open+0x16b/0x1a0 sep 30 15:49:17 tablet kernel: [<c121b9fd>] chrdev_open+0x8d/0x1a0 sep 30 15:49:17 tablet kernel: [<c121b970>] ? cdev_put+0x20/0x20 sep 30 15:49:17 tablet kernel: [<c1215230>] do_dentry_open.isra.16+0x130/0x2d0 sep 30 15:49:17 tablet kernel: [<c121b970>] ? cdev_put+0x20/0x20 sep 30 15:49:17 tablet kernel: [<c121670f>] vfs_open+0x4f/0x60 sep 30 15:49:17 tablet kernel: [<c1225e22>] path_openat+0x1a2/0x10b0 sep 30 15:49:17 tablet kernel: [<c11e9224>] ? unmap_single_vma+0x3d4/0x560 sep 30 15:49:17 tablet kernel: [<c11cb182>] ? release_pages+0xb2/0x1c0 sep 30 15:49:17 tablet kernel: [<c1227d42>] do_filp_open+0x62/0xc0 sep 30 15:49:17 tablet kernel: [<c1c77da2>] ? _raw_spin_unlock+0x22/0x30 sep 30 15:49:17 tablet kernel: [<c12381b7>] ? __alloc_fd+0x97/0x160 sep 30 15:49:17 tablet kernel: [<c1216ac8>] do_sys_open+0x118/0x210 sep 30 15:49:17 tablet kernel: [<c1216be2>] SyS_open+0x22/0x30 sep 30 15:49:17 tablet kernel: [<c1c787f0>] sysenter_do_call+0x12/0x12
sep 30 15:49:17 tablet kernel: ---[ end trace e0f66305648b063c ]--- sep 30 15:49:17 tablet kernel: ------------[ cut here ]------------ sep 30 15:49:17 tablet kernel: WARNING: CPU: 2 PID: 2353 at drivers/pinctrl/intel/pinctrl-baytrail.c:342 byt_gpio_direction_output+0xa1/0xb0()
sep 30 15:49:17 tablet kernel: Potential Error: Setting GPIO with direct_irq_en to output
sep 30 15:49:17 tablet kernel: Modules linked in:
sep 30 15:49:17 tablet kernel: goodix_backport(OE) r8723bs(OE) nfsd lockd grace sunrpc [last unloaded: goodix]
sep 30 15:49:17 tablet kernel: CPU: 2 PID: 2353 Comm: systemd-udevd
Tainted: G W OE 4.3.0-rc1+ #36
sep 30 15:49:17 tablet kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014 sep 30 15:49:17 tablet kernel: 00000000 00000000 d8bbdc64 c13b347f d8bbdca4 d8bbdc94 c10a9e1d c20f10e0
sep 30 15:49:17 tablet kernel: d8bbdcc0 00000931 c20f111c 00000156 c13e7ce1 c13e7ce1 f80580b8 f53a4b0c
sep 30 15:49:17 tablet kernel: 00000156 d8bbdcac c10a9e93 00000009 d8bbdca4 c20f10e0 d8bbdcc0 d8bbdcd4
sep 30 15:49:17 tablet kernel: Call Trace:
sep 30 15:49:17 tablet kernel: [<c13b347f>] dump_stack+0x48/0x69 sep 30 15:49:17 tablet kernel: [<c10a9e1d>] warn_slowpath_common+0x8d/0xd0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c10a9e93>] warn_slowpath_fmt+0x33/0x40 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7c40>] ? byt_gpio_irq_handler+0xb0/0xb0 sep 30 15:49:17 tablet kernel: [<c13eabc3>] _gpiod_direction_output_raw+0x63/0x350 sep 30 15:49:17 tablet kernel: [<c1c76ef4>] ? schedule_hrtimeout_range_clock+0x104/0x280 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c13eaf1a>] gpiod_direction_output+0x2a/0x50 sep 30 15:49:17 tablet kernel: [<f9ff37e4>] goodix_int_sync.isra.4+0x14/0x30 [goodix_backport] sep 30 15:49:17 tablet kernel: [<f9ff3847>] goodix_resume+0x47/0x70 [goodix_backport] sep 30 15:49:17 tablet kernel: [<c15ba3e2>] pm_generic_runtime_resume+0x22/0x40 sep 30 15:49:17 tablet kernel: [<c142a6c5>] acpi_subsys_runtime_resume+0x1b/0x1e sep 30 15:49:17 tablet kernel: [<c15bc0d2>] __rpm_callback+0x32/0x80 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c15bc148>] rpm_callback+0x28/0x90 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c15bcab3>] rpm_resume+0x503/0x760 sep 30 15:49:17 tablet kernel: [<c10f4710>] ? wake_atomic_t_function+0x70/0x70 sep 30 15:49:17 tablet kernel: [<c15bde1e>] __pm_runtime_resume+0x4e/0x90 sep 30 15:49:17 tablet kernel: [<f9ff3777>] goodix_open+0x37/0x90 [goodix_backport] sep 30 15:49:17 tablet kernel: [<c18f9e3f>] input_open_device+0x7f/0xa0 sep 30 15:49:17 tablet kernel: [<c1902c5b>] evdev_open+0x16b/0x1a0 sep 30 15:49:17 tablet kernel: [<c121b9fd>] chrdev_open+0x8d/0x1a0 sep 30 15:49:17 tablet kernel: [<c121b970>] ? cdev_put+0x20/0x20 sep 30 15:49:17 tablet kernel: [<c1215230>] do_dentry_open.isra.16+0x130/0x2d0 sep 30 15:49:17 tablet kernel: [<c121b970>] ? cdev_put+0x20/0x20 sep 30 15:49:17 tablet kernel: [<c121670f>] vfs_open+0x4f/0x60 sep 30 15:49:17 tablet kernel: [<c1225e22>] path_openat+0x1a2/0x10b0 sep 30 15:49:17 tablet kernel: [<c11e9224>] ? unmap_single_vma+0x3d4/0x560 sep 30 15:49:17 tablet kernel: [<c11cb182>] ? release_pages+0xb2/0x1c0 sep 30 15:49:17 tablet kernel: [<c1227d42>] do_filp_open+0x62/0xc0 sep 30 15:49:17 tablet kernel: [<c1c77da2>] ? _raw_spin_unlock+0x22/0x30 sep 30 15:49:17 tablet kernel: [<c12381b7>] ? __alloc_fd+0x97/0x160 sep 30 15:49:17 tablet kernel: [<c1216ac8>] do_sys_open+0x118/0x210 sep 30 15:49:17 tablet kernel: [<c1216be2>] SyS_open+0x22/0x30 sep 30 15:49:17 tablet kernel: [<c1c787f0>] sysenter_do_call+0x12/0x12
sep 30 15:49:17 tablet kernel: ---[ end trace e0f66305648b063d ]---
The touchscreen works though after this. This is all over ~4.3.0-rc1 (a7d5c1897198, a couple of weeks old)
Quoted 3 lines
If all that fails, could you please send the output of "dmidecode" to Irina?
Attached.
Cheers,
Carlos
# dmidecode 2.12 # SMBIOS entry point at 0x5dc79290 SMBIOS 2.7 present. 51 structures occupying 2041 bytes. Table at 0x5DA0A010.
Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
Vendor: American Megatrends Inc.
Version: 5.6.5
Release Date: 07/25/2014
Address: 0xF0000
Runtime Size: 64 kB
ROM Size: 1024 kB
Characteristics:
PCI is supported
BIOS is upgradeable
BIOS shadowing is allowed
Boot from CD is supported
Selectable boot is supported
BIOS ROM is socketed
EDD is supported
5.25"/1.2 MB floppy services are supported (int 13h) 3.5"/720 kB floppy services are supported (int 13h) 3.5"/2.88 MB floppy services are supported (int 13h) Print screen service is supported (int 5h) Serial services are supported (int 14h) Printer services are supported (int 17h) ACPI is supported
USB legacy is supported
BIOS boot specification is supported Targeted content distribution is supported UEFI is supported
BIOS Revision: 5.6
Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: To be filled by O.E.M. Product Name: To be filled by O.E.M.
Version: To be filled by O.E.M. Serial Number: To be filled by O.E.M.
UUID: 03000200-0400-0500-0006-000700080009 Wake-up Type: Power Switch
SKU Number: To be filled by O.E.M.
Family: To be filled by O.E.M.
Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: AMI Corporation Product Name: Aptio CRB
Version: To be filled by O.E.M. Serial Number: To be filled by O.E.M. Asset Tag: To be filled by O.E.M. Features:
Board is a hosting board Board is replaceable
Location In Chassis: To be filled by O.E.M. Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
Handle 0x0003, DMI type 3, 22 bytes
Chassis Information
Manufacturer: To Be Filled By O.E.M.
Type: Desktop
Lock: Not Present
Version: To Be Filled By O.E.M.
Serial Number: To Be Filled By O.E.M.
Asset Tag: To Be Filled By O.E.M.
Boot-up State: Safe
Power Supply State: Safe
Thermal State: Safe
Security Status: None
OEM Information: 0x00000000
Height: Unspecified
Number Of Power Cords: 1
Contained Elements: 0
SKU Number: To be filled by O.E.M.
Handle 0x0008, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1A1
Internal Connector Type: None
External Reference Designator: PS2Mouse
External Connector Type: PS/2
Port Type: Mouse Port
Handle 0x0009, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1A1
Internal Connector Type: None
External Reference Designator: Keyboard
External Connector Type: PS/2
Port Type: Keyboard Port
Handle 0x000A, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A1 Internal Connector Type: None
External Reference Designator: TV Out External Connector Type: Mini Centronics Type-14 Port Type: Other
Handle 0x000B, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A2A
Internal Connector Type: None
External Reference Designator: COM A
External Connector Type: DB-9 male
Port Type: Serial Port 16550A Compatible
Handle 0x000C, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2A2B
Internal Connector Type: None
External Reference Designator: Video
External Connector Type: DB-15 female
Port Type: Video Port
Handle 0x000D, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J3A1
Internal Connector Type: None
External Reference Designator: USB1
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x000E, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J3A1
Internal Connector Type: None
External Reference Designator: USB2
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x000F, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J3A1
Internal Connector Type: None
External Reference Designator: USB3
External Connector Type: Access Bus (USB)
Port Type: USB
Handle 0x0010, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9A1 - TPM HDR Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x0011, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9C1 - PCIE DOCKING CONN Internal Connector Type: Other
External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x0012, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2B3 - CPU FAN Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x0013, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J6C2 - EXT HDMI Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x0014, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J3C1 - GMCH FAN Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x0015, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1D1 - ITP Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x0016, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9E2 - MDC INTPSR Internal Connector Type: Other
External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x0017, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9E4 - MDC INTPSR Internal Connector Type: Other
External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x0018, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9E3 - LPC HOT DOCKING Internal Connector Type: Other
External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x0019, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9E1 - SCAN MATRIX Internal Connector Type: Other
External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x001A, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J9G1 - LPC SIDE BAND Internal Connector Type: Other
External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x001B, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J8F1 - UNIFIED Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x001C, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J6F1 - LVDS Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x001D, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2F1 - LAI FAN Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x001E, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J2G1 - GFX VID Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x001F, DMI type 8, 9 bytes
Port Connector Information
Internal Reference Designator: J1G6 - AC JACK Internal Connector Type: Other External Reference Designator: Not Specified External Connector Type: None
Port Type: Other
Handle 0x0020, DMI type 9, 17 bytes
System Slot Information
Designation: J6B2
Type: x16 PCI Express
Current Usage: In Use
Length: Long
ID: 0
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported
Bus Address: 0000:00:01.0
Handle 0x0021, DMI type 9, 17 bytes
System Slot Information
Designation: J6B1
Type: x1 PCI Express
Current Usage: In Use
Length: Short
ID: 1
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported
Bus Address: 0000:00:1c.3
Handle 0x0022, DMI type 9, 17 bytes
System Slot Information
Designation: J6D1
Type: x1 PCI Express
Current Usage: In Use
Length: Short
ID: 2
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported
Bus Address: 0000:00:1c.4
Handle 0x0023, DMI type 9, 17 bytes
System Slot Information
Designation: J7B1
Type: x1 PCI Express
Current Usage: In Use
Length: Short
ID: 3
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported
Bus Address: 0000:00:1c.5
Handle 0x0024, DMI type 9, 17 bytes
System Slot Information
Designation: J8B4
Type: x1 PCI Express
Current Usage: In Use
Length: Short
ID: 4
Characteristics:
3.3 V is provided
Opening is shared
PME signal is supported
Bus Address: 0000:00:1c.6
Handle 0x0025, DMI type 10, 6 bytes
On Board Device Information
Type: Video
Status: Enabled
Description: To Be Filled By O.E.M.
Handle 0x0026, DMI type 11, 5 bytes
OEM Strings
String 1: To Be Filled By O.E.M.
Handle 0x0027, DMI type 12, 5 bytes
System Configuration Options
Option 1: To Be Filled By O.E.M.
Handle 0x0028, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: Multi-bit ECC
Maximum Capacity: 4 GB
Error Information Handle: Not Provided
Number Of Devices: 2
Handle 0x0029, DMI type 19, 31 bytes
Memory Array Mapped Address
Starting Address: 0x00000000000 Ending Address: 0x0007FFFFFFF Range Size: 2 GB Physical Array Handle: 0x0028 Partition Width: 2
Handle 0x002A, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0028
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: None
Locator: A1_DIMM0
Bank Locator: A1_BANK0
Type: DDR3
Type Detail: Unknown
Speed: 1333 MHz
Manufacturer: A1_Manufacturer0
Serial Number: A1_SerNum0
Asset Tag: A1_AssetTagNum0
Part Number: Array1_PartNumber0
Rank: Unknown
Configured Clock Speed: 1333 MHz
Handle 0x002B, DMI type 20, 35 bytes
Memory Device Mapped Address
Starting Address: 0x00000000000 Ending Address: 0x0007FFFFFFF Range Size: 2 GB Physical Device Handle: 0x002A Memory Array Mapped Address Handle: 0x0029 Partition Row Position: <OUT OF SPEC> Interleave Position: Unknown Interleaved Data Depth: Unknown
Handle 0x002C, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0028
Error Information Handle: Not Provided
Total Width: 8 bits
Data Width: 64 bits
Size: No Module Installed
Form Factor: DIMM
Set: None
Locator: A1_DIMM1
Bank Locator: A1_BANK1
Type: Unknown
Type Detail: Unknown
Speed: Unknown
Manufacturer: A1_Manufacturer1
Serial Number: A1_SerNum1
Asset Tag: A1_AssetTagNum1
Part Number: Array1_PartNumber1
Rank: Unknown
Configured Clock Speed: 1333 MHz
Handle 0x002D, DMI type 126, 35 bytes
Inactive
Handle 0x002E, DMI type 32, 20 bytes
System Boot Information
Status: No errors detected
Handle 0x002F, DMI type 41, 11 bytes
Onboard Device
Reference Designation: Onboard IGD
Type: Video
Status: Enabled
Type Instance: 1
Bus Address: 0000:00:02.0
Handle 0x0030, DMI type 41, 11 bytes
Onboard Device
Reference Designation: Onboard LAN
Type: Ethernet
Status: Enabled
Type Instance: 1
Bus Address: 0000:00:19.0
Handle 0x0031, DMI type 41, 11 bytes
Onboard Device
Reference Designation: Onboard 1394
Type: Other
Status: Enabled
Type Instance: 1
Bus Address: 0000:03:1c.2
Handle 0x0032, DMI type 7, 19 bytes
Cache Information
Socket Designation: CPU Internal L1
Configuration: Enabled, Not Socketed, Level 1 Operational Mode: Write Back
Location: Internal
Installed Size: 224 kB
Maximum Size: 224 kB
Supported SRAM Types:
Unknown
Installed SRAM Type: Unknown
Speed: Unknown
Error Correction Type: Single-bit ECC System Type: Other
Associativity: Other
Handle 0x0033, DMI type 7, 19 bytes
Cache Information
Socket Designation: CPU Internal L2
Configuration: Enabled, Not Socketed, Level 2 Operational Mode: Write Back
Location: Internal
Installed Size: 2048 kB
Maximum Size: 2048 kB
Supported SRAM Types:
Unknown
Installed SRAM Type: Unknown
Speed: Unknown
Error Correction Type: Single-bit ECC System Type: Unified
Associativity: 16-way Set-associative
Handle 0x0034, DMI type 4, 42 bytes
Processor Information
Socket Designation: SOCKET 0
Type: Central Processor
Family: Core i5
Manufacturer: Intel
ID: 78 06 03 00 FF FB EB BF
Signature: Type 0, Family 6, Model 55, Stepping 8 Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
PSE (Page size extension)
TSC (Time stamp counter)
MSR (Model specific registers)
PAE (Physical address extension)
MCE (Machine check exception)
CX8 (CMPXCHG8 instruction supported) APIC (On-chip APIC hardware supported) SEP (Fast system call)
MTRR (Memory type range registers) PGE (Page global enable)
MCA (Machine check architecture)
CMOV (Conditional move instruction supported) PAT (Page attribute table)
PSE-36 (36-bit page size extension) CLFSH (CLFLUSH instruction supported) DS (Debug store)
ACPI (ACPI supported)
MMX (MMX technology supported)
FXSR (FXSAVE and FXSTOR instructions supported) SSE (Streaming SIMD extensions)
SSE2 (Streaming SIMD extensions 2)
SS (Self-snoop)
HTT (Multi-threading)
TM (Thermal monitor supported)
PBE (Pending break enabled)
Version: Intel(R) Atom(TM) CPU Z3735D @ 1.33GHz
Voltage: 1.2 V
External Clock: 83 MHz
Max Speed: 2400 MHz
Current Speed: 1330 MHz
Status: Populated, Enabled
Upgrade: Socket BGA1155
L1 Cache Handle: 0x0032
L2 Cache Handle: 0x0033
L3 Cache Handle: Not Provided
Serial Number: Not Specified
Asset Tag: Fill By OEM
Part Number: Fill By OEM
Core Count: 4
Core Enabled: 4
Thread Count: 4
Characteristics:
64-bit capable
Handle 0x0035, DMI type 131, 64 bytes
OEM-specific Type
Header and Data: 83 40 35 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 01 00 24 04 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 50 00 00 00 76 50 72 6F 00 00 00 00
Handle 0x0036, DMI type 127, 4 bytes
End Of Table
RE: [PATCH v3 1/5] Input: goodix - reset device at init
Quoted 10 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Carlos Garnacho
Sent: 30 September, 2015 17:02
To: Bastien Nocera
Cc: Tirdea, Irina; [email protected]; Cosimo Cecchi; Christian Hergert; [email protected]; Rob Herring; Pawel Moll; Ian Campbell; Kumar Gala; Purdila, Octavian; Dmitry Torokhov; Mark Rutland; [email protected]
Subject: Re: [PATCH v3 1/5] Input: goodix - reset device at init
Quoted 2 lines
Hey,
Hi Carlos and Bastien,
Thanks for your help and for testing these patches!
<snip>
Quoted 407 lines
Quoted 21 lines
Quoted 7 lines
Quoted 6 lines
I'm not sure how we can detect, and blacklist, those devices. At least
my original device, the Onda v975w, and the WinBook TW100 would have
those problems.Quoted 6 lines
I can use DMI quirks to exclude these devices from using the features that
depend on the gpio pins. I already have the DMI information for WinBook TW100
and WinBook TW700. Could you tell me theDMI_SYS_VENDORandDMI_PRODUCT_NAMEfor Onda v975w so I can add it as well?I don't have access to the Onda v975w anymore, but let me CC: a few people that could also help with testing.
Carlos, Cosimo, Christian, there's a patchset for you to test on the Onda v975w at:
https://github.com/hadess/gt9xx/commits/irina-tirdeaQuoted 5 lines
Doing an "rmmod goodix ; insmod ./goodix_backport.ko" should be enough to test whether the patch set works. If it doesn't work correctly, you'll need to reboot the machine, swap the
irq_idxandrst_idxvalues at:
https://github.com/hadess/gt9xx/commit/c27de79f494c2b2e7a198ff4d27976ae93669dbd#diff-dddc2849e36327439530f3e2faacec4fR321
Quoted 2 lines
and try again.
Unswapped does fail with:
sep 30 15:37:29 tablet kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 1: -121
sep 30 15:37:29 tablet kernel: Goodix-TS i2c-GDIX1001:00: i2c test failed attempt 2: -121
sep 30 15:37:29 tablet kernel: Goodix-TS i2c-GDIX1001:00: I2C communication failure: -121
sep 30 15:37:29 tablet kernel: Goodix-TS: probe of i2c-GDIX1001:00 failed with error -121Swapping the values triggers some errors:
sep 30 15:48:17 tablet kernel: ------------[ cut here ]------------ sep 30 15:48:17 tablet kernel: WARNING: CPU: 1 PID: 2341 at
drivers/pinctrl/intel/pinctrl-baytrail.c:342byt_gpio_direction_output+0xa1/0xb0()
sep 30 15:48:17 tablet kernel: Potential Error: Setting GPIO withdirect_irq_ento output
sep 30 15:48:17 tablet kernel: Modules linked in:
sep 30 15:48:17 tablet kernel:goodix_backport(OE+)r8723bs(OE) nfsd lockd grace sunrpc [last unloaded: goodix]
sep 30 15:48:17 tablet kernel: CPU: 1 PID: 2341 Comm: insmod Tainted:
G OE 4.3.0-rc1+ #36
sep 30 15:48:17 tablet kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014 sep 30 15:48:17 tablet kernel: 00000000 00000000d3f61c08c13b347fd3f61c48d3f61c38c10a9e1dc20f10e0
sep 30 15:48:17 tablet kernel:d3f61c6400000925c20f111c00000156c13e7ce1c13e7ce1f80580b8f53a4b0c
sep 30 15:48:17 tablet kernel: 00000156d3f61c50c10a9e9300000009d3f61c48c20f10e0d3f61c64d3f61c78
sep 30 15:48:17 tablet kernel: Call Trace:sep 30 15:48:17 tablet kernel: [<c13b347f>] dump_stack+0x48/0x69 sep 30 15:48:17 tablet kernel: [<c10a9e1d>] warn_slowpath_common+0x8d/0xd0 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c10a9e93>] warn_slowpath_fmt+0x33/0x40 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c13e7c40>] ? byt_gpio_irq_handler+0xb0/0xb0 sep 30 15:48:17 tablet kernel: [<c13eabc3>] _gpiod_direction_output_raw+0x63/0x350 sep 30 15:48:17 tablet kernel: [<c13eaf1a>] gpiod_direction_output+0x2a/0x50 sep 30 15:48:17 tablet kernel: [<c112b846>] ? msleep+0x36/0x40 sep 30 15:48:17 tablet kernel: [<f9ff38ae>] goodix_reset+0x3e/0x90 [goodix_backport] sep 30 15:48:17 tablet kernel: [<f9ff40fa>] goodix_ts_probe+0x12a/0x5aa [goodix_backport] sep 30 15:48:17 tablet kernel: [<c142a5a4>] ? acpi_device_wakeup+0x7a/0x80 sep 30 15:48:17 tablet kernel: [<c142ad84>] ? acpi_dev_pm_attach+0x71/0x87 sep 30 15:48:17 tablet kernel: [<c1924271>] i2c_device_probe+0x121/0x1d0 sep 30 15:48:17 tablet kernel: [<c1c77da2>] ? _raw_spin_unlock+0x22/0x30 sep 30 15:48:17 tablet kernel: [<f9ff3fd0>] ? goodix_config_cb+0xc0/0xc0 [goodix_backport] sep 30 15:48:17 tablet kernel: [<c15b2125>] ? driver_sysfs_add+0x75/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2b24>] driver_probe_device+0x204/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b2e3c>] ? __driver_attach+0x5c/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2e3c>] ? __driver_attach+0x5c/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2e79>] __driver_attach+0x99/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2de0>] ? driver_probe_device+0x4c0/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b092f>] bus_for_each_dev+0x4f/0x80 sep 30 15:48:17 tablet kernel: [<c15b22de>] driver_attach+0x1e/0x20 sep 30 15:48:17 tablet kernel: [<c15b2de0>] ? driver_probe_device+0x4c0/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b1e77>] bus_add_driver+0x1f7/0x2a0 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<c15b398d>] driver_register+0x5d/0xf0 sep 30 15:48:17 tablet kernel: [<c1924daa>] i2c_register_driver+0x2a/0xa0 sep 30 15:48:17 tablet kernel: [<c100045f>] ? do_one_initcall+0x9f/0x1f0 sep 30 15:48:17 tablet kernel: [<f9ff7012>] goodix_ts_driver_init+0x12/0x14 [goodix_backport] sep 30 15:48:17 tablet kernel: [<c100046a>] do_one_initcall+0xaa/0x1f0 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<c10d2486>] ? __might_sleep+0x36/0xa0 sep 30 15:48:17 tablet kernel: [<c1103fd4>] ? trace_hardirqs_on_caller+0x14/0x220 sep 30 15:48:17 tablet kernel: [<c11c1c5c>] ? free_pages_prepare+0x19c/0x380 sep 30 15:48:17 tablet kernel: [<c120bce8>] ? kmem_cache_alloc_trace+0xa8/0x2a0 sep 30 15:48:17 tablet kernel: [<c11bac3f>] ? do_init_module+0x21/0x1b0 sep 30 15:48:17 tablet kernel: [<c11bac6e>] do_init_module+0x50/0x1b0 sep 30 15:48:17 tablet kernel: [<c114b69b>] load_module+0x13db/0x1980 sep 30 15:48:17 tablet kernel: [<c114be29>] SyS_finit_module+0x89/0xd0 sep 30 15:48:17 tablet kernel: [<c11d9532>] ? vm_mmap_pgoff+0x62/0x80 sep 30 15:48:17 tablet kernel: [<c1c787f0>] sysenter_do_call+0x12/0x12sep 30 15:48:17 tablet kernel: ---[ end trace
e0f66305648b0639]--- sep 30 15:48:17 tablet kernel: ------------[ cut here ]------------ sep 30 15:48:17 tablet kernel: WARNING: CPU: 1 PID: 2341 atdrivers/pinctrl/intel/pinctrl-baytrail.c:342byt_gpio_direction_output+0xa1/0xb0()
sep 30 15:48:17 tablet kernel: Potential Error: Setting GPIO withdirect_irq_ento output
sep 30 15:48:17 tablet kernel: Modules linked in:
sep 30 15:48:17 tablet kernel:goodix_backport(OE+)r8723bs(OE) nfsd lockd grace sunrpc [last unloaded: goodix]
sep 30 15:48:17 tablet kernel: CPU: 1 PID: 2341 Comm: insmod Tainted:
G W OE 4.3.0-rc1+ #36
sep 30 15:48:17 tablet kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014 sep 30 15:48:17 tablet kernel: 00000000 00000000d3f61bfcc13b347fd3f61c3cd3f61c2cc10a9e1dc20f10e0
sep 30 15:48:17 tablet kernel:d3f61c5800000925c20f111c00000156c13e7ce1c13e7ce1f80580b8f53a4b0c
sep 30 15:48:17 tablet kernel: 00000156d3f61c44c10a9e9300000009d3f61c3cc20f10e0d3f61c58d3f61c6c
sep 30 15:48:17 tablet kernel: Call Trace:sep 30 15:48:17 tablet kernel: [<c13b347f>] dump_stack+0x48/0x69 sep 30 15:48:17 tablet kernel: [<c10a9e1d>] warn_slowpath_common+0x8d/0xd0 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c10a9e93>] warn_slowpath_fmt+0x33/0x40 sep 30 15:48:17 tablet kernel: [<c13e7ce1>] byt_gpio_direction_output+0xa1/0xb0 sep 30 15:48:17 tablet kernel: [<c13e7c40>] ? byt_gpio_irq_handler+0xb0/0xb0 sep 30 15:48:17 tablet kernel: [<c13eabc3>] _gpiod_direction_output_raw+0x63/0x350 sep 30 15:48:17 tablet kernel: [<c13e7853>] ? byt_gpio_direction_input+0x43/0x50 sep 30 15:48:17 tablet kernel: [<c13eaf1a>] gpiod_direction_output+0x2a/0x50 sep 30 15:48:17 tablet kernel: [<f9ff37e4>] goodix_int_sync.isra.4+0x14/0x30 [goodix_backport] sep 30 15:48:17 tablet kernel: [<f9ff38f5>] goodix_reset+0x85/0x90 [goodix_backport] sep 30 15:48:17 tablet kernel: [<f9ff40fa>] goodix_ts_probe+0x12a/0x5aa [goodix_backport] sep 30 15:48:17 tablet kernel: [<c142a5a4>] ? acpi_device_wakeup+0x7a/0x80 sep 30 15:48:17 tablet kernel: [<c142ad84>] ? acpi_dev_pm_attach+0x71/0x87 sep 30 15:48:17 tablet kernel: [<c1924271>] i2c_device_probe+0x121/0x1d0 sep 30 15:48:17 tablet kernel: [<c1c77da2>] ? _raw_spin_unlock+0x22/0x30 sep 30 15:48:17 tablet kernel: [<f9ff3fd0>] ? goodix_config_cb+0xc0/0xc0 [goodix_backport] sep 30 15:48:17 tablet kernel: [<c15b2125>] ? driver_sysfs_add+0x75/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2b24>] driver_probe_device+0x204/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b2e3c>] ? __driver_attach+0x5c/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2e3c>] ? __driver_attach+0x5c/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2e79>] __driver_attach+0x99/0xa0 sep 30 15:48:17 tablet kernel: [<c15b2de0>] ? driver_probe_device+0x4c0/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b092f>] bus_for_each_dev+0x4f/0x80 sep 30 15:48:17 tablet kernel: [<c15b22de>] driver_attach+0x1e/0x20 sep 30 15:48:17 tablet kernel: [<c15b2de0>] ? driver_probe_device+0x4c0/0x4c0 sep 30 15:48:17 tablet kernel: [<c15b1e77>] bus_add_driver+0x1f7/0x2a0 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<c15b398d>] driver_register+0x5d/0xf0 sep 30 15:48:17 tablet kernel: [<c1924daa>] i2c_register_driver+0x2a/0xa0 sep 30 15:48:17 tablet kernel: [<c100045f>] ? do_one_initcall+0x9f/0x1f0 sep 30 15:48:17 tablet kernel: [<f9ff7012>] goodix_ts_driver_init+0x12/0x14 [goodix_backport] sep 30 15:48:17 tablet kernel: [<c100046a>] do_one_initcall+0xaa/0x1f0 sep 30 15:48:17 tablet kernel: [<f9ff7000>] ? 0xf9ff7000 sep 30 15:48:17 tablet kernel: [<c10d2486>] ? __might_sleep+0x36/0xa0 sep 30 15:48:17 tablet kernel: [<c1103fd4>] ? trace_hardirqs_on_caller+0x14/0x220 sep 30 15:48:17 tablet kernel: [<c11c1c5c>] ? free_pages_prepare+0x19c/0x380 sep 30 15:48:17 tablet kernel: [<c120bce8>] ? kmem_cache_alloc_trace+0xa8/0x2a0 sep 30 15:48:17 tablet kernel: [<c11bac3f>] ? do_init_module+0x21/0x1b0 sep 30 15:48:17 tablet kernel: [<c11bac6e>] do_init_module+0x50/0x1b0 sep 30 15:48:17 tablet kernel: [<c114b69b>] load_module+0x13db/0x1980 sep 30 15:48:17 tablet kernel: [<c114be29>] SyS_finit_module+0x89/0xd0 sep 30 15:48:17 tablet kernel: [<c11d9532>] ? vm_mmap_pgoff+0x62/0x80 sep 30 15:48:17 tablet kernel: [<c1c787f0>] sysenter_do_call+0x12/0x12sep 30 15:48:17 tablet kernel: ---[ end trace
e0f66305648b063a]--- sep 30 15:48:17 tablet kernel: Goodix-TS i2c-GDIX1001:00: ID 9271, version: 1020 sep 30 15:48:17 tablet kernel: Goodix-TS i2c-GDIX1001:00: Direct firmware load for goodix_9271_cfg.bin failed with error -2
sep 30 15:48:17 tablet kernel: Goodix-TS i2c-GDIX1001:00: Falling back to user helper... and after a while:
sep 30 15:49:17 tablet kernel: input: Goodix Capacitive TouchScreen as /devices/platform/80860F41:05/i2c-5/i2c-GDIX1001:00/input/input6 sep 30 15:49:17 tablet kernel: ------------[ cut here ]------------ sep 30 15:49:17 tablet kernel: WARNING: CPU: 1 PID: 75 at
drivers/pinctrl/intel/pinctrl-baytrail.c:342byt_gpio_direction_output+0xa1/0xb0()
sep 30 15:49:17 tablet kernel: Potential Error: Setting GPIO withdirect_irq_ento output
sep 30 15:49:17 tablet kernel: Modules linked in:
sep 30 15:49:17 tablet kernel:goodix_backport(OE)r8723bs(OE) nfsd lockd grace sunrpc [last unloaded: goodix]
sep 30 15:49:17 tablet kernel: CPU: 1 PID: 75 Comm: kworker/1:2Tainted: G W OE 4.3.0-rc1+ #36sep 30 15:49:17 tablet kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014
sep 30 15:49:17 tablet kernel: Workqueue: eventsrequest_firmware_work_funcsep 30 15:49:17 tablet kernel: 00000000 00000000f7219ce8c13b347ff7219d28f7219d18c10a9e1dc20f10e0
sep 30 15:49:17 tablet kernel:f7219d440000004bc20f111c00000156c13e7ce1c13e7ce1f80580b8f53a4b0c
sep 30 15:49:17 tablet kernel: 00000156f7219d30c10a9e9300000009f7219d28c20f10e0f7219d44f7219d58
sep 30 15:49:17 tablet kernel: Call Trace:sep 30 15:49:17 tablet kernel: [<c13b347f>] dump_stack+0x48/0x69 sep 30 15:49:17 tablet kernel: [<c10a9e1d>] warn_slowpath_common+0x8d/0xd0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c10a9e93>] warn_slowpath_fmt+0x33/0x40 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7c40>] ? byt_gpio_irq_handler+0xb0/0xb0 sep 30 15:49:17 tablet kernel: [<c13eabc3>] _gpiod_direction_output_raw+0x63/0x350 sep 30 15:49:17 tablet kernel: [<c111d30b>] ? free_irq+0x4b/0xc0 sep 30 15:49:17 tablet kernel: [<c142a87d>] ? acpi_dev_runtime_suspend+0x7b/0x7b sep 30 15:49:17 tablet kernel: [<c13eaf1a>] gpiod_direction_output+0x2a/0x50 sep 30 15:49:17 tablet kernel: [<f9ff32d0>] goodix_suspend+0x50/0x100[
goodix_backport]
sep 30 15:49:17 tablet kernel: [<c15bc0fd>] ?__rpm_callback+0x5d/0x80sep 30 15:49:17 tablet kernel: [<c15ba3a2>]pm_generic_runtime_suspend+0x22/0x40
sep 30 15:49:17 tablet kernel: [<c142a88d>]acpi_subsys_runtime_suspend+0x10/0x1e sep 30 15:49:17 tablet kernel: [<c15bc0d2>] __rpm_callback+0x32/0x80 sep 30 15:49:17 tablet kernel: [<c142a87d>] ? acpi_dev_runtime_suspend+0x7b/0x7b sep 30 15:49:17 tablet kernel: [<c15bc148>] rpm_callback+0x28/0x90 sep 30 15:49:17 tablet kernel: [<c142a87d>] ? acpi_dev_runtime_suspend+0x7b/0x7b sep 30 15:49:17 tablet kernel: [<c15bce3a>] rpm_suspend+0x12a/0x720 sep 30 15:49:17 tablet kernel: [<c10fffbb>] ? trace_hardirqs_off+0xb/0x10 sep 30 15:49:17 tablet kernel: [<c10f3fd4>] ? __wake_up+0x44/0x50 sep 30 15:49:17 tablet kernel: [<c15bd5a6>] rpm_idle+0xa6/0x410 sep 30 15:49:17 tablet kernel: [<c15be1ab>] update_autosuspend+0x3b/0x60 sep 30 15:49:17 tablet kernel: [<c15be218>] pm_runtime_set_autosuspend_delay+0x48/0x60 sep 30 15:49:17 tablet kernel: [<c10c4942>] ? process_one_work+0x132/0x5e0 sep 30 15:49:17 tablet kernel: [<f9ff3f82>] goodix_config_cb+0x72/0xc0 [goodix_backport] sep 30 15:49:17 tablet kernel: [<c15c81ab>] request_firmware_work_func+0x2b/0x50 sep 30 15:49:17 tablet kernel: [<c10c49e0>] process_one_work+0x1d0/0x5e0 sep 30 15:49:17 tablet kernel: [<c10c4942>] ? process_one_work+0x132/0x5e0 sep 30 15:49:17 tablet kernel: [<c10c4e29>] worker_thread+0x39/0x430 sep 30 15:49:17 tablet kernel: [<c10c4df0>] ? process_one_work+0x5e0/0x5e0 sep 30 15:49:17 tablet kernel: [<c10cae16>] kthread+0xa6/0xc0 sep 30 15:49:17 tablet kernel: [<c1c77e17>] ? _raw_spin_unlock_irq+0x27/0x40 sep 30 15:49:17 tablet kernel: [<c1c78721>] ret_from_kernel_thread+0x21/0x30sep 30 15:49:17 tablet kernel: [<
c10cad70>] ?kthread_create_on_node+0x130/0x130
sep 30 15:49:17 tablet kernel: ---[ end tracee0f66305648b063b]--- sep 30 15:49:17 tablet kernel: ------------[ cut here ]------------ sep 30 15:49:17 tablet kernel: WARNING: CPU: 2 PID: 2353 atdrivers/pinctrl/intel/pinctrl-baytrail.c:342byt_gpio_direction_output+0xa1/0xb0()
sep 30 15:49:17 tablet kernel: Potential Error: Setting GPIO withdirect_irq_ento output
sep 30 15:49:17 tablet kernel: Modules linked in:
sep 30 15:49:17 tablet kernel:goodix_backport(OE)r8723bs(OE) nfsd lockd grace sunrpc [last unloaded: goodix]
sep 30 15:49:17 tablet kernel: CPU: 2 PID: 2353 Comm: systemd-udevdTainted: G W OE 4.3.0-rc1+ #36sep 30 15:49:17 tablet kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014 sep 30 15:49:17 tablet kernel: 00000000 00000000
d8bbdc70c13b347fd8bbdcb0d8bbdca0c10a9e1dc20f10e0
sep 30 15:49:17 tablet kernel:d8bbdccc00000931c20f111c00000156c13e7ce1c13e7ce1f80580b8f53a4b0c
sep 30 15:49:17 tablet kernel: 00000156d8bbdcb8c10a9e9300000009d8bbdcb0c20f10e0d8bbdcccd8bbdce0
sep 30 15:49:17 tablet kernel: Call Trace:sep 30 15:49:17 tablet kernel: [<c13b347f>] dump_stack+0x48/0x69 sep 30 15:49:17 tablet kernel: [<c10a9e1d>] warn_slowpath_common+0x8d/0xd0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c10a9e93>] warn_slowpath_fmt+0x33/0x40 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7c40>] ? byt_gpio_irq_handler+0xb0/0xb0 sep 30 15:49:17 tablet kernel: [<c13eabc3>] _gpiod_direction_output_raw+0x63/0x350 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c13eaf1a>] gpiod_direction_output+0x2a/0x50 sep 30 15:49:17 tablet kernel: [<c142a5a4>] ? acpi_device_wakeup+0x7a/0x80 sep 30 15:49:17 tablet kernel: [<f9ff3827>] goodix_resume+0x27/0x70 [goodix_backport] sep 30 15:49:17 tablet kernel: [<c15ba3e2>] pm_generic_runtime_resume+0x22/0x40 sep 30 15:49:17 tablet kernel: [<c142a6c5>] acpi_subsys_runtime_resume+0x1b/0x1e sep 30 15:49:17 tablet kernel: [<c15bc0d2>] __rpm_callback+0x32/0x80 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c15bc148>] rpm_callback+0x28/0x90 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c15bcab3>] rpm_resume+0x503/0x760 sep 30 15:49:17 tablet kernel: [<c10f4710>] ? wake_atomic_t_function+0x70/0x70 sep 30 15:49:17 tablet kernel: [<c15bde1e>] __pm_runtime_resume+0x4e/0x90 sep 30 15:49:17 tablet kernel: [<f9ff3777>] goodix_open+0x37/0x90 [goodix_backport] sep 30 15:49:17 tablet kernel: [<c18f9e3f>] input_open_device+0x7f/0xa0 sep 30 15:49:17 tablet kernel: [<c1902c5b>] evdev_open+0x16b/0x1a0 sep 30 15:49:17 tablet kernel: [<c121b9fd>] chrdev_open+0x8d/0x1a0 sep 30 15:49:17 tablet kernel: [<c121b970>] ? cdev_put+0x20/0x20 sep 30 15:49:17 tablet kernel: [<c1215230>] do_dentry_open.isra.16+0x130/0x2d0 sep 30 15:49:17 tablet kernel: [<c121b970>] ? cdev_put+0x20/0x20 sep 30 15:49:17 tablet kernel: [<c121670f>] vfs_open+0x4f/0x60 sep 30 15:49:17 tablet kernel: [<c1225e22>] path_openat+0x1a2/0x10b0 sep 30 15:49:17 tablet kernel: [<c11e9224>] ? unmap_single_vma+0x3d4/0x560 sep 30 15:49:17 tablet kernel: [<c11cb182>] ? release_pages+0xb2/0x1c0 sep 30 15:49:17 tablet kernel: [<c1227d42>] do_filp_open+0x62/0xc0 sep 30 15:49:17 tablet kernel: [<c1c77da2>] ? _raw_spin_unlock+0x22/0x30 sep 30 15:49:17 tablet kernel: [<c12381b7>] ? __alloc_fd+0x97/0x160 sep 30 15:49:17 tablet kernel: [<c1216ac8>] do_sys_open+0x118/0x210 sep 30 15:49:17 tablet kernel: [<c1216be2>] SyS_open+0x22/0x30 sep 30 15:49:17 tablet kernel: [<c1c787f0>] sysenter_do_call+0x12/0x12sep 30 15:49:17 tablet kernel: ---[ end trace
e0f66305648b063c]--- sep 30 15:49:17 tablet kernel: ------------[ cut here ]------------ sep 30 15:49:17 tablet kernel: WARNING: CPU: 2 PID: 2353 atdrivers/pinctrl/intel/pinctrl-baytrail.c:342byt_gpio_direction_output+0xa1/0xb0()
sep 30 15:49:17 tablet kernel: Potential Error: Setting GPIO withdirect_irq_ento output
sep 30 15:49:17 tablet kernel: Modules linked in:
sep 30 15:49:17 tablet kernel:goodix_backport(OE)r8723bs(OE) nfsd lockd grace sunrpc [last unloaded: goodix]
sep 30 15:49:17 tablet kernel: CPU: 2 PID: 2353 Comm: systemd-udevdTainted: G W OE 4.3.0-rc1+ #36sep 30 15:49:17 tablet kernel: Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 07/25/2014 sep 30 15:49:17 tablet kernel: 00000000 00000000
d8bbdc64c13b347fd8bbdca4d8bbdc94c10a9e1dc20f10e0
sep 30 15:49:17 tablet kernel:d8bbdcc000000931c20f111c00000156c13e7ce1c13e7ce1f80580b8f53a4b0c
sep 30 15:49:17 tablet kernel: 00000156d8bbdcacc10a9e9300000009d8bbdca4c20f10e0d8bbdcc0d8bbdcd4
sep 30 15:49:17 tablet kernel: Call Trace:sep 30 15:49:17 tablet kernel: [<c13b347f>] dump_stack+0x48/0x69 sep 30 15:49:17 tablet kernel: [<c10a9e1d>] warn_slowpath_common+0x8d/0xd0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] ? byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c10a9e93>] warn_slowpath_fmt+0x33/0x40 sep 30 15:49:17 tablet kernel: [<c13e7ce1>] byt_gpio_direction_output+0xa1/0xb0 sep 30 15:49:17 tablet kernel: [<c13e7c40>] ? byt_gpio_irq_handler+0xb0/0xb0 sep 30 15:49:17 tablet kernel: [<c13eabc3>] _gpiod_direction_output_raw+0x63/0x350 sep 30 15:49:17 tablet kernel: [<c1c76ef4>] ? schedule_hrtimeout_range_clock+0x104/0x280 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c13eaf1a>] gpiod_direction_output+0x2a/0x50 sep 30 15:49:17 tablet kernel: [<f9ff37e4>] goodix_int_sync.isra.4+0x14/0x30 [goodix_backport] sep 30 15:49:17 tablet kernel: [<f9ff3847>] goodix_resume+0x47/0x70 [goodix_backport] sep 30 15:49:17 tablet kernel: [<c15ba3e2>] pm_generic_runtime_resume+0x22/0x40 sep 30 15:49:17 tablet kernel: [<c142a6c5>] acpi_subsys_runtime_resume+0x1b/0x1e sep 30 15:49:17 tablet kernel: [<c15bc0d2>] __rpm_callback+0x32/0x80 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c15bc148>] rpm_callback+0x28/0x90 sep 30 15:49:17 tablet kernel: [<c142a6aa>] ? acpi_dev_runtime_resume+0x37/0x37 sep 30 15:49:17 tablet kernel: [<c15bcab3>] rpm_resume+0x503/0x760 sep 30 15:49:17 tablet kernel: [<c10f4710>] ? wake_atomic_t_function+0x70/0x70 sep 30 15:49:17 tablet kernel: [<c15bde1e>] __pm_runtime_resume+0x4e/0x90 sep 30 15:49:17 tablet kernel: [<f9ff3777>] goodix_open+0x37/0x90 [goodix_backport] sep 30 15:49:17 tablet kernel: [<c18f9e3f>] input_open_device+0x7f/0xa0 sep 30 15:49:17 tablet kernel: [<c1902c5b>] evdev_open+0x16b/0x1a0 sep 30 15:49:17 tablet kernel: [<c121b9fd>] chrdev_open+0x8d/0x1a0 sep 30 15:49:17 tablet kernel: [<c121b970>] ? cdev_put+0x20/0x20 sep 30 15:49:17 tablet kernel: [<c1215230>] do_dentry_open.isra.16+0x130/0x2d0 sep 30 15:49:17 tablet kernel: [<c121b970>] ? cdev_put+0x20/0x20 sep 30 15:49:17 tablet kernel: [<c121670f>] vfs_open+0x4f/0x60 sep 30 15:49:17 tablet kernel: [<c1225e22>] path_openat+0x1a2/0x10b0 sep 30 15:49:17 tablet kernel: [<c11e9224>] ? unmap_single_vma+0x3d4/0x560 sep 30 15:49:17 tablet kernel: [<c11cb182>] ? release_pages+0xb2/0x1c0 sep 30 15:49:17 tablet kernel: [<c1227d42>] do_filp_open+0x62/0xc0 sep 30 15:49:17 tablet kernel: [<c1c77da2>] ? _raw_spin_unlock+0x22/0x30 sep 30 15:49:17 tablet kernel: [<c12381b7>] ? __alloc_fd+0x97/0x160 sep 30 15:49:17 tablet kernel: [<c1216ac8>] do_sys_open+0x118/0x210 sep 30 15:49:17 tablet kernel: [<c1216be2>] SyS_open+0x22/0x30 sep 30 15:49:17 tablet kernel: [<c1c787f0>] sysenter_do_call+0x12/0x12
Quoted 5 lines
sep 30 15:49:17 tablet kernel: ---[ end trace
e0f66305648b063d]---The touchscreen works though after this. This is all over ~4.3.0-rc1 (
a7d5c1897198, a couple of weeks old)
This is what I expected to happen. However, it is rather annoying to receive this baytrail pinctrl warning every time gpiod_direction_output is called for the interrupt gpio pin (not to mention delays in initialization). I think the safest way is to remove the newly added functionality for this device as well.
Quoted 6 lines
Quoted 3 lines
If all that fails, could you please send the output of "dmidecode" to Irina?
Attached.
Apparently the system vendor and product name are not set for this device ("To be filled by O.E.M."). Although it is not as reliable, I will do the dmi match using BIOS vendor, product UUID, board vendor and board name. Please let me know if you see any problem with this approach.
I will send a new version of patches in which the functionality that depends on the gpio pins is skipped for Onda v975w, WinBook TW100 and WinBook TW700.
Thanks,
Irina
Quoted 2 lines
Cheers,
Carlos