Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f57ed09 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge tag 'extcon-next-for-4.14' of...

Merge tag 'extcon-next-for-4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next

Chanwoo writes:

Update extcon for 4.14

Detailed description for this pull request:
1. Add new 'extcon-usbc-cros-ec.c' driver
- ChromeOS Embedded Controller extcon driver supports
  the detection of the Display Port (EXTCON_DISP_DP)
  through USB C-type and contol it.

2. Update extcon core
- Modify the description for both functions and structures
  in order to improve the readability and give the more correct
  guide about the role of functions because there are different
  explanation even if the same arguments.

- Keep the indentation with tab instead of space

- Remove the following deprecated extcon API. The deprecated API
  are exchanged on all of linux tree.
  : extcon_get_cable_state_() -> extcon_get_state()
  : extcon_set_cable_state_() -> extcon_set_state_sync()

3. Include the two immutable branch as following:
- ib-extcon-mfd-4.14 for the 'extcon-ubsc-cros-ec.c' driver
  because the patches of 'extcon-ubsc-cros-ec.c' touch the MFD directory.
- ib-extcon-usb-phy-4.14 for removing the deprecated extcon API
  because the usb/phy driver usese the deprecated extcon API.
  So, this immutable branch alters the extcon API and then
  remove them from extcon.

4. Fix minor issue of extcon driver
- Fix the MHL detection on extcon-max77693.c
- Convert to using %pOF instead of full_name on extcon.c
- Add 'const' kerywod for acpi_device_id on extcon-intel-int3496.c
parents 981b4677 4243c408
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
ChromeOS EC USB Type-C cable and accessories detection

On ChromeOS systems with USB Type C ports, the ChromeOS Embedded Controller is
able to detect the state of external accessories such as display adapters
or USB devices when said accessories are attached or detached.

The node for this device must be under a cros-ec node like google,cros-ec-spi
or google,cros-ec-i2c.

Required properties:
- compatible:		Should be "google,extcon-usbc-cros-ec".
- google,usb-port-id:	Specifies the USB port ID to use.

Example:
	cros-ec@0 {
		compatible = "google,cros-ec-i2c";

		...

		extcon {
			compatible = "google,extcon-usbc-cros-ec";
			google,usb-port-id = <0>;
		};
	}
+7 −0
Original line number Diff line number Diff line
@@ -150,4 +150,11 @@ config EXTCON_USB_GPIO
	  Say Y here to enable GPIO based USB cable detection extcon support.
	  Used typically if GPIO is used for USB ID pin detection.

config EXTCON_USBC_CROS_EC
	tristate "ChromeOS Embedded Controller EXTCON support"
	depends on MFD_CROS_EC
	help
	  Say Y here to enable USB Type C cable detection extcon support when
	  using Chrome OS EC based USB Type-C ports.

endif
+1 −0
Original line number Diff line number Diff line
@@ -20,3 +20,4 @@ obj-$(CONFIG_EXTCON_QCOM_SPMI_MISC) += extcon-qcom-spmi-misc.o
obj-$(CONFIG_EXTCON_RT8973A)	+= extcon-rt8973a.o
obj-$(CONFIG_EXTCON_SM5502)	+= extcon-sm5502.o
obj-$(CONFIG_EXTCON_USB_GPIO)	+= extcon-usb-gpio.o
obj-$(CONFIG_EXTCON_USBC_CROS_EC) += extcon-usbc-cros-ec.o
+24 −26
Original line number Diff line number Diff line
@@ -59,10 +59,9 @@ static void devm_extcon_dev_notifier_all_unreg(struct device *dev, void *res)

