From patchwork Tue Mar 23 02:10:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 408422 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C85EC433DB for ; Tue, 23 Mar 2021 02:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B9D49619AC for ; Tue, 23 Mar 2021 02:11:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230035AbhCWCLF (ORCPT ); Mon, 22 Mar 2021 22:11:05 -0400 Received: from mail-bgr052100131047.outbound.protection.outlook.com ([52.100.131.47]:49282 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230001AbhCWCKg (ORCPT ); Mon, 22 Mar 2021 22:10:36 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aHFuPIhUAlCRW7gY5DDpr/VjU8zg5Q8NGx4JzL5ewmhEy1ORSH+0HY1PWhbTUJBkqaRtYCyJPtU+4KVQGgxNMwg3RAViIY/uL1fqtXcB4+askMldAKHK3EZS+oJGpwJbBzWmTp5Joz04VACvh2LyuyiFIQMme2P186Og70f98gyW2zJofY8cIsjLANa3C/yQMLvIids8A0kFQtyoOtE2tTcr+eRfD8Og7W7JheC5MaVReRrUrx+Yeo3r2J4RPN8lCJe53x+EVUsmbqT9Sbbs6thN4IbMsM/wldOSwG+KDFMM/F+jv3DvmEU/cMY7VBUus+12cMD0hWW39c7SuBSDgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5/oJltLfsLgrFaqK36SaYKcOpvYOjHrEdkY0++qn5aU=; b=gKeevjVJnQfIM/gxsC1m04ju1ZXcdYc9FZkgI5jtuxbESpZh1sApz0M0yUhOOe92iuG9W1K0bu5tUC5t0C4+4FVm7A1c9cXhXxMRSHXnisBvinhcXonlOJOK5U0ba9fo5Gfr5nOBzaDoDgDwro3MOWPIJeCWLoW4ZBnxSR/5fOpx4uastI6/4WlYEJOBdOygA6buqxi4zEMwLWdo2CgVSPxJzkh3hAJmbIKPtwFVTg7mpBnR8FwyVTYqBnj8xx2FkL9xGAEMCC2GbAH+wsFRFwzrGc/r4NXA8WYXbA/nxnuelKT8ubIRCQEVmVOv+t3w75CSVfO900qs1w8hWxTfWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5/oJltLfsLgrFaqK36SaYKcOpvYOjHrEdkY0++qn5aU=; b=ZGXjd0a2neZmQZEUeVf93GV9nfovuBaEBuPtxwOWiNjXOgTdsmisOJinSfk3JkECJ1LZ2hTUlHkSwX8ZI31hcpIlBcsFKePVvGFaf88Phu+ToTl37iWshHgobqV0FSPdJz50CponQ8hQmY45BoPQh8Dkfc1B4+VIFIeNVmE4szU= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none; gmail.com; dmarc=none action=none header.from=labundy.com; Received: from SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) by SA2PR08MB6555.namprd08.prod.outlook.com (2603:10b6:806:111::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Tue, 23 Mar 2021 02:10:29 +0000 Received: from SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::d443:cdc3:d44e:d1c8]) by SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::d443:cdc3:d44e:d1c8%5]) with mapi id 15.20.3955.025; Tue, 23 Mar 2021 02:10:29 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH v3 1/2] Input: iqs5xx - make reset GPIO optional Date: Mon, 22 Mar 2021 21:10:05 -0500 Message-Id: <20210323021006.367-1-jeff@labundy.com> X-Mailer: git-send-email 2.17.1 X-Originating-IP: [136.49.90.243] X-ClientProxiedBy: SA9PR13CA0005.namprd13.prod.outlook.com (2603:10b6:806:21::10) To SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (136.49.90.243) by SA9PR13CA0005.namprd13.prod.outlook.com (2603:10b6:806:21::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.22 via Frontend Transport; Tue, 23 Mar 2021 02:10:28 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1ec9f9bb-f232-4add-836f-08d8eda0d493 X-MS-TrafficTypeDiagnostic: SA2PR08MB6555: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: URVD6lNYEssyHL8saTWJMLtM7gJ8GR7fXhBm9NbfCecrpnKFxkOjOhwmRiUUEfTGre5J21xBPQ2vVA3xPsPkejraDTyK+8+qSj61/1iI1dn6epvH7ynuG3tXYW165tXBGQcqwvK/l9yPvJQv2/SUBq0hUR4/Tl3s5Q5f6gJFxAB2bhkp4sRt+3tT4aQXZ8/sWiexjzF4jWM9pb6cN7u+cJGecmUSzMoKqtkiXNi8/Nv+q+du+l7R2TvRyINW72YyBmtCT48RkJ/4BdF6mgppxY6wyttZ7OAEDI+Z/EE/xiOuj43Vq03O9AUIr5q5UcZYT6AVvPwt1Zp3wXjAs2Fb5j2hMK20WIsJuhtwAfWwtRhRjgF5gcxxsvaQsTIf1DTBAIhhHb6yOtDSq5WjoQpaLpD7ALp5oeHAgQZ3GsRkNayPKxaW65L9eC5Tqn3EKUhh8KR0Cg8nJGhTuB8gZrrTFva11Td4SVk9juvdGZTnpSttq+VSupFtJHWsMqY6AZzjSqyc5WA0KLYrmVCDNnZrRCLVGshncB6Etq+zjN9t7KxLJvOFc/yYhxAXokQC+qT69ZcRRq34XezJRQv+XrDwTxzDvv3sd/SLy3vQe6RTHP1XcUgpz1XWlK7Jke5XKHSR/okOyElujMFZr4cFZe2CLOyTims+h/vrhLezl9GfCcfv+OhIGhLhDQYqR+ilmOz81BvoTu2lEBN3SoAANnpocZfVw7WCJJfc07VguJI30vxjbqf1puxCwNzzFwpQlNy8BGPVUK7qsugnDhoX7utLyaX+91bP8ulapP7bim5+rsqZehojd7qEQPZ1dxv30fUMPJ6T+qqgwCt8jRama2J42PhsXGmML5Jgv+cNs1Io1ZT7kxVysoegx953I11O8mVsYaiJGUZZNvrbuvlPSng0k6uuXmRB0xSZIkOu+Yt9K2o52x+ER9M3lU9V+z3ji4yYnBeGkw/KPUXlM5IqtHE0zctc1OKR1vKM0+yG/D/t0isu0/srzPjTXefRACPgDK1b X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:5; SRV:; IPV:NLI; SFV:SPM; H:SN6PR08MB5517.namprd08.prod.outlook.com; PTR:; CAT:OSPM; SFS:(366004)(136003)(346002)(396003)(376002)(39830400003)(16526019)(38100700001)(6486002)(66946007)(86362001)(186003)(8676002)(66556008)(66476007)(8936002)(107886003)(1076003)(956004)(26005)(6506007)(4326008)(52116002)(83380400001)(478600001)(316002)(6666004)(69590400012)(5660300002)(36756003)(6512007)(2906002)(2616005)(42413003); DIR:OUT; SFP:1501; X-MS-Exchange-AntiSpam-MessageData: +rWwMGEyAimmMpUHCDYPD8W7KquvhJEv1l9ewbhzjVWKLuvCiOMYACmL0QotaltyoCkjDjsA3Jy7vhlRGwedeWUz0LF5Czolh8EXWVU+Owdw85ksZ3xIQepfMsoZy/JUV2QUEm6H2lYTH4OpM43eZNTAotILfmnCWWPRXjsczpnfD8nXCfIPCcbRSjxDelkjbz1CCU9srs75QxQKwZbEbbf3SXv4XnalcvUvievLzaGzYzrU8+sw6Ik2kVo+idAQQbu0cGGoVZ/ldVNGfLjHF/3XhVa7THR9hYRP0Iccwfhr6PD12jluBGHGdltzwrS/jAti2Nr6l7zpUtEW5AJS5R7ikQ4B0gd/edJWaGsdgU6Cb1kZD6ZZc6UH1tFDkJZR4mLWX6a4M2xy3xnb8DXjY9EXP+XzVDpqLlu/n01qZjBl4UkCRVFuY4tufVI322ZBKzRh8Ccopw8gBMjTmjX7sBc5xx/PkFF/bEgTL7VprfY/Z4yIAYfNolFGnQzwKwHoIjJRus/OXo8TG3mkVT9TFC5LXQZGFFTeyqKF9jAibrMd0Y3bD0f1nhIM5YjUYq0NEQiuSdhl2uyWLpRCoGMUcHQpYEFOF4vGKXje2Ne1TjnAPhn2ZDuR94E1x3u+7xZKyqn+vhyOUK/MnZpIdZnoMM80lVTiVw/1Cd1tHYHU8P7cU9xWKh0ucb4tiS4kzAKbZvq0Y2ZVTlYbD9QqEsuGzKfQivHL+uk3HQSpXwrRJR8G7hZE0iSMhmR9N09pvNRYj7DvLZoaApyRODxUOGmCE/JBWLbaNU80HID1isXC4p0+GUYfOhFTwyQXwcakzbGaVu5UI5mOeHv4MYErI5KY/ACe5OuTvt0hWjpX3jdrPEJzG+5g1fYZUbAbain7Cx0eqruImBtRFQUTFxghkkssxpweHNT1AYi8Waw/kRqRI7vJMD6O9uBTY489578VRzVZLY5kSjth1YaHDhqQ2LttKXvkkZWpVmoY3wE0MV1KwX3XVZPvgAuXyuIkiEKftVoRaI0U6PpvGopXGG4+NdTB0b+CDpPsWBsFH9TUlahLDzP5GOLfLhb8jmnj+c0ZIlNIQgFcRgkgn7crjl+fgFTUKBDMss8TCwlDKZ+60/G4elFgC5pXNhZq/J4RmJMDNp1hVwnUQCZoNghjT+RvxZBvJZnz0B+IvEFqQWiCNS4oi1Gzq9m4fRuCf0zyEnFjACijaygm3mu3Pxifwbv9DnDY1hq9X4CnG935JJ4NLXqZRd840MFQqTbFmOA8rHk6QMaVZCZblFfxqIWFru2VdHAySrON3cmPO6dkHg+5aoFSY68U6A0U2rPBuH0rTW58hE8N X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ec9f9bb-f232-4add-836f-08d8eda0d493 X-MS-Exchange-CrossTenant-AuthSource: SN6PR08MB5517.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2021 02:10:29.1381 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /FEk1ZPZjvT/fy95OUR+DJdjqzNKxSJ388epobYl5PqjcLT6xnxv5IkfabADPFgpZ6ZECS8zk16h/ms83UxQ0Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR08MB6555 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The device's hardware reset pin is only required if the platform must be able to update the device's firmware. As such, demote the reset GPIO to optional in support of devices that ship with pre-programmed firmware and don't route the reset pin back to the SoC. In that case, the 'fw_file' attribute is hidden because there is no way to open the bootloader. The logic is extended to the case in which the device does not advertise bootloader support in the first place. Last but not least, remove the hardware reset performed at probe because there is no reason to reset the device manually. A power on reset function already ensures a clean reset at start-up. Signed-off-by: Jeff LaBundy --- Changes in v3: - Added iqs5xx_attr_is_visible() in place of conditionally registering one of two attribute groups Changes in v2: - None drivers/input/touchscreen/iqs5xx.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) -- 2.17.1 diff --git a/drivers/input/touchscreen/iqs5xx.c b/drivers/input/touchscreen/iqs5xx.c index a990c176abf7..b3fa71213d60 100644 --- a/drivers/input/touchscreen/iqs5xx.c +++ b/drivers/input/touchscreen/iqs5xx.c @@ -835,9 +835,6 @@ static int iqs5xx_fw_file_write(struct i2c_client *client, const char *fw_file) int error, error_init = 0; u8 *pmap; - if (iqs5xx->dev_id_info.bl_status == IQS5XX_BL_STATUS_NONE) - return -EPERM; - pmap = kzalloc(IQS5XX_PMAP_LEN, GFP_KERNEL); if (!pmap) return -ENOMEM; @@ -963,7 +960,22 @@ static struct attribute *iqs5xx_attrs[] = { NULL, }; +static umode_t iqs5xx_attr_is_visible(struct kobject *kobj, + struct attribute *attr, int i) +{ + struct device *dev = kobj_to_dev(kobj); + struct iqs5xx_private *iqs5xx = dev_get_drvdata(dev); + + if (attr == &dev_attr_fw_file.attr && + (iqs5xx->dev_id_info.bl_status == IQS5XX_BL_STATUS_NONE || + !iqs5xx->reset_gpio)) + return 0; + + return attr->mode; +} + static const struct attribute_group iqs5xx_attr_group = { + .is_visible = iqs5xx_attr_is_visible, .attrs = iqs5xx_attrs, }; @@ -1020,8 +1032,8 @@ static int iqs5xx_probe(struct i2c_client *client, i2c_set_clientdata(client, iqs5xx); iqs5xx->client = client; - iqs5xx->reset_gpio = devm_gpiod_get(&client->dev, - "reset", GPIOD_OUT_LOW); + iqs5xx->reset_gpio = devm_gpiod_get_optional(&client->dev, + "reset", GPIOD_OUT_LOW); if (IS_ERR(iqs5xx->reset_gpio)) { error = PTR_ERR(iqs5xx->reset_gpio); dev_err(&client->dev, "Failed to request GPIO: %d\n", error); @@ -1030,9 +1042,6 @@ static int iqs5xx_probe(struct i2c_client *client, mutex_init(&iqs5xx->lock); - iqs5xx_reset(client); - usleep_range(10000, 10100); - error = iqs5xx_dev_init(client); if (error) return error; From patchwork Tue Mar 23 02:10:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff LaBundy X-Patchwork-Id: 407087 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5460C433E2 for ; Tue, 23 Mar 2021 02:11:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90D61619AB for ; Tue, 23 Mar 2021 02:11:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230047AbhCWCLG (ORCPT ); Mon, 22 Mar 2021 22:11:06 -0400 Received: from mail-dm6nam10on2053.outbound.protection.outlook.com ([40.107.93.53]:14822 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230006AbhCWCKo (ORCPT ); Mon, 22 Mar 2021 22:10:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m3n3n7I8cJ65JNOrkLcru89dkd/BqPfVFL2Gkh9RFkmuIW6VtaEvC2kq1Ux3oGHUiTNBiMBNoEF8S66cE9oF9nRxaouk7f9EfS8E+8jnnxoi7XhjzGfKn6XUNGnEKIL+Tah91WBNAf5BCovYV6iqEQe+uTWd8Kr9fNeOJW0DiqNw4Bh12pFfW36cbayXVYUc7UUwIQNQ7sMLcCrs6vSyV6VAe+ZnLz71nsbtJpDW28Pu6uwR04VxY/tuwAcSPO8UiLbmtamXM5uwsgq5dlvTzPxcjRg+Ird1ysZMPF7lDNCujCZYyZ4p2qm4J9Mv4ZGqjxNVGVjsBrRdjyunsnFzmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kmR2ipi2kzabe0s2ZOEGV9KGgnJWIB814BihrxlUoZc=; b=KM5HkwOxprN87LAIWk8YOLgjTTS5U6+aUqmMerVx0n6bSyGJtNKwAuOj1Y/u8Fk10oC7paIQ5NRyrRqtmif9aKBBmLQaC1duKiVIr0nkm9WBhJBQ/2Juqmbc817rdtYyF6m7Z2zllAlYMHEkXtsv9G9fCIMahTEIMbUeRR7Vm63bDPQtTfF1kC0eCyYh7JgbX+YJRvGxb2D7NCSv8e+jRtB0c4rxeE9Z8CrLl2tk0UQ/ygoSt70qLdyqYor0WBOT03GHlc7Gzgbbk34e4P+vmVSxU1czMNnQFsXayhXZle+qsMfZ8SLt7ZVbsKOTUUnHC30uVr+w69aQzW1c6I6qhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labundy.com; dmarc=pass action=none header.from=labundy.com; dkim=pass header.d=labundy.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NETORG5796793.onmicrosoft.com; s=selector1-NETORG5796793-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=kmR2ipi2kzabe0s2ZOEGV9KGgnJWIB814BihrxlUoZc=; b=RsEZbMFYqIFBms9YUAIXgnIcyZt2UZG0If0ypJTc/MR7arkFaczufxNV6NvZgPJ5ctSmae5+JMIg11XqOvJ7ep8QHlmHWeqKgM43VWbvqPIAaozHalFr2LIUTnUF/Ph+HjnMIP1ZPijJ92y7wdoiLNINybo1wYZXypPVoaLF8Uk= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none; gmail.com; dmarc=none action=none header.from=labundy.com; Received: from SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) by SA2PR08MB6555.namprd08.prod.outlook.com (2603:10b6:806:111::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3955.18; Tue, 23 Mar 2021 02:10:42 +0000 Received: from SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::d443:cdc3:d44e:d1c8]) by SN6PR08MB5517.namprd08.prod.outlook.com ([fe80::d443:cdc3:d44e:d1c8%5]) with mapi id 15.20.3955.025; Tue, 23 Mar 2021 02:10:42 +0000 From: Jeff LaBundy To: dmitry.torokhov@gmail.com, robh+dt@kernel.org Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org, Jeff LaBundy Subject: [PATCH v3 2/2] dt-bindings: input: iqs5xx: Convert to YAML Date: Mon, 22 Mar 2021 21:10:06 -0500 Message-Id: <20210323021006.367-2-jeff@labundy.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210323021006.367-1-jeff@labundy.com> References: <20210323021006.367-1-jeff@labundy.com> X-Originating-IP: [136.49.90.243] X-ClientProxiedBy: SA9PR13CA0005.namprd13.prod.outlook.com (2603:10b6:806:21::10) To SN6PR08MB5517.namprd08.prod.outlook.com (2603:10b6:805:fb::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (136.49.90.243) by SA9PR13CA0005.namprd13.prod.outlook.com (2603:10b6:806:21::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.22 via Frontend Transport; Tue, 23 Mar 2021 02:10:42 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 605381cf-9eee-4ca8-f0e3-08d8eda0dc8f X-MS-TrafficTypeDiagnostic: SA2PR08MB6555: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Uja94p1yLOOlKUxzrgxgBNjnQpkDrzPxFQ6RxzqKDZMBF5Gx6wYsrjqrrI7xsluqXjvi2rKFpB8CN/mWdmmGMsnReEhu+i4tJisD3RATBwuRWF1sQaF4j+G9DkN75MV82MhdRwYZY3CSTrbSRzZCaTk5aBwvV3dHtfbHM2cSvTku5hswCaOc0skgnQ+mGTl4iMH0MamIsZQBGst//bnzuFl//2lTmOW8FcXPWF3yTI19P3T3Eg3M8FQ4OqlzDDVWUBVqNTidfILaP+jn0odGP8EAAZzl5blDqVPv9F3kSRwpL5uSuqbjD3+bzStpczG3sINsRZLi3AH/dePBnT8K4djSXBmAPBe930lgOvnR7T/SCPwIDPuW96SNi4lM1mg+Sw2SpwHtQjUMawoYJ9cIJouAeLJSrWBh5VIkJTzzZg4I7Ib2na7Lqo85p/mk4aCUMHTyKQ+apd60pJIjl10bAb9/tJSN3yw+Ui+BJmc8isioKb34lExg1kleumsecQMWMxW6I9ASC9Qv1OAaEvwTGwcYrY7mSiucR7q0qZfcb4ZYwN0of+uRpWOCcZ40zNI5naC9naoMYQwDPKz7KVEzdFj05kj6WxZbQVA8b8471fYDMg/eHhPymWjz16tBZdKb+TsSPyQHigsx/orExHy5Svgh2L02h6zX/507oqsnZt16iQAkIq2OnVX3gKYn6T2D58RhFzoFFg7gAJ5aPiyE4ahpVYiSpPfwPxDzgldIi7OGBn9mlbw6mR2Dzw0RS4/pJqm0VpUSJaEDx6ZaBMnD4w== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR08MB5517.namprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(136003)(346002)(396003)(376002)(39830400003)(16526019)(38100700001)(6486002)(66946007)(86362001)(186003)(8676002)(66556008)(66476007)(8936002)(107886003)(1076003)(966005)(956004)(26005)(6506007)(4326008)(52116002)(83380400001)(478600001)(316002)(6666004)(69590400012)(5660300002)(36756003)(6512007)(2906002)(2616005)(32563001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: o3evYfuwYWKIS0IHzgcA8u4QA48hRDEpgDigkVxYc7W1LaE0VFlYIip2h+T6BDQfwKUfXY0C4VpI/2xVxZpDTJYviaOfpUcSlycTZTEjaSP/lwDOIYgazo09o0cnl/YSW0v8+OzY2SvmrXT0Ky/dKNORakezrOcWkEDw5JUykY7Odp/N6QNrkmj9QEGK/WE55AUspiBYOiGEL1o36AjGaVyp4lWekqSPPsWUlLnUc6BToV0orS23WH9PjzdHioSbNj4vSh4/uc/LYy75VSD1/uEZg6eBxexenuG7OhK7VpVP3NOgoTHHP4Ipkcfma84ktcoZYYtGL7+hzmPsuqu+mHyYNmDngSEOphUNSQ7wuzIzeEOpo2evTVc5fRWuTx07eBJExtg/nWMOBPxwwgW4FT+OPvYnKaZSjL3O90+efBt1FYCC5eXd5vOmsuW73vMf2d7spzUMRF47FLkuqmKE3/tdBiQeBVFjXlB2nZ4e2FYDCTgy2A2gvKLkJF3Tk8dPlUXt2Ii1a4c86Bd4tzB+dtpwnRBUpMzXZQ3T57uiX1l286fiEBVNf+LHpRAajXkg06rZBex1eRtG/PZlTzEtVuyEonQPGNeO7pfyz7PqBGHAGNnzRswR+3w4sU6/OSKOztWrRHFF/kSH83AlzIpy8CdvFs+A3S65KHe3uuQ41qbX3p6kiuca0KNqZlkVaVGgvpL4a2zuekH12Sz4/018Taodf3ob7KDYaYkLYRpukstedMNz8Bn9coZ/40kKL6RlRM6hl4s26Qa7vnayKFSRu6MZDzzfOUxMFQxZGP5E7seX3GC/Z5qCat7q6Wb8FRcDeR5QGCTOCHdmw1rwXUei64nqv4+APqI0VIg4/JcI/Gf7qR21JMUUtKOqSI42UqqHXkhis0NMyNxVKxi+PaMLM714hOE3wbw5NOymMhXBGvL/vb1NG9HXcJPCMTiZoFU1Q7g7thys+ZHm2hfK8fb3UiZXKICm52XEdyTiuBdr72hkMJcb6vbjMtv6PrbyRe56IwN4dc1EgzEDZItL/M6cuttZOzkIFdZ67/WWl/B/u/PxRVAs3Mw23WjUcPMx+dkve0Lr3zYGLldRaJqQtpfVvO2BlQ/vU5pVsgjBWhEe5u+J4DZAOs+2p9C9FHurhvV694xJI8MuFt3GfYG44XIi7Ria2lQWbaJkh14r1y4TD9yzPGbcXa4ZZSHOL9tc/Xk1+0Yb0VAkw5hMBUy7Ukp6GeoJp2Mzl4xRgYuo7V3DFf3AFqh1ar0DkY08iwEXZNPjodTSe726+ImiqXXhixUtC9t1CRIlbRapUru3dNwzmm6Dw7DZZ8GeDWkSNFkjPvHj X-OriginatorOrg: labundy.com X-MS-Exchange-CrossTenant-Network-Message-Id: 605381cf-9eee-4ca8-f0e3-08d8eda0dc8f X-MS-Exchange-CrossTenant-AuthSource: SN6PR08MB5517.namprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2021 02:10:42.5325 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 00b69d09-acab-4585-aca7-8fb7c6323e6f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YHVgPcf3A+tk7zmCf4eZtJGnBAk+XlDMRFRA6rLiZEoWxQj80sgMzEPebGQ6Z76x+dJ4nfLTZqKUSi2FF7SNbg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA2PR08MB6555 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This patch converts the legacy text-based binding document to YAML format. Extraneous details and touchscreen properties that weren't actually supported have been dropped. The reset GPIO has since been made optional in the driver; this is now reflected here as well. Signed-off-by: Jeff LaBundy Reviewed-by: Rob Herring --- Changes in v3: - None Changes in v2: - Added vendor prefix to filename and $id - Added Reviewed-by trailer .../input/touchscreen/azoteq,iqs5xx.yaml | 75 +++++++++++++++++ .../bindings/input/touchscreen/iqs5xx.txt | 80 ------------------- 2 files changed, 75 insertions(+), 80 deletions(-) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/azoteq,iqs5xx.yaml delete mode 100644 Documentation/devicetree/bindings/input/touchscreen/iqs5xx.txt -- 2.17.1 diff --git a/Documentation/devicetree/bindings/input/touchscreen/azoteq,iqs5xx.yaml b/Documentation/devicetree/bindings/input/touchscreen/azoteq,iqs5xx.yaml new file mode 100644 index 000000000000..b5f377215c09 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/azoteq,iqs5xx.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/input/touchscreen/azoteq,iqs5xx.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Azoteq IQS550/572/525 Trackpad/Touchscreen Controller + +maintainers: + - Jeff LaBundy + +description: | + The Azoteq IQS550, IQS572 and IQS525 trackpad and touchscreen controllers + employ projected-capacitance sensing and can track up to five independent + contacts. + + Link to datasheet: https://www.azoteq.com/ + +allOf: + - $ref: touchscreen.yaml# + +properties: + compatible: + enum: + - azoteq,iqs550 + - azoteq,iqs572 + - azoteq,iqs525 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + reset-gpios: + maxItems: 1 + + wakeup-source: true + + touchscreen-size-x: true + touchscreen-size-y: true + touchscreen-inverted-x: true + touchscreen-inverted-y: true + touchscreen-swapped-x-y: true + +required: + - compatible + - reg + - interrupts + +additionalProperties: false + +examples: + - | + #include + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + touchscreen@74 { + compatible = "azoteq,iqs550"; + reg = <0x74>; + interrupt-parent = <&gpio>; + interrupts = <27 IRQ_TYPE_LEVEL_HIGH>; + reset-gpios = <&gpio 22 (GPIO_ACTIVE_LOW | + GPIO_PUSH_PULL)>; + + touchscreen-size-x = <800>; + touchscreen-size-y = <480>; + }; + }; + +... diff --git a/Documentation/devicetree/bindings/input/touchscreen/iqs5xx.txt b/Documentation/devicetree/bindings/input/touchscreen/iqs5xx.txt deleted file mode 100644 index efa0820e2469..000000000000 --- a/Documentation/devicetree/bindings/input/touchscreen/iqs5xx.txt +++ /dev/null @@ -1,80 +0,0 @@ -Azoteq IQS550/572/525 Trackpad/Touchscreen Controller - -Required properties: - -- compatible : Must be equal to one of the following: - "azoteq,iqs550" - "azoteq,iqs572" - "azoteq,iqs525" - -- reg : I2C slave address for the device. - -- interrupts : GPIO to which the device's active-high RDY - output is connected (see [0]). - -- reset-gpios : GPIO to which the device's active-low NRST - input is connected (see [1]). - -Optional properties: - -- touchscreen-min-x : See [2]. - -- touchscreen-min-y : See [2]. - -- touchscreen-size-x : See [2]. If this property is omitted, the - maximum x-coordinate is specified by the - device's "X Resolution" register. - -- touchscreen-size-y : See [2]. If this property is omitted, the - maximum y-coordinate is specified by the - device's "Y Resolution" register. - -- touchscreen-max-pressure : See [2]. Pressure is expressed as the sum of - the deltas across all channels impacted by a - touch event. A channel's delta is calculated - as its count value minus a reference, where - the count value is inversely proportional to - the channel's capacitance. - -- touchscreen-fuzz-x : See [2]. - -- touchscreen-fuzz-y : See [2]. - -- touchscreen-fuzz-pressure : See [2]. - -- touchscreen-inverted-x : See [2]. Inversion is applied relative to that - which may already be specified by the device's - FLIP_X and FLIP_Y register fields. - -- touchscreen-inverted-y : See [2]. Inversion is applied relative to that - which may already be specified by the device's - FLIP_X and FLIP_Y register fields. - -- touchscreen-swapped-x-y : See [2]. Swapping is applied relative to that - which may already be specified by the device's - SWITCH_XY_AXIS register field. - -[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt -[1]: Documentation/devicetree/bindings/gpio/gpio.txt -[2]: Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt - -Example: - - &i2c1 { - /* ... */ - - touchscreen@74 { - compatible = "azoteq,iqs550"; - reg = <0x74>; - interrupt-parent = <&gpio>; - interrupts = <17 4>; - reset-gpios = <&gpio 27 1>; - - touchscreen-size-x = <640>; - touchscreen-size-y = <480>; - - touchscreen-max-pressure = <16000>; - }; - - /* ... */ - };