From patchwork Wed Sep 14 14:14:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 605980 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92F32ECAAD3 for ; Wed, 14 Sep 2022 14:14:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229538AbiINOOg (ORCPT ); Wed, 14 Sep 2022 10:14:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229742AbiINOOe (ORCPT ); Wed, 14 Sep 2022 10:14:34 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FC5410F6; Wed, 14 Sep 2022 07:14:33 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id i15-20020a17090a4b8f00b0020073b4ac27so14581530pjh.3; Wed, 14 Sep 2022 07:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=oIEob1ZiIx5fsygiet7+nmwPOGiHlT4qbURIwP17aWE=; b=E4vK2AaaR9jzvzQMZSqpFaa46k11q0SWvM9z4Aihfq4jdaYMqQtd1n4kuoQO6X/H5V v4oeRv82+KtBROYhDvkX/gWFba6ziRdqE6+hMv0dMyG7jjxJjU/xP0BPcpF/Xk2RwPA4 Wmexf3/Su/VboCc7Xs/Qmra5HxYwDLCaaw1A2RaY9uaLPyTxvAR/se2avYM1Jm/vYBJO clj8D0iiFFlxfwQdqa2jH7yEsemwxoEFoUAre+0qjQXH0qeQQUN9V0dNN7vS06NfUAQM 3ciDKKbw+CKoWHcKjGNSDZEujWYUCZlFUzw7H/cEnpuKqYNBujdO8q93tn+AvcstQkoM QMwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=oIEob1ZiIx5fsygiet7+nmwPOGiHlT4qbURIwP17aWE=; b=Plmil9SaM/zq2PM0fdYUv2qRH5KiRykTlk7Qve6ZIzZB1mRFSrQhYs0Xbt/2lRFU4k rQ1G8PZYbI+X2cZiQG5FViR8W9qJEIPJD8GM0XWXmYkamaUrnvwPZNviHpbx4h9i3vRV hLKpbNeWfBebvaRcOADJNZS26VFz7DnIriloc35fT+vcUcWyXEWHhoYFYXtDlcNTkyNM N2Sd01jyeslEeov6layNWu2zheiRXXclioiKWsSkoOskaXPUR7dMnWAlOCoqujWTU67Q NY1dc1ZGKpV/6PtixM1y9f8FdKPFnBIwA2RDucFWe+99p1jxJViCztafBTv+8Qm4zpCO 6ByQ== X-Gm-Message-State: ACrzQf2G9n6SdgC/EGOQIsYLXKv3vyjM4IATHtyuDBAZIq7uQxOPSQCS udhowBG2jWV+lAvdk6G9nA5YV2eImqGCrg== X-Google-Smtp-Source: AMsMyM7TOnJiUg2Rd8uz05n07Tj/B0wG9s/NUEVXmZhj4kvwrbuiLySzc/MxsGBRm2uAdkF+61+TSg== X-Received: by 2002:a17:90b:3847:b0:203:1ef6:ce1 with SMTP id nl7-20020a17090b384700b002031ef60ce1mr2530309pjb.113.1663164872633; Wed, 14 Sep 2022 07:14:32 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:2f68:fe7:a2e6:7595]) by smtp.gmail.com with ESMTPSA id a9-20020a170902ecc900b0017839e5abfasm6480624plh.263.2022.09.14.07.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 07:14:31 -0700 (PDT) From: Dmitry Torokhov To: Heiko Stuebner Cc: Linus Walleij , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/5] Input: auo-pixcir-ts - drop support for platform data Date: Wed, 14 Sep 2022 07:14:24 -0700 Message-Id: <20220914141428.2201784-1-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Currently there are no users of auo_pixcir_ts_platdata in the mainline, and having it (with legacy gpio numbers) prevents us from converting the driver to gpiod API, so let's drop it. If, in the future, someone wants to use this driver on non-device tree, non-ACPI system, they should use static device properties instead of platform data. Signed-off-by: Dmitry Torokhov Reviewed-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Reviewed-by: Heiko Stuebner --- drivers/input/touchscreen/auo-pixcir-ts.c | 118 ++++++++++------------ include/linux/input/auo-pixcir-ts.h | 44 -------- 2 files changed, 56 insertions(+), 106 deletions(-) delete mode 100644 include/linux/input/auo-pixcir-ts.h diff --git a/drivers/input/touchscreen/auo-pixcir-ts.c b/drivers/input/touchscreen/auo-pixcir-ts.c index c33e63ca6142..a51d66ebff2b 100644 --- a/drivers/input/touchscreen/auo-pixcir-ts.c +++ b/drivers/input/touchscreen/auo-pixcir-ts.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -69,6 +68,16 @@ #define AUO_PIXCIR_INT_RELEASE (1 << 4) #define AUO_PIXCIR_INT_ENABLE (1 << 3) #define AUO_PIXCIR_INT_POL_HIGH (1 << 2) + +/* + * Interrupt modes: + * periodical: interrupt is asserted periodicaly + * compare coordinates: interrupt is asserted when coordinates change + * indicate touch: interrupt is asserted during touch + */ +#define AUO_PIXCIR_INT_PERIODICAL 0x00 +#define AUO_PIXCIR_INT_COMP_COORD 0x01 +#define AUO_PIXCIR_INT_TOUCH_IND 0x02 #define AUO_PIXCIR_INT_MODE_MASK 0x03 /* @@ -103,10 +112,14 @@ struct auo_pixcir_ts { struct i2c_client *client; struct input_dev *input; - const struct auo_pixcir_ts_platdata *pdata; + int gpio_int; + int gpio_rst; char phys[32]; - /* special handling for touch_indicate interupt mode */ + unsigned int x_max; + unsigned int y_max; + + /* special handling for touch_indicate interrupt mode */ bool touch_ind_mode; wait_queue_head_t wait; @@ -125,7 +138,6 @@ static int auo_pixcir_collect_data(struct auo_pixcir_ts *ts, struct auo_point_t *point) { struct i2c_client *client = ts->client; - const struct auo_pixcir_ts_platdata *pdata = ts->pdata; uint8_t raw_coord[8]; uint8_t raw_area[4]; int i, ret; @@ -152,8 +164,8 @@ static int auo_pixcir_collect_data(struct auo_pixcir_ts *ts, point[i].coord_y = raw_coord[4 * i + 3] << 8 | raw_coord[4 * i + 2]; - if (point[i].coord_x > pdata->x_max || - point[i].coord_y > pdata->y_max) { + if (point[i].coord_x > ts->x_max || + point[i].coord_y > ts->y_max) { dev_warn(&client->dev, "coordinates (%d,%d) invalid\n", point[i].coord_x, point[i].coord_y); point[i].coord_x = point[i].coord_y = 0; @@ -171,7 +183,6 @@ static int auo_pixcir_collect_data(struct auo_pixcir_ts *ts, static irqreturn_t auo_pixcir_interrupt(int irq, void *dev_id) { struct auo_pixcir_ts *ts = dev_id; - const struct auo_pixcir_ts_platdata *pdata = ts->pdata; struct auo_point_t point[AUO_PIXCIR_REPORT_POINTS]; int i; int ret; @@ -182,7 +193,7 @@ static irqreturn_t auo_pixcir_interrupt(int irq, void *dev_id) /* check for up event in touch touch_ind_mode */ if (ts->touch_ind_mode) { - if (gpio_get_value(pdata->gpio_int) == 0) { + if (gpio_get_value(ts->gpio_int) == 0) { input_mt_sync(ts->input); input_report_key(ts->input, BTN_TOUCH, 0); input_sync(ts->input); @@ -278,11 +289,9 @@ static int auo_pixcir_power_mode(struct auo_pixcir_ts *ts, int mode) return 0; } -static int auo_pixcir_int_config(struct auo_pixcir_ts *ts, - int int_setting) +static int auo_pixcir_int_config(struct auo_pixcir_ts *ts, int int_setting) { struct i2c_client *client = ts->client; - const struct auo_pixcir_ts_platdata *pdata = ts->pdata; int ret; ret = i2c_smbus_read_byte_data(client, AUO_PIXCIR_REG_INT_SETTING); @@ -304,7 +313,7 @@ static int auo_pixcir_int_config(struct auo_pixcir_ts *ts, return ret; } - ts->touch_ind_mode = pdata->int_setting == AUO_PIXCIR_INT_TOUCH_IND; + ts->touch_ind_mode = int_setting == AUO_PIXCIR_INT_TOUCH_IND; return 0; } @@ -466,49 +475,41 @@ static SIMPLE_DEV_PM_OPS(auo_pixcir_pm_ops, auo_pixcir_suspend, auo_pixcir_resume); #ifdef CONFIG_OF -static struct auo_pixcir_ts_platdata *auo_pixcir_parse_dt(struct device *dev) +static int auo_pixcir_parse_dt(struct device *dev, struct auo_pixcir_ts *ts) { - struct auo_pixcir_ts_platdata *pdata; struct device_node *np = dev->of_node; if (!np) - return ERR_PTR(-ENOENT); + return -ENOENT; - pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) - return ERR_PTR(-ENOMEM); - - pdata->gpio_int = of_get_gpio(np, 0); - if (!gpio_is_valid(pdata->gpio_int)) { + ts->gpio_int = of_get_gpio(np, 0); + if (!gpio_is_valid(ts->gpio_int)) { dev_err(dev, "failed to get interrupt gpio\n"); - return ERR_PTR(-EINVAL); + return -EINVAL; } - pdata->gpio_rst = of_get_gpio(np, 1); - if (!gpio_is_valid(pdata->gpio_rst)) { + ts->gpio_rst = of_get_gpio(np, 1); + if (!gpio_is_valid(ts->gpio_rst)) { dev_err(dev, "failed to get reset gpio\n"); - return ERR_PTR(-EINVAL); + return -EINVAL; } - if (of_property_read_u32(np, "x-size", &pdata->x_max)) { + if (of_property_read_u32(np, "x-size", &ts->x_max)) { dev_err(dev, "failed to get x-size property\n"); - return ERR_PTR(-EINVAL); + return -EINVAL; } - if (of_property_read_u32(np, "y-size", &pdata->y_max)) { + if (of_property_read_u32(np, "y-size", &ts->y_max)) { dev_err(dev, "failed to get y-size property\n"); - return ERR_PTR(-EINVAL); + return -EINVAL; } - /* default to asserting the interrupt when the screen is touched */ - pdata->int_setting = AUO_PIXCIR_INT_TOUCH_IND; - - return pdata; + return 0; } #else -static struct auo_pixcir_ts_platdata *auo_pixcir_parse_dt(struct device *dev) +static int auo_pixcir_parse_dt(struct device *dev, struct auo_pixcir_ts *ts) { - return ERR_PTR(-EINVAL); + return -EINVAL; } #endif @@ -516,27 +517,18 @@ static void auo_pixcir_reset(void *data) { struct auo_pixcir_ts *ts = data; - gpio_set_value(ts->pdata->gpio_rst, 0); + gpio_set_value(ts->gpio_rst, 0); } static int auo_pixcir_probe(struct i2c_client *client, const struct i2c_device_id *id) { - const struct auo_pixcir_ts_platdata *pdata; struct auo_pixcir_ts *ts; struct input_dev *input_dev; int version; int error; - pdata = dev_get_platdata(&client->dev); - if (!pdata) { - pdata = auo_pixcir_parse_dt(&client->dev); - if (IS_ERR(pdata)) - return PTR_ERR(pdata); - } - - ts = devm_kzalloc(&client->dev, - sizeof(struct auo_pixcir_ts), GFP_KERNEL); + ts = devm_kzalloc(&client->dev, sizeof(*ts), GFP_KERNEL); if (!ts) return -ENOMEM; @@ -546,7 +538,6 @@ static int auo_pixcir_probe(struct i2c_client *client, return -ENOMEM; } - ts->pdata = pdata; ts->client = client; ts->input = input_dev; ts->touch_ind_mode = 0; @@ -556,6 +547,10 @@ static int auo_pixcir_probe(struct i2c_client *client, snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(&client->dev)); + error = auo_pixcir_parse_dt(&client->dev, ts); + if (error) + return error; + input_dev->name = "AUO-Pixcir touchscreen"; input_dev->phys = ts->phys; input_dev->id.bustype = BUS_I2C; @@ -569,36 +564,34 @@ static int auo_pixcir_probe(struct i2c_client *client, __set_bit(BTN_TOUCH, input_dev->keybit); /* For single touch */ - input_set_abs_params(input_dev, ABS_X, 0, pdata->x_max, 0, 0); - input_set_abs_params(input_dev, ABS_Y, 0, pdata->y_max, 0, 0); + input_set_abs_params(input_dev, ABS_X, 0, ts->x_max, 0, 0); + input_set_abs_params(input_dev, ABS_Y, 0, ts->y_max, 0, 0); /* For multi touch */ - input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, - pdata->x_max, 0, 0); - input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, - pdata->y_max, 0, 0); - input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, - AUO_PIXCIR_MAX_AREA, 0, 0); - input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, 0, - AUO_PIXCIR_MAX_AREA, 0, 0); + input_set_abs_params(input_dev, ABS_MT_POSITION_X, 0, ts->x_max, 0, 0); + input_set_abs_params(input_dev, ABS_MT_POSITION_Y, 0, ts->y_max, 0, 0); + input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, + 0, AUO_PIXCIR_MAX_AREA, 0, 0); + input_set_abs_params(input_dev, ABS_MT_TOUCH_MINOR, + 0, AUO_PIXCIR_MAX_AREA, 0, 0); input_set_abs_params(input_dev, ABS_MT_ORIENTATION, 0, 1, 0, 0); input_set_drvdata(ts->input, ts); - error = devm_gpio_request_one(&client->dev, pdata->gpio_int, + error = devm_gpio_request_one(&client->dev, ts->gpio_int, GPIOF_DIR_IN, "auo_pixcir_ts_int"); if (error) { dev_err(&client->dev, "request of gpio %d failed, %d\n", - pdata->gpio_int, error); + ts->gpio_int, error); return error; } - error = devm_gpio_request_one(&client->dev, pdata->gpio_rst, + error = devm_gpio_request_one(&client->dev, ts->gpio_rst, GPIOF_DIR_OUT | GPIOF_INIT_HIGH, "auo_pixcir_ts_rst"); if (error) { dev_err(&client->dev, "request of gpio %d failed, %d\n", - pdata->gpio_rst, error); + ts->gpio_rst, error); return error; } @@ -619,7 +612,8 @@ static int auo_pixcir_probe(struct i2c_client *client, dev_info(&client->dev, "firmware version 0x%X\n", version); - error = auo_pixcir_int_config(ts, pdata->int_setting); + /* default to asserting the interrupt when the screen is touched */ + error = auo_pixcir_int_config(ts, AUO_PIXCIR_INT_TOUCH_IND); if (error) return error; diff --git a/include/linux/input/auo-pixcir-ts.h b/include/linux/input/auo-pixcir-ts.h deleted file mode 100644 index ed0776997a7a..000000000000 --- a/include/linux/input/auo-pixcir-ts.h +++ /dev/null @@ -1,44 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Driver for AUO in-cell touchscreens - * - * Copyright (c) 2011 Heiko Stuebner - * - * based on auo_touch.h from Dell Streak kernel - * - * Copyright (c) 2008 QUALCOMM Incorporated. - * Copyright (c) 2008 QUALCOMM USA, INC. - */ - -#ifndef __AUO_PIXCIR_TS_H__ -#define __AUO_PIXCIR_TS_H__ - -/* - * Interrupt modes: - * periodical: interrupt is asserted periodicaly - * compare coordinates: interrupt is asserted when coordinates change - * indicate touch: interrupt is asserted during touch - */ -#define AUO_PIXCIR_INT_PERIODICAL 0x00 -#define AUO_PIXCIR_INT_COMP_COORD 0x01 -#define AUO_PIXCIR_INT_TOUCH_IND 0x02 - -/* - * @gpio_int interrupt gpio - * @int_setting one of AUO_PIXCIR_INT_* - * @init_hw hardwarespecific init - * @exit_hw hardwarespecific shutdown - * @x_max x-resolution - * @y_max y-resolution - */ -struct auo_pixcir_ts_platdata { - int gpio_int; - int gpio_rst; - - int int_setting; - - unsigned int x_max; - unsigned int y_max; -}; - -#endif From patchwork Wed Sep 14 14:14:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 607057 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DB57C6FA82 for ; Wed, 14 Sep 2022 14:14:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229738AbiINOOm (ORCPT ); Wed, 14 Sep 2022 10:14:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229803AbiINOOi (ORCPT ); Wed, 14 Sep 2022 10:14:38 -0400 Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E960F5F8D; Wed, 14 Sep 2022 07:14:34 -0700 (PDT) Received: by mail-pf1-x42e.google.com with SMTP id a80so6481275pfa.4; Wed, 14 Sep 2022 07:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=bAdGrYEmkmvhtXoA2Nr4gmu6DhEMvOCOQQto+Y0rKro=; b=RQqHlOsbOD+e1GokuAbBhPA2En2nAB4l8+ioE1KNw6tmPFUf7IdYNKILmcF8+kUjF4 npb+6aSPSGO3wf+jOZMRyOCuBUfDujUA1uck/5mzJsTXEvsslCbyVkYH1u+U4GW3l6Pc G5r+BIfK23wDn8fosrvUMRC1KA4Zkqfjt9UaTguVS0fDQOl9zpjk+lnbJ2AfrtK1/MoA j7rglwTl4WuB2sK73adZwyCBeMcJ5cDKCXBzcI56yDxyz/RTQWTwbKezfF+Ii3mcWU29 EKiEWmctE7rZwC4qza1PX4cZ9hT2kk98PIUfyZxyAAS9LxnAljW/J8Lv9fnWpvFOxMUe Q1Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=bAdGrYEmkmvhtXoA2Nr4gmu6DhEMvOCOQQto+Y0rKro=; b=DfJdgrgreuT/iuXxCXxlmqLkDeFelQKxCfi+/Bn83T+3nmGIcqowCTnDNK9p4+IZCE 0duKiXyyDNPQzSHbG+Tpgv/ukw7JtmNIFWe3BtBs1Hz9btXUo6kEm6j56nR9C5zwZnpr 5SoKF2ZISV1ytnctjxXgCWQBj3r2NjFFQPFaXo2EeMyh+IH+bRoW1JAlX07EEnqPa8PZ W5s9efwVO2QHhCcuPwD+Fk8ZwX6MLucMKbtXanc/68GKytshdrjWFhZwjjGxdv7jNBzA WZ9BZvmDyW5YWOr2qIb1ClVXpP7PdDkvOn14+ol1UOtFfxMf9cdApLX0o/6F4pqPj74q xP4g== X-Gm-Message-State: ACgBeo1E3xBLhrVfJJitLFbx5P1uJg6l2PREoopyK6N7JAvQ5OSWpQhy eOw9v0dL1oHaSCpyQOCjz0QNoqU4idfEEA== X-Google-Smtp-Source: AA6agR5NCfuAQgOSxu39xQi5zNQ29mwMGp0YsL8eC/T4av6L8C70qRP1sZPIWosw8LwICdR4RNAxmg== X-Received: by 2002:a05:6a00:2446:b0:528:5da9:cc7 with SMTP id d6-20020a056a00244600b005285da90cc7mr38622170pfj.51.1663164874098; Wed, 14 Sep 2022 07:14:34 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:2f68:fe7:a2e6:7595]) by smtp.gmail.com with ESMTPSA id a9-20020a170902ecc900b0017839e5abfasm6480624plh.263.2022.09.14.07.14.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 07:14:33 -0700 (PDT) From: Dmitry Torokhov To: Heiko Stuebner Cc: Linus Walleij , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] Input: auo-pixcir-ts - switch to using gpiod API Date: Wed, 14 Sep 2022 07:14:25 -0700 Message-Id: <20220914141428.2201784-2-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog In-Reply-To: <20220914141428.2201784-1-dmitry.torokhov@gmail.com> References: <20220914141428.2201784-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org This switches the driver to gpiod API and drops uses of of_get_gpio() API. Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij --- drivers/input/touchscreen/auo-pixcir-ts.c | 47 ++++++++++------------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/drivers/input/touchscreen/auo-pixcir-ts.c b/drivers/input/touchscreen/auo-pixcir-ts.c index a51d66ebff2b..c3bce9fb2c94 100644 --- a/drivers/input/touchscreen/auo-pixcir-ts.c +++ b/drivers/input/touchscreen/auo-pixcir-ts.c @@ -10,6 +10,7 @@ * Copyright (c) 2008 QUALCOMM USA, INC. */ +#include #include #include #include @@ -19,9 +20,8 @@ #include #include #include -#include +#include #include -#include /* * Coordinate calculation: @@ -112,8 +112,8 @@ struct auo_pixcir_ts { struct i2c_client *client; struct input_dev *input; - int gpio_int; - int gpio_rst; + struct gpio_desc *gpio_int; + struct gpio_desc *gpio_rst; char phys[32]; unsigned int x_max; @@ -193,7 +193,7 @@ static irqreturn_t auo_pixcir_interrupt(int irq, void *dev_id) /* check for up event in touch touch_ind_mode */ if (ts->touch_ind_mode) { - if (gpio_get_value(ts->gpio_int) == 0) { + if (gpiod_get_value_cansleep(ts->gpio_int) == 0) { input_mt_sync(ts->input); input_report_key(ts->input, BTN_TOUCH, 0); input_sync(ts->input); @@ -482,18 +482,6 @@ static int auo_pixcir_parse_dt(struct device *dev, struct auo_pixcir_ts *ts) if (!np) return -ENOENT; - ts->gpio_int = of_get_gpio(np, 0); - if (!gpio_is_valid(ts->gpio_int)) { - dev_err(dev, "failed to get interrupt gpio\n"); - return -EINVAL; - } - - ts->gpio_rst = of_get_gpio(np, 1); - if (!gpio_is_valid(ts->gpio_rst)) { - dev_err(dev, "failed to get reset gpio\n"); - return -EINVAL; - } - if (of_property_read_u32(np, "x-size", &ts->x_max)) { dev_err(dev, "failed to get x-size property\n"); return -EINVAL; @@ -517,7 +505,7 @@ static void auo_pixcir_reset(void *data) { struct auo_pixcir_ts *ts = data; - gpio_set_value(ts->gpio_rst, 0); + gpiod_set_value_cansleep(ts->gpio_rst, 1); } static int auo_pixcir_probe(struct i2c_client *client, @@ -578,23 +566,28 @@ static int auo_pixcir_probe(struct i2c_client *client, input_set_drvdata(ts->input, ts); - error = devm_gpio_request_one(&client->dev, ts->gpio_int, - GPIOF_DIR_IN, "auo_pixcir_ts_int"); + ts->gpio_int = devm_gpiod_get_index(&client->dev, NULL, 0, GPIOD_IN); + error = PTR_ERR_OR_ZERO(ts->gpio_int); if (error) { - dev_err(&client->dev, "request of gpio %d failed, %d\n", - ts->gpio_int, error); + dev_err(&client->dev, + "request of int gpio failed: %d\n", error); return error; } - error = devm_gpio_request_one(&client->dev, ts->gpio_rst, - GPIOF_DIR_OUT | GPIOF_INIT_HIGH, - "auo_pixcir_ts_rst"); + gpiod_set_consumer_name(ts->gpio_int, "auo_pixcir_ts_int"); + + /* Take the chip out of reset */ + ts->gpio_rst = devm_gpiod_get_index(&client->dev, NULL, 1, + GPIOD_OUT_LOW); + error = PTR_ERR_OR_ZERO(ts->gpio_rst); if (error) { - dev_err(&client->dev, "request of gpio %d failed, %d\n", - ts->gpio_rst, error); + dev_err(&client->dev, + "request of reset gpio failed: %d\n", error); return error; } + gpiod_set_consumer_name(ts->gpio_rst, "auo_pixcir_ts_rst"); + error = devm_add_action_or_reset(&client->dev, auo_pixcir_reset, ts); if (error) { dev_err(&client->dev, "failed to register reset action, %d\n", From patchwork Wed Sep 14 14:14:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 605979 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6449C6FA8A for ; Wed, 14 Sep 2022 14:14:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229951AbiINOOq (ORCPT ); Wed, 14 Sep 2022 10:14:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229892AbiINOOk (ORCPT ); Wed, 14 Sep 2022 10:14:40 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55ED27653; Wed, 14 Sep 2022 07:14:36 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id w20so3195323ply.12; Wed, 14 Sep 2022 07:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=ocPUhQ7OBcduPbHu7i7Q6uCtqSpEiO9mYjpvwrjHSrU=; b=O8wvaWEqLL1t3LzrppvIU3K3DamCenQ7WgK3GMrIEz/hFW/AEzzbqueTe0Ax9ftCFZ /OJK+P6TDMuvHouMturAUk6/oPUn4wrs2lC1DFpra8VFiFJG1dths2WeplKS2Ro2ZZO4 XVkrCigwE9ZQMmcn3c7jFHMLNRK/xLL5IY2dzdnQMjJZWqXLoGvGxcn4eYicr0h4co1D C9jnZLs7Hw/qqafQ7ER4TveclMylQdyhwr4adEsOcGU/xQAJhuL3siuEUMwx52L5gdmf vnyc+GcrY3Ot64GAwC+s1HwRCF0T8NpI0ANRMNB6gmtSnQatBss4YAcMShy8WfvK0wGG fFqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=ocPUhQ7OBcduPbHu7i7Q6uCtqSpEiO9mYjpvwrjHSrU=; b=eKmakddBEkQREzspfJRthaTJyzhHEMQJDbdbNCfH7reY6UveN2dW3J0HvaoZCIQUXH ZgLEVprzoskc0rrn4X6+ItxbpxpDzvfLpQ3nB/J4YYPchHixkAtI6LBT4rzIFJVVV6De K3K3HsGoJ7P0VFaLPhoSfUcXM2NbTpsm4OyhiSUCOiAjVx5g48gyBp/uIKevNA+u0jSd qID70D/r0k8alccaIPIdjUWjFqZndLyeL+rShqy1VNSdtcYzj2fNciYPzPyYKMAKAZZz fEH5zA8/p9kuJYhJsOJSf6e0xOnmCVjaoYtxawjp91L6vj8qWMei7ZKx7L7x7OyJiPTD bHOA== X-Gm-Message-State: ACrzQf36QVlvhwzh44nh9Uz1jWNEwIDan6rsHE6lDaroCDGX1jRQC541 CHrPi+eZg9TJI0YsBy5nNLY= X-Google-Smtp-Source: AMsMyM4xYEvk4HqDFT0iYLxNQAkRbcLni2YcyHUxIXAP7eHDKzlB6g1Wx4T39e8KYmBJZPf7J+2dzg== X-Received: by 2002:a17:90a:7c07:b0:202:7292:900e with SMTP id v7-20020a17090a7c0700b002027292900emr4988557pjf.37.1663164875609; Wed, 14 Sep 2022 07:14:35 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:2f68:fe7:a2e6:7595]) by smtp.gmail.com with ESMTPSA id a9-20020a170902ecc900b0017839e5abfasm6480624plh.263.2022.09.14.07.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 07:14:34 -0700 (PDT) From: Dmitry Torokhov To: Heiko Stuebner Cc: Linus Walleij , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] Input: auo-pixcir-ts - do not force rising edge interrupt trigger Date: Wed, 14 Sep 2022 07:14:26 -0700 Message-Id: <20220914141428.2201784-3-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog In-Reply-To: <20220914141428.2201784-1-dmitry.torokhov@gmail.com> References: <20220914141428.2201784-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Instead of hard-coding rising edge as the interrupt trigger, let's rely on the platform (ACPI, DT) to configure the interrupt properly. Signed-off-by: Dmitry Torokhov Reviewed-by: Heiko Stuebner --- drivers/input/touchscreen/auo-pixcir-ts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/auo-pixcir-ts.c b/drivers/input/touchscreen/auo-pixcir-ts.c index c3bce9fb2c94..4960a50f59ea 100644 --- a/drivers/input/touchscreen/auo-pixcir-ts.c +++ b/drivers/input/touchscreen/auo-pixcir-ts.c @@ -612,7 +612,7 @@ static int auo_pixcir_probe(struct i2c_client *client, error = devm_request_threaded_irq(&client->dev, client->irq, NULL, auo_pixcir_interrupt, - IRQF_TRIGGER_RISING | IRQF_ONESHOT, + IRQF_ONESHOT, input_dev->name, ts); if (error) { dev_err(&client->dev, "irq %d requested failed, %d\n", From patchwork Wed Sep 14 14:14:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 605978 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 657B4ECAAD3 for ; Wed, 14 Sep 2022 14:14:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229941AbiINOOu (ORCPT ); Wed, 14 Sep 2022 10:14:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229957AbiINOOq (ORCPT ); Wed, 14 Sep 2022 10:14:46 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89389C34; Wed, 14 Sep 2022 07:14:44 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id j6-20020a17090a694600b00200bba67dadso14570719pjm.5; Wed, 14 Sep 2022 07:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=S8jwxWuuGRLyh4Xd6g3SHgR8UXQy3eOYQg/H6/mPhRE=; b=nqAeTyoHkatCAh52mME+F88ZxWZhlnQTQ2b1LoHsJHKwa6MmlnUFNHqb9SRbQMInqK Hc+FECWSrzHTHQMgjW/nyllwuY/3gaA16HLS1UuWJPWymKo3ibDBLQWaXll0Lj3QaZ2D EcBLQNESwjYUH2rOIZ8a2ImimodgoB2I8nR1KfBxXdjOQNamZlz946ijRY16LSYI9qIa 54x8h6SIDK3BFEUoQJOQH8MxTMsphW0kaeFgyQBrvZqIon2tT0r9ijoSjGe8w/pMxQUr Fqv/5Y3lrXlliTwML0oF/FK2JQH7rjhl//FgkOwZUTI93YBlWNJZdkgVhoF/Sg7CKRvH 2lMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=S8jwxWuuGRLyh4Xd6g3SHgR8UXQy3eOYQg/H6/mPhRE=; b=WPTNKdXM8p+bDRiOBBizmlQMkho34qk42yyOCy0HRW1800bEYr4seqDPGkY+djOHR9 IVPYY1cy+vTgofbeutLM3XDijPQvgpKbeJjt4hKMwdjaXaJ4ac+NeqVxNlxmDKc4dtqp R7eq0TmgfqAcQR9+ylvgBBLvGQptBXx26f7RJxbCOLbsBYVqGW+fMkhgOxHG2sNDv+kt UHntMyuXFm4qAhBEZ3vR3hGzhBquw3cRiUE8SlG9ZTHeXJ+qhIdJ5SRyCjf/NTZlTQE+ E6l97HFhyjqZAmeIlCikaXcu+XUsE0pEs+BiA9YNIKX3WUInJT8D/62d1woLEuwQgjiz SG4w== X-Gm-Message-State: ACrzQf3Km6byrVjI4xv561o0sybqXJ6Mk8dO8qTanVmKLESrFzMr/7+8 +mKpB8GuaCC+01YAM7EEW/k= X-Google-Smtp-Source: AMsMyM7pS3lqZiSHxY6xz40YjtwbjlokxIseywnf47GpcyjD1h/90m7Qo5gegVn0ObJVSNYks58d8w== X-Received: by 2002:a17:90a:6a83:b0:200:9da5:d0e7 with SMTP id u3-20020a17090a6a8300b002009da5d0e7mr4988866pjj.187.1663164877051; Wed, 14 Sep 2022 07:14:37 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:2f68:fe7:a2e6:7595]) by smtp.gmail.com with ESMTPSA id a9-20020a170902ecc900b0017839e5abfasm6480624plh.263.2022.09.14.07.14.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 07:14:36 -0700 (PDT) From: Dmitry Torokhov To: Heiko Stuebner Cc: Linus Walleij , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] Input: auo-pixcir-ts - switch to using generic device properties Date: Wed, 14 Sep 2022 07:14:27 -0700 Message-Id: <20220914141428.2201784-4-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog In-Reply-To: <20220914141428.2201784-1-dmitry.torokhov@gmail.com> References: <20220914141428.2201784-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Let's use generic device properties API instead of OF-specific one. Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/auo-pixcir-ts.c | 40 ++++++----------------- 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/drivers/input/touchscreen/auo-pixcir-ts.c b/drivers/input/touchscreen/auo-pixcir-ts.c index 4960a50f59ea..2deae5a6823a 100644 --- a/drivers/input/touchscreen/auo-pixcir-ts.c +++ b/drivers/input/touchscreen/auo-pixcir-ts.c @@ -22,6 +22,7 @@ #include #include #include +#include /* * Coordinate calculation: @@ -474,33 +475,6 @@ static int __maybe_unused auo_pixcir_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(auo_pixcir_pm_ops, auo_pixcir_suspend, auo_pixcir_resume); -#ifdef CONFIG_OF -static int auo_pixcir_parse_dt(struct device *dev, struct auo_pixcir_ts *ts) -{ - struct device_node *np = dev->of_node; - - if (!np) - return -ENOENT; - - if (of_property_read_u32(np, "x-size", &ts->x_max)) { - dev_err(dev, "failed to get x-size property\n"); - return -EINVAL; - } - - if (of_property_read_u32(np, "y-size", &ts->y_max)) { - dev_err(dev, "failed to get y-size property\n"); - return -EINVAL; - } - - return 0; -} -#else -static int auo_pixcir_parse_dt(struct device *dev, struct auo_pixcir_ts *ts) -{ - return -EINVAL; -} -#endif - static void auo_pixcir_reset(void *data) { struct auo_pixcir_ts *ts = data; @@ -535,9 +509,15 @@ static int auo_pixcir_probe(struct i2c_client *client, snprintf(ts->phys, sizeof(ts->phys), "%s/input0", dev_name(&client->dev)); - error = auo_pixcir_parse_dt(&client->dev, ts); - if (error) - return error; + if (device_property_read_u32(&client->dev, "x-size", &ts->x_max)) { + dev_err(&client->dev, "failed to get x-size property\n"); + return -EINVAL; + } + + if (device_property_read_u32(&client->dev, "y-size", &ts->y_max)) { + dev_err(&client->dev, "failed to get y-size property\n"); + return -EINVAL; + } input_dev->name = "AUO-Pixcir touchscreen"; input_dev->phys = ts->phys; From patchwork Wed Sep 14 14:14:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 607056 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89BE6C6FA8B for ; Wed, 14 Sep 2022 14:14:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229939AbiINOOs (ORCPT ); Wed, 14 Sep 2022 10:14:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229936AbiINOOo (ORCPT ); Wed, 14 Sep 2022 10:14:44 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 413E2B49B; Wed, 14 Sep 2022 07:14:39 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id d64-20020a17090a6f4600b00202ce056566so9690846pjk.4; Wed, 14 Sep 2022 07:14:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=D7Rv1WZZo0HfxpirDtBnZT8VvHiByqEzO0fGerdexis=; b=C5W9glDC9i54iFxt/XgUUYpTCA96hecmSGt+OGqz8QrgL9VvSY/dHxSJH9IJU6pZ/d eilImrNNfSmg/C7//uO8LyFjLe82OfL5it2nIgsYnFLZkCnO+LQfR946ANsHUTwYZvFo pP3HsIxSFCQ9TweMY1ToFF1Gx4LdH1LPflkjwitUwmvFTnH4/ec7NxO84sJgtUVWATvo UqOIV499d/FEfXl1v1Wn+X/HvCqo0eM+pS+WIoaTs5Zx1QHqJ3p6maytSvGVynLaZKD0 Ce6dutPPsc6PY+f5LzTEzrnR3NiONDn69HsZpnsQ+79NXSl3l7pAup7cPaVH/3085bGg dLxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=D7Rv1WZZo0HfxpirDtBnZT8VvHiByqEzO0fGerdexis=; b=aQRRRr/63gvWZxJXc/ghLI4OkBBdMGgKLt/bhEAAc48iuKIfOBdxRLBFZun8C4DteS GEB+kfBG1cKncTfMrdvz5YVIp/fUuDc4MuVppxZwwctLL25xTH0zatd6lWV9xtwZdIv9 a542tJxEteDA4kCrMgtU1Vd3LHXXxe2Uv1eXWdtf5l8YQAqLn5qi24CEzdRra5TEXWlH AC2mHKGRqfpkQ2Y8y+lRguM1Mv0L2HrIdv/ZU8KXDlCxGDJpWmyEQW4lsajQGKMw0Xlj qYWb9OdQq2RNnl2xv7eZqhTcOcFp7aYvWJyQ0taEDa19t8Q6JJO6fgBHy3RGKlbGVqGA aoAw== X-Gm-Message-State: ACrzQf218fANxRJXEJAmPzZiiJ9wc5WMtjQ81aFOUr8T7Nw7y1P7VNme ObEQYVG3peftaH8oBJQMI6o= X-Google-Smtp-Source: AMsMyM5op+DAcF+r4ir1DqOBWr/RDD1128G+uL2B0ZElCjhUleZy9UShq90ly+85T0O/4G6Puze6xA== X-Received: by 2002:a17:90b:224a:b0:203:d20:b92b with SMTP id hk10-20020a17090b224a00b002030d20b92bmr5024339pjb.17.1663164878385; Wed, 14 Sep 2022 07:14:38 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:202:201:2f68:fe7:a2e6:7595]) by smtp.gmail.com with ESMTPSA id a9-20020a170902ecc900b0017839e5abfasm6480624plh.263.2022.09.14.07.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 07:14:38 -0700 (PDT) From: Dmitry Torokhov To: Heiko Stuebner Cc: Linus Walleij , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] dt-bindings: input: auo-pixcir-ts: fix gpio and interrupt properties Date: Wed, 14 Sep 2022 07:14:28 -0700 Message-Id: <20220914141428.2201784-5-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.37.2.789.g6183377224-goog In-Reply-To: <20220914141428.2201784-1-dmitry.torokhov@gmail.com> References: <20220914141428.2201784-1-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Add proper interrupt trigger and gpio polarity data to the binding example. Signed-off-by: Dmitry Torokhov --- .../devicetree/bindings/input/touchscreen/auo_pixcir_ts.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/input/touchscreen/auo_pixcir_ts.txt b/Documentation/devicetree/bindings/input/touchscreen/auo_pixcir_ts.txt index f40f21c642b9..b8db975e9f77 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/auo_pixcir_ts.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/auo_pixcir_ts.txt @@ -17,10 +17,10 @@ Example: auo_pixcir_ts@5c { compatible = "auo,auo_pixcir_ts"; reg = <0x5c>; - interrupts = <2 0>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; - gpios = <&gpf 2 0 2>, /* INT */ - <&gpf 5 1 0>; /* RST */ + gpios = <&gpf 2 0 GPIO_LEVEL_HIGH>, /* INT */ + <&gpf 5 1 GPIO_LEVEL_LOW>; /* RST */ x-size = <800>; y-size = <600>;