RE: [PATCH v4 04/13] usb: typec: add fwnode to tcpc
From: Jun Li <hidden>
Date: 2018-03-31 03:17:32
Also in:
linux-usb
Hi
-----Original Message----- From: Heikki Krogerus [mailto:heikki.krogerus@linux.intel.com] Sent: 2018年3月29日 20:58 To: Jun Li <redacted> Cc: robh+dt@kernel.org; gregkh@linuxfoundation.org; linux@roeck-us.net; a.hajda@samsung.com; shufan_lee@richtek.com; Peter Chen [off-list ref]; devicetree@vger.kernel.org; linux-usb@vger.kernel.org; dl-linux-imx [off-list ref]; devel@driverdev.osuosl.org Subject: Re: [PATCH v4 04/13] usb: typec: add fwnode to tcpc Hi, On Thu, Mar 29, 2018 at 12:06:09AM +0800, Li Jun wrote:quoted
Add fwnode handle to get the fwnode so we can get typec configs it contains. Suggested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Li Jun <redacted> --- drivers/staging/typec/tcpci.c | 14 +++++++------- drivers/usb/typec/tcpm.c | 1 + include/linux/usb/tcpm.h | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-)diff --git a/drivers/staging/typec/tcpci.cb/drivers/staging/typec/tcpci.c index ed76327..4f7ad10 100644--- a/drivers/staging/typec/tcpci.c +++ b/drivers/staging/typec/tcpci.c@@ -10,6 +10,7 @@ #include <linux/module.h> #include <linux/i2c.h> #include <linux/interrupt.h> +#include <linux/property.h> #include <linux/regmap.h> #include <linux/usb/pd.h> #include <linux/usb/tcpm.h>@@ -463,17 +464,16 @@ static const struct regmap_configtcpci_regmap_config = {quoted
.max_register = 0x7F, /* 0x80 .. 0xFF are vendor defined */ }; -static const struct tcpc_config tcpci_tcpc_config = { - .type = TYPEC_PORT_DFP, - .default_role = TYPEC_SINK, -}; - static int tcpci_parse_config(struct tcpci *tcpci) { tcpci->controls_vbus = true; /* XXX */ - /* TODO: Populate struct tcpc_config from ACPI/device-tree */ - tcpci->tcpc.config = &tcpci_tcpc_config;That will break bisectablitity. tcpm.c is still accessing the config at this point.
Yes, good catch.
Just leave those untouched in here, and clean-up in separate patch that comes after the patch that prepares tcpm.c.
I will change in next version, thanks. Li Jun
Thanks, -- heikki
_______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel