summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2019-05-31 17:15:41 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2019-06-03 10:55:38 +0200
commit3370db35193b241ba5836a66df6ec1a559108389 (patch)
tree2b71ccf9d778bb28aa1930a1a00fd05307754760 /drivers/platform
parentfde777791eb83f6c5845b81af89de6be60a2b2ce (diff)
downloadlinux-3370db35193b241ba5836a66df6ec1a559108389.tar.gz
linux-3370db35193b241ba5836a66df6ec1a559108389.tar.bz2
linux-3370db35193b241ba5836a66df6ec1a559108389.zip
usb: typec: Registering real device entries for the muxes
Registering real device entries (struct device) for the mode muxes as well as for the orientation switches. The Type-C mux code was deliberately attempting to avoid creation of separate device entries for the orientation switch and the mode switch (alternate modes) because they are not physical devices. They are functions of a single physical multiplexer/demultiplexer switch device. Unfortunately because of the dependency we still have on the underlying mux device driver, we had to put in hacks like the one in the commit 3e3b81965cbf ("usb: typec: mux: Take care of driver module reference counting") to make sure the driver does not disappear from underneath us. Even with those hacks we were still left with a potential NUll pointer dereference scenario, so just creating the device entries, and letting the core take care of the dependencies. No more hacks needed. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel_cht_int33fe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c
index 6fa3cced6f8e..657b8d61554c 100644
--- a/drivers/platform/x86/intel_cht_int33fe.c
+++ b/drivers/platform/x86/intel_cht_int33fe.c
@@ -173,10 +173,10 @@ static int cht_int33fe_probe(struct platform_device *pdev)
}
data->connections[0].endpoint[0] = "port0";
- data->connections[0].endpoint[1] = "i2c-pi3usb30532";
+ data->connections[0].endpoint[1] = "i2c-pi3usb30532-switch";
data->connections[0].id = "orientation-switch";
data->connections[1].endpoint[0] = "port0";
- data->connections[1].endpoint[1] = "i2c-pi3usb30532";
+ data->connections[1].endpoint[1] = "i2c-pi3usb30532-mux";
data->connections[1].id = "mode-switch";
data->connections[2].endpoint[0] = "i2c-fusb302";
data->connections[2].endpoint[1] = "intel_xhci_usb_sw-role-switch";