From patchwork Wed May 15 13:11:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin GAIGNARD X-Patchwork-Id: 10944747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2F1871395 for ; Wed, 15 May 2019 13:12:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FE2C28B30 for ; Wed, 15 May 2019 13:12:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CE3528B27; Wed, 15 May 2019 13:12:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 850D128B51 for ; Wed, 15 May 2019 13:12:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727644AbfEONMg (ORCPT ); Wed, 15 May 2019 09:12:36 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:60882 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727279AbfEONMT (ORCPT ); Wed, 15 May 2019 09:12:19 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4FDBiB6004311; Wed, 15 May 2019 15:12:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=Nushr9Q4ATrGXX1cBhEzuz9GYEidZFGLJO4tbBczcbM=; b=Db2STe7UxW1FEPSN2ItGT+VUAYbPjDC1xrsS1tpWJ7Tv2hE3wen+CCsnWMIHe9ShUpqf onpkGHkNa/6Yuda/EDs3zbtZxspgLtQtNg12lK2joxVNplB/LtJwOneWk+7sThnXtZAT 6OGLPg7WXkEFTPPnRKJ5JuUbMlc4dcFB/QwxXKvC3uxGvJqGAr6HbhhZG3y+sJN8moqt huIkibREvpjfkJ0lNE/k0dfNkv0m/t2zS7XfECGz0osM1iZBzQ9E4ReAxbO2Ly4JA8Da 1z9bDngVfndzZBdF+XtTb5ls4RUjtHdUzdBNm0ZYRbPLdIEdGK4937XbD2otIkpd77kf TQ== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sdn9g0yej-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 15 May 2019 15:12:05 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D352E34; Wed, 15 May 2019 13:12:02 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A844127F6; Wed, 15 May 2019 13:12:02 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 May 2019 15:12:02 +0200 Received: from localhost (10.201.20.122) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 May 2019 15:12:01 +0200 From: Benjamin Gaignard To: , , , , , , , , CC: , , , , , Benjamin Gaignard Subject: [PATCH v2 1/5] of/device: Add of_device_link_add function Date: Wed, 15 May 2019 15:11:50 +0200 Message-ID: <20190515131154.18373-2-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20190515131154.18373-1-benjamin.gaignard@st.com> References: <20190515131154.18373-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-15_07:,, signatures=0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use 'suspend-dependencies' property from device node to ensure that the listed devices will suspended after it and resumed before it. Signed-off-by: Benjamin Gaignard --- CC: Rafael J. Wysocki version 2: - only keep of_device_links_add() and use DL_FLAG_PM_RUNTIME and DL_FLAG_AUTOREMOVE_CONSUMER flags to follow Rafael advices - reword function description - try to use a more explicit property name drivers/of/device.c | 37 +++++++++++++++++++++++++++++++++++++ include/linux/of_device.h | 7 +++++++ 2 files changed, 44 insertions(+) diff --git a/drivers/of/device.c b/drivers/of/device.c index 3717f2a20d0d..44ec84eee310 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c @@ -336,3 +336,40 @@ int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env) return 0; } EXPORT_SYMBOL_GPL(of_device_uevent_modalias); + +/** + * of_device_links_add - Create links between a consumer device + * and it listed dependencies from device tree data + * + * @consumer: consumer device + * + * Ensure that consumer's dependencies will be suspended after it + * and resumed before it. + * + * Returns 0 on success, < 0 on failure. + */ +int of_device_links_add(struct device *consumer) +{ + struct device_node *np; + struct platform_device *pdev; + int i = 0; + + np = of_parse_phandle(consumer->of_node, "suspend-dependencies", i++); + while (np) { + pdev = of_find_device_by_node(np); + of_node_put(np); + if (!pdev) + return -EINVAL; + + device_link_add(consumer, &pdev->dev, + DL_FLAG_PM_RUNTIME | + DL_FLAG_AUTOREMOVE_CONSUMER); + platform_device_put(pdev); + + np = of_parse_phandle(consumer->of_node, "suspend-dependencies", + i++); + } + + return 0; +} +EXPORT_SYMBOL_GPL(of_device_links_add); diff --git a/include/linux/of_device.h b/include/linux/of_device.h index 8d31e39dd564..83f24c386d51 100644 --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -41,6 +41,8 @@ extern int of_device_request_module(struct device *dev); extern void of_device_uevent(struct device *dev, struct kobj_uevent_env *env); extern int of_device_uevent_modalias(struct device *dev, struct kobj_uevent_env *env); +extern int of_device_links_add(struct device *consumer); + static inline void of_device_node_put(struct device *dev) { of_node_put(dev->of_node); @@ -91,6 +93,11 @@ static inline int of_device_uevent_modalias(struct device *dev, return -ENODEV; } +static int of_device_links_add(struct device *consumer) +{ + return 0; +} + static inline void of_device_node_put(struct device *dev) { } static inline const struct of_device_id *__of_match_device( From patchwork Wed May 15 13:11:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin GAIGNARD X-Patchwork-Id: 10944737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA4CD912 for ; Wed, 15 May 2019 13:12:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B906828B27 for ; Wed, 15 May 2019 13:12:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B25AF28B2A; Wed, 15 May 2019 13:12:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3992C28B72 for ; Wed, 15 May 2019 13:12:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727455AbfEONMR (ORCPT ); Wed, 15 May 2019 09:12:17 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:60880 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725977AbfEONMR (ORCPT ); Wed, 15 May 2019 09:12:17 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4FDBiB5004311; Wed, 15 May 2019 15:12:05 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=hsoagTcEmJBlum5Zj5KDBo7ERhzML01L3nfhfLigSUo=; b=G40l7JyrSWymwzpB5rECgcNxInszg90AWT5SP2l5Wl4F1V6dcnrMUwbBAfOwWVjPQmA2 v7TQK1b4iUArK889X2XELYHapjDuKjiP3DcZjBhA0JfqHnpIlhxaDyWx2IkQY0kcF9S2 7v8ZuJmNfjoyL6Vt38unKf0okgL5+U908M0LC+EEK4AAP9iicnLrz9EHzOo3+VDRGAkb 4mqJM3X3eXN273oAkNI8M2pmNCEayMwl7RKhwQvsVKZQS/bLwcs2OVd8lNaqUZvB2Da0 gmOdTdSe99L52jz/3dbt4kA8BJbsvd+Kxm5NMomvzcxhhi9UXYZdkqr5R4xIYMSDU+RD Sg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sdn9g0yeq-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 15 May 2019 15:12:05 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BB91638; Wed, 15 May 2019 13:12:03 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 9EE0627F5; Wed, 15 May 2019 13:12:03 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 May 2019 15:12:03 +0200 Received: from localhost (10.201.20.122) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 May 2019 15:12:03 +0200 From: Benjamin Gaignard To: , , , , , , , , CC: , , , , , Benjamin Gaignard Subject: [PATCH v2 2/5] Input: edt-ft5x06: Document suspend-dependencies property Date: Wed, 15 May 2019 15:11:51 +0200 Message-ID: <20190515131154.18373-3-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20190515131154.18373-1-benjamin.gaignard@st.com> References: <20190515131154.18373-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-15_07:,, signatures=0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Explain the purpose of suspend-dependencies property. Signed-off-by: Benjamin Gaignard --- Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt index 870b8c5cce9b..81e8eb44d720 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/edt-ft5x06.txt @@ -60,6 +60,8 @@ Optional properties: - touchscreen-inverted-x : See touchscreen.txt - touchscreen-inverted-y : See touchscreen.txt - touchscreen-swapped-x-y : See touchscreen.txt + - suspend-dependencies : Phandle list of devices which have to be suspended + after touchscreen device and resumed before it. Example: polytouch: edt-ft5x06@38 { From patchwork Wed May 15 13:11:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin GAIGNARD X-Patchwork-Id: 10944743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7ED081395 for ; Wed, 15 May 2019 13:12:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EDF2289EC for ; Wed, 15 May 2019 13:12:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CC5928B74; Wed, 15 May 2019 13:12:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0AC4D289EC for ; Wed, 15 May 2019 13:12:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727590AbfEONMa (ORCPT ); Wed, 15 May 2019 09:12:30 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:60898 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727499AbfEONMU (ORCPT ); Wed, 15 May 2019 09:12:20 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4FDBhEL004299; Wed, 15 May 2019 15:12:11 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=PcTbp14GM3Mxz+zqvEsn1niPCjuTf8GT2tk2Gi5qUTg=; b=FzMUmPhVtN3V7xWPWMIQFZ2K5RRaZ9Mds6q2QX7/CVbbkbMqOAZiIdU3jOARwXWPL/LF TYZs/0XC9FHMssVln+N2OFjtMNQIl566Jc/gT7FhnDFJuNTizqFh/1sTKVgY1HxLD+w1 FiIhxxBKKqxVAhunOUq0QH4ALvmBcHV7MXSdqD0VQ8nYg9eIMRdLE7+gfJ0m0nef1lLE UHy0oDjWNeGEG7HQVayfsY1twGOVagl3SYdZKy8eVZOnEzcdqNM85v/uLFxnqVrSkQ3/ FxMctpbgO8SsTIMtZ4d0EkYRmu8qlGqkrccN2xV6XHwnmeVBJvdsO3pDhclCi/8strA6 QA== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2sdn9g0yex-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 15 May 2019 15:12:11 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id D8A1731; Wed, 15 May 2019 13:12:04 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id B480127F6; Wed, 15 May 2019 13:12:04 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 May 2019 15:12:04 +0200 Received: from localhost (10.201.20.122) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 May 2019 15:12:04 +0200 From: Benjamin Gaignard To: , , , , , , , , CC: , , , , , Benjamin Gaignard Subject: [PATCH v2 3/5] input: edt-ft5x06 - Call of_device_links_add() to create links Date: Wed, 15 May 2019 15:11:52 +0200 Message-ID: <20190515131154.18373-4-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20190515131154.18373-1-benjamin.gaignard@st.com> References: <20190515131154.18373-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-15_07:,, signatures=0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a call to of_device_links_add() to create links with suspend dependencies at probe time. Signed-off-by: Benjamin Gaignard --- drivers/input/touchscreen/edt-ft5x06.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 702bfda7ee77..65053be10d4e 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1167,6 +1167,8 @@ static int edt_ft5x06_ts_probe(struct i2c_client *client, i2c_set_clientdata(client, tsdata); + of_device_links_add(&client->dev); + irq_flags = irq_get_trigger_type(client->irq); if (irq_flags == IRQF_TRIGGER_NONE) irq_flags = IRQF_TRIGGER_FALLING; From patchwork Wed May 15 13:11:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin GAIGNARD X-Patchwork-Id: 10944739 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0312E912 for ; Wed, 15 May 2019 13:12:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E727B28B56 for ; Wed, 15 May 2019 13:12:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E53BF28B5D; Wed, 15 May 2019 13:12:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E65E28A40 for ; Wed, 15 May 2019 13:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727500AbfEONMU (ORCPT ); Wed, 15 May 2019 09:12:20 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:1068 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727454AbfEONMT (ORCPT ); Wed, 15 May 2019 09:12:19 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4FDB6OK031810; Wed, 15 May 2019 15:12:06 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=lvuSqMIYQB4SqeLsqz/zFiFWJBb395UBGK+DGWYS67Q=; b=FMPk09oy2925ne/C9OKRkyWxbDjb9FCfIqO9XPFCUJ7ib3NIfEDHdqSdRnfJOXvisL4X maLF3pNN4bEaGKutiEhOMfYPJjL6nh2huxxFAopMgHBBCRW/DwAa1hK66OVMoSPFoAG/ klsCm/HTEirm95eey+NWYAaaS325MP1Nt9X5APosBJeaksgibGuVsHquf+LXQifpx0Zs /pVxP1z0KodPE/YOcJxpmYBYGVIcxYEr3NVazhokMqNQlDlLAhHqeVCj1pADnIKfMzSL lrnB9dV5qRyzxR8MQ1vVKHqEQ6ucP9MoBtRZjvUQ9nKLlwba15c3vXrEu6P155jQJCb4 Ag== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2sg0an6gjv-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 15 May 2019 15:12:06 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 08D5534; Wed, 15 May 2019 13:12:06 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DBFBA27F6; Wed, 15 May 2019 13:12:05 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 May 2019 15:12:05 +0200 Received: from localhost (10.201.20.122) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 May 2019 15:12:05 +0200 From: Benjamin Gaignard To: , , , , , , , , CC: , , , , , Benjamin Gaignard Subject: [PATCH v2 4/5] Input: goodix: Document suspend-dependencies property Date: Wed, 15 May 2019 15:11:53 +0200 Message-ID: <20190515131154.18373-5-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20190515131154.18373-1-benjamin.gaignard@st.com> References: <20190515131154.18373-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-15_07:,, signatures=0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Explain the purpose of suspend-dependencies property. Signed-off-by: Benjamin Gaignard --- Documentation/devicetree/bindings/input/touchscreen/goodix.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt index 8cf0b4d38a7e..5527952054d2 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/goodix.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/goodix.txt @@ -24,6 +24,8 @@ Optional properties: - touchscreen-size-x - touchscreen-size-y - touchscreen-swapped-x-y + - suspend-dependencies : Phandle list of devices which have to be suspended + after goodix device and resumed before it. The touchscreen-* properties are documented in touchscreen.txt in this directory. From patchwork Wed May 15 13:11:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin GAIGNARD X-Patchwork-Id: 10944745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 15079912 for ; Wed, 15 May 2019 13:12:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0558B28B79 for ; Wed, 15 May 2019 13:12:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0376228B03; Wed, 15 May 2019 13:12:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 950D628B20 for ; Wed, 15 May 2019 13:12:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727624AbfEONMg (ORCPT ); Wed, 15 May 2019 09:12:36 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:1044 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725977AbfEONMT (ORCPT ); Wed, 15 May 2019 09:12:19 -0400 Received: from pps.filterd (m0046037.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4FDBBEr031840; Wed, 15 May 2019 15:12:08 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=STMicroelectronics; bh=8NQw4ybPrTmbk6atvWzEug5p4ly6IPD/vByobMwQlWs=; b=e8yA7GkuwUcHC8QJYOGT8O1YoxLYncnlRByUHHNUM9lp8CmbJhlaZ0Tcimuib+Kd+o3j d9wdsyRaC7zQycrq4LVU0a8n/j37ao0UeUNV4uqcs7fzqZ+IlqmfsrEiTGZQmfPwxtKj agjUF5W0v4vQSbKHqFnCF8K4EMUNVVJRC6PXOIRAW+kM1JD8QAcabrUiuGZrpKFkyud2 fmgIAyj3E8esjWDtKCQWa+0vDCCa+bYIcDKjYoTgACs109MJiQ6F6DfCSl12cqPuOaOv pFGxp9om4w13kCeu/X2etTnhrHqBM3v77JAlRpUvz05i4g7Zwi4vainoclLczKLyyOgm bg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2sg0an6gk1-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 15 May 2019 15:12:08 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4356A34; Wed, 15 May 2019 13:12:07 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas21.st.com [10.75.90.44]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 23ED727F6; Wed, 15 May 2019 13:12:07 +0000 (GMT) Received: from SAFEX1HUBCAS22.st.com (10.75.90.93) by SAFEX1HUBCAS21.st.com (10.75.90.44) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 May 2019 15:12:06 +0200 Received: from localhost (10.201.20.122) by Webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 May 2019 15:12:06 +0200 From: Benjamin Gaignard To: , , , , , , , , CC: , , , , , Benjamin Gaignard Subject: [PATCH v2 5/5] input: goodix - Call of_device_links_add() to create links Date: Wed, 15 May 2019 15:11:54 +0200 Message-ID: <20190515131154.18373-6-benjamin.gaignard@st.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20190515131154.18373-1-benjamin.gaignard@st.com> References: <20190515131154.18373-1-benjamin.gaignard@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.20.122] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-15_07:,, signatures=0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a call to of_device_links_add() to create links with suspend dependencies at probe time. Signed-off-by: Benjamin Gaignard --- drivers/input/touchscreen/goodix.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index f57d82220a88..49fd4763f17b 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -30,6 +30,7 @@ #include #include #include +#include #include struct goodix_ts_data; @@ -812,6 +813,8 @@ static int goodix_ts_probe(struct i2c_client *client, ts->chip = goodix_get_chip_data(ts->id); + of_device_links_add(&client->dev); + if (ts->gpiod_int && ts->gpiod_rst) { /* update device config */ ts->cfg_name = devm_kasprintf(&client->dev, GFP_KERNEL,