linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Hans de Goede <hdegoede@redhat.com>, Li Jun <jun.li@nxp.com>
Cc: <linux-usb@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <support.opensource@diasemi.com>
Subject: [PATCH v2 3/3] usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling
Date: Mon, 10 Sep 2018 13:24:28 +0100	[thread overview]
Message-ID: <3005ce7723546a48dfad529ce396033a973664b3.1536580772.git.Adam.Thomson.Opensource@diasemi.com> (raw)
Message-ID: <20180910122428.MMEhPco0LQVmP8B5FcTF0p_3pTnXTluv7NN5ZL2Cs_o@z> (raw)
In-Reply-To: <cover.1536580772.git.Adam.Thomson.Opensource@diasemi.com>

This update populates the tcpc handle's fwnode pointer with the
child usb-connector node, if it exists, so that TCPM can perform
generic property handling to define the ports capabilities.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/usb/typec/fusb302/fusb302.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/typec/fusb302/fusb302.c b/drivers/usb/typec/fusb302/fusb302.c
index 82bed98..1b464c9 100644
--- a/drivers/usb/typec/fusb302/fusb302.c
+++ b/drivers/usb/typec/fusb302/fusb302.c
@@ -1736,6 +1736,9 @@ static int fusb302_probe(struct i2c_client *client,
 	chip->tcpc_dev.config = &chip->tcpc_config;
 	mutex_init(&chip->lock);
 
+	chip->tcpc_dev.fwnode =
+		device_get_named_child_node(dev, "connector");
+
 	if (!device_property_read_u32(dev, "fcs,operating-sink-microwatt", &v))
 		chip->tcpc_config.operating_snk_mw = v / 1000;
 
-- 
1.9.1


  parent reply	other threads:[~2018-09-10 12:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 12:19 [PATCH 0/3] *** SUBJECT HERE *** Adam Thomson
2018-09-10 12:19 ` [PATCH 1/3] dt-bindings: connector: Add support for USB-PD PPS APDOs to bindings Adam Thomson
2018-09-10 12:24   ` [PATCH v2 " Adam Thomson
2018-09-11 14:34   ` Heikki Krogerus
2018-09-11 14:44     ` Adam Thomson
2018-09-10 12:19 ` [PATCH 2/3] dt-bindings: usb: fusb302: Use usb-connector bindings for configuration Adam Thomson
2018-09-10 12:24   ` [PATCH v2 " Adam Thomson
2018-09-11 14:36   ` Heikki Krogerus
2018-09-10 12:19 ` Adam Thomson [this message]
2018-09-10 12:24   ` [PATCH v2 3/3] usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling Adam Thomson
2018-09-11 14:37   ` Heikki Krogerus
2018-09-10 12:21 ` [PATCH 0/3] *** SUBJECT HERE *** Adam Thomson
2018-09-10 12:24 ` [PATCH v2 0/3] dt-bindings: connector: Add USB-PD PPS APDO support Adam Thomson
  -- strict thread matches above, loose matches on Subject: below --
2018-08-21 12:28 [PATCH " Adam Thomson
2018-08-21 12:28 ` [PATCH 3/3] usb: typec: fusb302: Populate tcpc fwnode for TCPM property handling Adam Thomson
2018-08-21 13:22   ` Heikki Krogerus
2018-08-21 14:03   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3005ce7723546a48dfad529ce396033a973664b3.1536580772.git.Adam.Thomson.Opensource@diasemi.com \
    --to=adam.thomson.opensource@diasemi.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=jun.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=support.opensource@diasemi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).