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

Commit 9e001028 authored by Harry Yang's avatar Harry Yang
Browse files

extcon: add API to update array of mutually exclusive set



Add function extcon_set_mutually_exclusive to allow
updating array of mutually exclusive set.

Change-Id: I8259b987ab6a98f555fd5403d09d1506815ecfb7
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent 8f0939f8
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -865,6 +865,17 @@ int extcon_set_property_capability(struct extcon_dev *edev, unsigned int id,
}
EXPORT_SYMBOL_GPL(extcon_set_property_capability);

int extcon_set_mutually_exclusive(struct extcon_dev *edev,
				const u32 *exclusive)
{
	if (!edev)
		return -EINVAL;

	edev->mutually_exclusive = exclusive;
	return 0;
}
EXPORT_SYMBOL(extcon_set_mutually_exclusive);

/**
 * extcon_get_extcon_dev() - Get the extcon device instance from the name.
 * @extcon_name:	the extcon name provided with extcon_dev_register()
+8 −0
Original line number Diff line number Diff line
@@ -226,6 +226,14 @@ extern int extcon_get_property_capability(struct extcon_dev *edev,
extern int extcon_set_property_capability(struct extcon_dev *edev,
				unsigned int id, unsigned int prop);

/*
 * Following APIs set array of mutually exclusive.
 * The 'exclusive' argument indicates the array of mutually exclusive set
 * of cables that cannot be attached simultaneously.
 */
extern int extcon_set_mutually_exclusive(struct extcon_dev *edev,
				const u32 *exclusive);

/*
 * Following APIs register the notifier block in order to detect
 * the change of both state and property value for each external connector.