From patchwork Wed May 19 07:14:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jun Li X-Patchwork-Id: 12266483 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=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, 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,URIBL_BLOCKED,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 A1829C433ED for ; Wed, 19 May 2021 07:34:23 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3078C6108D for ; Wed, 19 May 2021 07:34:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3078C6108D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nxp.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RcR/SpgHuw16Tqpy7PwS3V6icx0B+dZ1B0zALz+AfrI=; b=PgiThP9wTwS2aXIQSie64b1vU 85gQPX36Ssm+JcRTIWLseiCBaOxV9abwdi31kxRPxb2QXGVaJuZZspoprQvsqPqQsohPv8tlxAnUM JwTOWBgvJN4MAkqU/cvZE9JFx5z/hsqcISpVK85KOmQI+gxPuj/qHhcZJ34PpRbhtWMRYxTbRoWMD GJMCR18HhZ1/r+hIJ5vNNz5789VZqAykbaxxsDyoCneSjdQ26OcGtoZTawN/PCXDdZP5lDEVoXQb/ RA0hwru1PP8B0vfaPF7VwL5w9Fc4/MA1RNuyngGuoJB7SsxVIgOapEPD41SeVHXqDbVg0jUwek9DP o1FRr5PEw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljGgm-003BGl-9P; Wed, 19 May 2021 07:32:20 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljGgT-003BF2-1F for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 07:32:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=MIME-Version:Content-Type:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zBxjHPcoTm9JKCP6/X3QEVKNd8/3+Qqr9Qbi/CtJuhM=; b=LwYE4JQ3k2XcF1EOYJW6L0Pu+v IIsZbcASEfmdOw5QkXA/TJItWYH/CZ5tukAKY8KiPTEKdT481H9/zreGoY25qT4PAWaWuZfepXaKQ B/aYV+fIiKUyn5jDDXR06uqgPoAmKnU+D71WUAma1FvZpBuEXfqYZ9BwJgaNuGaDZPAJN7P0uSclH QVGngfb6YuvH/cSm9YbI7/GVYOyafe7/WNa3FefmGmP/KGm3mU9QsDNNKNoiWE/Ai/wRbP7nwJW3s b4vAWJaHoLcA5MJl99JPpI1QmlF2cVe7shLWPg5Ht6LJtjOALXzfqZcE0R6b5sv2VVIUwo/OYt+Xu ssUYyzbA==; Received: from mail-eopbgr140071.outbound.protection.outlook.com ([40.107.14.71] helo=EUR01-VE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljGgQ-00FDlp-Il for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 07:31:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jSmeyw27Uw2eQ8o+dTeJGWEwUcR0riKdCvm69Ui8Uqxd3Dhzy/1me1/QlMulriTZfpZOk08R1kBQpsQ3CZz6MqKVvjGyjN6IE2bTOJ3aHS9Ygo8YbbpvXMj9jrh3OQquSbrqpVObndsZBXk2xWY5qdlOD6GmVxGTOx/TgK4UnyaSAVW+5i4ud7aVZACn5im3YCrvD46SRO9RC7V4pfMXeGBoBH3hcdbxqVYpOLbLSj7ZkfdFKpRPiO0sOQYCf0gZ5tIm/Btlyy8/Dul/hgRtxcCjcEoZhKTBBNnfjtRE3kkisn53538Pfozgzmq2HpYdcNz2lMOdsQQ7/5SYDMNiRQ== 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=zBxjHPcoTm9JKCP6/X3QEVKNd8/3+Qqr9Qbi/CtJuhM=; b=A9XRxbmRSelalSbsbRfQsIqWBut/JBSM8PlRpco4h7tEDdamtjDxbBd+UkgQNW/1HhMWFbGPGDvnKYCGwXYaFDDMETadsVJ9Fhsqf2G3w8wk/7+s+TU5AT866z628TEBbzu2Gs1VsKpFHYzKnr7kMMQv3kefGLzZnlGNNoq/DR/ZX081NR+9z6i6BqRxZC6qYiqIRlJYc1DcjQWa012SHYFLZzGNhhbHd78469kz6xg3Y53ZOHuOZsDfS17U523kbGijk5a8t4Tjzq6zk7vOhmaNtyfzUj1zNDPIPBwCo4J3OxDrzaVoJO0g3Iy20T4jS8SZ6ousT7pRryWJNBZURA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zBxjHPcoTm9JKCP6/X3QEVKNd8/3+Qqr9Qbi/CtJuhM=; b=GzzQKW1mNV5PkMYlePKKSfRpzPv7Ay1i/bop9MyZvXIImH6MnAKL1q4MAWN5ZuHx8ObBTeRz7A2nfNYlYcKXZtCXXu/5P6g9YfRhOmQ/uvAY4BpUwO5dQYtE7ZN3rRA8dfVG3+irvtnDKVJL/zysMYoor52pdfhFBMaPkR7Q688= Authentication-Results: linux.intel.com; dkim=none (message not signed) header.d=none;linux.intel.com; dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB5935.eurprd04.prod.outlook.com (2603:10a6:803:e9::17) by VI1PR04MB6237.eurprd04.prod.outlook.com (2603:10a6:803:f1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.28; Wed, 19 May 2021 07:31:50 +0000 Received: from VI1PR04MB5935.eurprd04.prod.outlook.com ([fe80::ddf7:8cd0:3132:7dbe]) by VI1PR04MB5935.eurprd04.prod.outlook.com ([fe80::ddf7:8cd0:3132:7dbe%7]) with mapi id 15.20.4129.032; Wed, 19 May 2021 07:31:50 +0000 From: Li Jun To: heikki.krogerus@linux.intel.com, robh+dt@kernel.org, shawnguo@kernel.org Cc: gregkh@linuxfoundation.org, linux@roeck-us.net, linux-usb@vger.kernel.org, linux-imx@nxp.com, jun.li@nxp.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/4] usb: typec: use typec cap fwnode's of_node for typec port Date: Wed, 19 May 2021 15:14:48 +0800 Message-Id: <1621408490-23811-3-git-send-email-jun.li@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1621408490-23811-1-git-send-email-jun.li@nxp.com> References: <1621408490-23811-1-git-send-email-jun.li@nxp.com> X-Originating-IP: [119.31.174.66] X-ClientProxiedBy: SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) To VI1PR04MB5935.eurprd04.prod.outlook.com (2603:10a6:803:e9::17) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (119.31.174.66) by SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.4129.32 via Frontend Transport; Wed, 19 May 2021 07:31:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ccf085c-36bb-44c8-0780-08d91a982a3e X-MS-TrafficTypeDiagnostic: VI1PR04MB6237: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:350; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WgfFiCGm3EyAkVwyIX6tILXZwsmw0Slgp+bH5Qp32aacYFhHlIa7dSEhSwYFoyExTsgElM9J0ndIOF050ZIofmshclHRkMLxR/sW6prLh5mfdVZiDTyL/vkvlIoy6G+aOSb8tSqUZQ/ms3+scsdEQ7pFJC7Y4W7kCVpUG/Bm+IzAhXNrxs5NTWAngjMH4nsllJhjDhxs34PDbShDebyKPYMYEYTZuqemUgSfVTp0JeT4wLZikg/XVKWluC3NkuLmAkp5uoBkgRG/KAo8NA26BragcFYgUGBRwMK3L6Dfcmc/NrLeP5NMaifX81HHVIzoXJ0+PgX67eqPwrteRxijF47IXSjGKwcmKHSCSotMkwJ3pJT6VFiF0q041gQyov9I+UclIhc0UZNuR1mIw1CRUqtYKIYYFWQDDoSDzpSivSmvbOQthnlOWosSOt5Nu51iNOu+K6qp+VDbJzNvioS1mDVO2Ek5Ba0QOx1NmsKnuGNQNTPlg8l2vtC8XfJmcs0yPug52omGB1W08JxsTczGOME+VvrCfgpMdfnf5L1BZMb320rPNMnJGirLzQYJWVecdcENwaljUcnx4vzmyU0/6eQfxNUfPqamDaIAJVZ6Hn1iW7S4UMP66TGkdmeN9w1OZ+EAC11SPMtuSsTN7QPpWc+4wV5/cKhhzBqZQoPipi/R+CYFyb2qMpM8p8Rux26g X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5935.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(346002)(376002)(396003)(136003)(86362001)(478600001)(36756003)(4326008)(2906002)(52116002)(6486002)(26005)(38350700002)(6506007)(38100700002)(16526019)(186003)(4744005)(8936002)(316002)(66946007)(66476007)(5660300002)(66556008)(6512007)(2616005)(8676002)(956004)(69590400013); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: sPmgo/iySW4mlw9mYERpQVRfw1Q/zpDsBSmAp4z0+uc3GLzRa75utjuT7Csms1ZGQR4/iV5BGvB8wHD+pvv/ZlludTPcbULyArYMhw5bHItv1qqenrtPxucRVpwcouN15aT4BGcnrIu0YyUd5kW1uMPqpwrLkzH4qflKiGRXOI+kwII8oIFJUh9Vb9BnJ/9kE7IpI6OadB7I0LTKp9Qu+apIUtPAPWQwj9lH5eaV07hgItFZVnF37p4keHEi2cRMGlpZKFheEiykVgKpweb1A9GJQ6lAvLwcJ7rv0jgmzhfLZsYZuumpTuPQURQF80/3bMw5BqD6qyEp0GpQHxNPHX6d56t3FALOhe9RIqa5xl3R6CqVuGcSUukGPEN2GcqgSMKEgKcwy+dYmiagFtI9QRduHjfeDFZgY/aV2CfEcopyeHSZCClPpZ+ctiwUoGctZFdj33yGt39J3nd2M2aHTO/2+tgcihxDw/0QfTE5cyYWfjuUh+6h5+yGh2nwnplT1O1wTh9UY8/CDdB9mROegm8yYJBNXVqzXgYkYeGi4DNp2kp9TvEO/2FLCwWOx35UCWluy7PFdL02qPEW0GjE8q19Sn1eAITYRo24kRtyUdtbDaJoUK5Ezl3C+8kRykybmRKEL4dayX3zGb4dMx6Wz1ylMGc9/dBB4KPkzLvDnP5NwEHU5H48wHHVjL/oRnNdpk0W6xIRW/IP3hiCF/NjH2Bc+qUv4bWBCLgu+BFRDaHWeHiST5zLAwmK8vNz9NCrQrSwAdf+UYuerNd6ivoE1JJTKprxu5HsZi8+8boIiSsfvafr3fSKi4fO85hmkXr6KuDQKXNWSL/7s+5mOGY5LJoz6bl/T62BKpgEX5texrQtobXP9qxMY+QpSCiPl/urBdTUvToIweK2QiQ+E2Wbonv39KXLjdtObJmeQzrBJL1tbcN4jEaxtshrpZQfaJBAFJRgyCDor8UlXZAbumQWABKiGMx4IwDUouCWA4SyG47QmN5wio9bev0tW0wPnNXm75qSXqPccpaMeKcUENcGuA/dwMNt/BUubVja6XY0HX5mCY+9Ze3W+C4jicP287I7eE9vqw8kSAQ1lwzDIxD+IHs7lF29i1BlPbkY4J6NT35tX26Kn4UbNdILVuioPXFry8LspLUXA5KzxOVT5iEaUbllA1DBy09TPcL2yKgR5/ZvxEm9KK/7gzSUtizjhIxi1vCID8GbVJR7RJP/PsmJG4Xm2ArIWu5543lNJm1uCU0zvL7ZY07kX33YLzUhd+Kr9Jm7ajQgRw1C3dssAkVZlPU5JtgyuQ7DpXGI4eUhU3PsEY4Na2kPKVp9jTi0UF29 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ccf085c-36bb-44c8-0780-08d91a982a3e X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5935.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2021 07:31:49.9593 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2g21yhlHPnd32+t5AJ3vFl0xSqftcT/TLJog/U7PlaM1fp2cydjqqgwKhwbY/yqb X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6237 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210519_003158_641033_1D2A7D9C X-CRM114-Status: GOOD ( 11.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Asssign typec cap fwnode's of_node to typec port, then we can use typec port device to get properties from its OF. Signed-off-by: Li Jun --- drivers/usb/typec/class.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c index b9429c9f65f6..a29bf2c32233 100644 --- a/drivers/usb/typec/class.c +++ b/drivers/usb/typec/class.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -2049,6 +2050,7 @@ struct typec_port *typec_register_port(struct device *parent, port->dev.class = &typec_class; port->dev.parent = parent; port->dev.fwnode = cap->fwnode; + port->dev.of_node = to_of_node(cap->fwnode); port->dev.type = &typec_port_dev_type; dev_set_name(&port->dev, "port%d", id); dev_set_drvdata(&port->dev, cap->driver_data);