linux/drivers/usb/typec
Heikki Krogerus 3370db3519 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 3e3b81965c ("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>
2019-06-03 10:55:38 +02:00
..
altmodes usb: typec: Add driver for NVIDIA Alt Modes 2019-04-25 11:04:56 +02:00
mux usb: typec: Registering real device entries for the muxes 2019-06-03 10:55:38 +02:00
tcpm usb: typec: fusb302: Revert "Resolve fixed power role contract setup" 2019-04-19 14:23:34 +02:00
ucsi usb: typec: ucsi: ccg: fix missing unlock on error in ccg_cmd_write_flash_row() 2019-04-29 14:25:12 +02:00
bus.c usb/typec: fix kernel-doc notation warning for typec_match_altmode 2018-09-05 14:36:53 +02:00
bus.h usb: typec: Registering real device entries for the muxes 2019-06-03 10:55:38 +02:00
class.c usb: typec: Registering real device entries for the muxes 2019-06-03 10:55:38 +02:00
Kconfig USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
Makefile usb: typec: Group all TCPCI/TCPM code together 2018-09-20 13:37:29 +02:00
mux.c usb: typec: Registering real device entries for the muxes 2019-06-03 10:55:38 +02:00
tps6598x.c usb: typec: tps6598x: handle block writes separately with plain-I2C adapters 2019-02-21 10:54:23 +01:00