From patchwork Wed May 16 16:00:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Thomson X-Patchwork-Id: 10404275 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1D75160155 for ; Wed, 16 May 2018 16:01:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D228285B0 for ; Wed, 16 May 2018 16:01:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BC21285BD; Wed, 16 May 2018 16:01:08 +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=-5.4 required=2.0 tests=BAYES_00,FROM_WORDY, 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 A3A5A285C8 for ; Wed, 16 May 2018 16:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751132AbeEPQAy (ORCPT ); Wed, 16 May 2018 12:00:54 -0400 Received: from mail1.bemta25.messagelabs.com ([195.245.230.132]:27320 "EHLO mail1.bemta25.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750858AbeEPQAx (ORCPT ); Wed, 16 May 2018 12:00:53 -0400 Received: from [46.226.53.50] (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256 bits)) by server-4.bemta.az-c.eu-west-1.aws.symcld.net id 86/66-04252-FA55CFA5; Wed, 16 May 2018 16:00:47 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrDIsWRWlGSWpSXmKPExsUSt3Opse760D9 RBlv2MVk0L17PZtG1eieLxeVdc9gsFi1rZbZ4svAMkwOrx7yTgR77565h99j5vYHd4/MmuQCW KNbMvKT8igTWjFWfEwqa2CoWLfjG0sA4m7WLkYtDSGA9o8TylwuAHE4gp0Li6byFLCA2m4CFx OQTD9hAbBYBVYkHN08A2RwcwgIeEif3pIH0igh0M0qc3PSUHaSGWSBJYu3bHmYQm1fAQeLSjW 1sELagxMmZT1ggaiQkDr54wQyxy0Di9IJGsLiEgL3E9PdXmUHmSwjoSzQei4UIG0p8n/UNqsR c4k/7aqYJjPyzkEydhWTqAkamVYzmSUWZ6RkluYmZObqGBga6hoZGukYGxroWRnqJVbrJeqml uuWpxSW6hnqJ5cV6xZW5yTkpenmpJZsYgaHMAAQ7GK98Sz7EKMnBpCTK2/fvd5QQX1J+SmVGY nFGfFFpTmrxIUYZDg4lCd7HIX+ihASLUtNTK9Iyc4BRBZOW4OBREuG9BJLmLS5IzC3OTIdInW JUlBLnZQfGopAASCKjNA+uDRbJlxhlpYR5GYEOEeIpSC3KzSxBlX/FKM7BqCTM2wgyniczrwR u+iugxUxAixkP/AZZXJKIkJJqYGRRM+u9r1YxydPXKf9QvVrRo0sHLDdPC/qTzLPjAHtv8jKW 5uyll2vKc/+pPm6rc5zbWb/B9o75/sPJWjIPPrzbyMjYx8MW43jlLO/5nacuav64cDvz5JadW 8w2e8ic5Ml6Zjvj3p+tzzSmGFh/PP6ssveni0Nn2ZW4mEdXE4N1pp359U6LhUOJpTgj0VCLua g4EQC7Mpcn3wIAAA== X-Env-Sender: Adam.Thomson.Opensource@diasemi.com X-Msg-Ref: server-19.tower-302.messagelabs.com!1526486446!26404!1 X-Originating-IP: [94.185.165.51] X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.9.15; banners=-,-,- X-VirusChecked: Checked Received: (qmail 9181 invoked from network); 16 May 2018 16:00:47 -0000 Received: from mailrelay2.diasemi.com (HELO sw-ex-cashub01.diasemi.com) (94.185.165.51) by server-19.tower-302.messagelabs.com with AES128-SHA encrypted SMTP; 16 May 2018 16:00:47 -0000 Received: from swsrvapps-01.diasemi.com (10.20.28.141) by SW-EX-CASHUB01.diasemi.com (10.20.16.140) with Microsoft SMTP Server id 14.3.382.0; Wed, 16 May 2018 17:00:46 +0100 Received: by swsrvapps-01.diasemi.com (Postfix, from userid 22379) id 18FCF3FAD3; Wed, 16 May 2018 17:00:46 +0100 (BST) From: Adam Thomson Date: Wed, 16 May 2018 17:00:46 +0100 Subject: [PATCH] typec: tcpm: Provide of_node pointer as part of psy_cfg To: Heikki Krogerus , Guenter Roeck , Greg Kroah-Hartman CC: , , Message-ID: <20180516160046.18FCF3FAD3@swsrvapps-01.diasemi.com> MIME-Version: 1.0 X-KSE-AttachmentFiltering-Interceptor-Info: protection disabled X-KSE-ServerInfo: sw-ex-cashub01.diasemi.com, 9 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 16/05/2018 13:16:00 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For supply registration, provide of_node pointer of the port device, via the power_supply_config structure, to allow other psy drivers to add us as a supplier using the 'power-supplies' DT property. Signed-off-by: Adam Thomson --- drivers/usb/typec/tcpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/typec/tcpm.c b/drivers/usb/typec/tcpm.c index 72996cc..e7c0b95 100644 --- a/drivers/usb/typec/tcpm.c +++ b/drivers/usb/typec/tcpm.c @@ -4500,6 +4500,7 @@ static int devm_tcpm_psy_register(struct tcpm_port *port) char *psy_name; psy_cfg.drv_data = port; + psy_cfg.of_node = port->dev->of_node; psy_name = devm_kzalloc(port->dev, psy_name_len, GFP_KERNEL); if (!psy_name) return -ENOMEM;