/**
 * devm_extcon_dev_allocate - Allocate managed extcon device
 * @dev:		device owning the extcon device being created
 * @supported_cable:	Array of supported extcon ending with EXTCON_NONE.
 *			If supported_cable is NULL, cable name related APIs
 *			are disabled.
 * @dev:		the device owning the extcon device being created
 * @supported_cable:	the array of the supported external connectors
 *			ending with EXTCON_NONE.
 *
 * This function manages automatically the memory of extcon device using device
 * resource management and simplify the control of freeing the memory of extcon
@@ -97,8 +96,8 @@ EXPORT_SYMBOL_GPL(devm_extcon_dev_allocate);

/**
 * devm_extcon_dev_free() - Resource-managed extcon_dev_unregister()
 * @dev:	device the extcon belongs to
 * @edev:	the extcon device to unregister
 * @dev:	the device owning the extcon device being created
 * @edev:	the extcon device to be freed
 *
 * Free the memory that is allocated with devm_extcon_dev_allocate()
 * function.
@@ -112,10 +111,9 @@ EXPORT_SYMBOL_GPL(devm_extcon_dev_free);

/**
 * devm_extcon_dev_register() - Resource-managed extcon_dev_register()
 * @dev:	device to allocate extcon device
 * @edev:	the new extcon device to register
 * @dev:	the device owning the extcon device being created
 * @edev:	the extcon device to be registered
 *
 * Managed extcon_dev_register() function. If extcon device is attached with
 * this function, that extcon device is automatically unregistered on driver
 * detach. Internally this function calls extcon_dev_register() function.
 * To get more information, refer that function.
@@ -149,8 +147,8 @@ EXPORT_SYMBOL_GPL(devm_extcon_dev_register);

/**
 * devm_extcon_dev_unregister() - Resource-managed extcon_dev_unregister()
 * @dev:	device the extcon belongs to
 * @edev:	the extcon device to unregister
 * @dev:	the device owning the extcon device being created
 * @edev:	the extcon device to unregistered
 *
 * Unregister extcon device that is registered with devm_extcon_dev_register()
 * function.
@@ -164,10 +162,10 @@ EXPORT_SYMBOL_GPL(devm_extcon_dev_unregister);

/**
 * devm_extcon_register_notifier() - Resource-managed extcon_register_notifier()
 * @dev:	device to allocate extcon device
 * @edev:	the extcon device that has the external connecotr.
 * @id:		the unique id of each external connector in extcon enumeration.
 * @nb:		a notifier block to be registered.
 * @dev:	the device owning the extcon device being created
 * @edev:	the extcon device
 * @id:		the unique id among the extcon enumeration
 * @nb:		a notifier block to be registered
 *
 * This function manages automatically the notifier of extcon device using
 * device resource management and simplify the control of unregistering
@@ -208,10 +206,10 @@ EXPORT_SYMBOL(devm_extcon_register_notifier);
/**
 * devm_extcon_unregister_notifier()
			- Resource-managed extcon_unregister_notifier()
 * @dev:	device to allocate extcon device
 * @edev:	the extcon device that has the external connecotr.
 * @id:		the unique id of each external connector in extcon enumeration.
 * @nb:		a notifier block to be registered.
 * @dev:	the device owning the extcon device being created
 * @edev:	the extcon device
 * @id:		the unique id among the extcon enumeration
 * @nb:		a notifier block to be registered
 */
void devm_extcon_unregister_notifier(struct device *dev,
				struct extcon_dev *edev, unsigned int id,
@@ -225,9 +223,9 @@ EXPORT_SYMBOL(devm_extcon_unregister_notifier);
/**
 * devm_extcon_register_notifier_all()
 *		- Resource-managed extcon_register_notifier_all()
 * @dev:	device to allocate extcon device
 * @edev:	the extcon device that has the external connecotr.
 * @nb:		a notifier block to be registered.
 * @dev:	the device owning the extcon device being created
 * @edev:	the extcon device
 * @nb:		a notifier block to be registered
 *
 * This function manages automatically the notifier of extcon device using
 * device resource management and simplify the control of unregistering
@@ -263,9 +261,9 @@ EXPORT_SYMBOL(devm_extcon_register_notifier_all);
/**
 * devm_extcon_unregister_notifier_all()
 *		- Resource-managed extcon_unregister_notifier_all()
 * @dev:	device to allocate extcon device
 * @edev:	the extcon device that has the external connecotr.
 * @nb:		a notifier block to be registered.
 * @dev:	the device owning the extcon device being created
 * @edev:	the extcon device
 * @nb:		a notifier block to be registered
 */
void devm_extcon_unregister_notifier_all(struct device *dev,
				struct extcon_dev *edev,
+1 −1
Original line number Diff line number Diff line
@@ -171,7 +171,7 @@ static int int3496_remove(struct platform_device *pdev)
	return 0;
}

static struct acpi_device_id int3496_acpi_match[] = {
static const struct acpi_device_id int3496_acpi_match[] = {
	{ "INT3496" },
	{ }
};
Loading