aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-14 15:04:49 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-14 15:04:49 -0400
commit3860cae64c0a2c3faeca5de92d5f8e37fddd340c (patch)
tree8b6a902ee2e406c4ccfcd2be716e4b518c34faa0 /drivers/base
parent010b0e708e08727d38b82accb21832b63fe2c250 (diff)
parentd22d59362b7b2c749245f1269d447011c76ca41d (diff)
Merge tag 'regulator-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Pull regulator updates from Mark Brown: "The biggest set of changes in here is the addition of the Qualcomm RPMH driver. As well as the regualtor driver itself being quite large due to the usual involved Qualcomm regulator stuff there's also some code shared with the arm-soc tree, a bus driver required to communicate with the hardware that actually winds up being much larger than the regulator driver itself and a LLCC driver that was part of the same signed tag used with the arm-soc tree. Other than that it's a fairly standard and quiet release, highlights include: - Addition of device links from regulator consumers to their regulators, helping the core avoid dependency issues during suspend. - Support for the entertainingly innovative suspend implementation in the BD9571MWV. - Support for switch regulators on the PFUZE100, this required two goes due to backwards compatibility issues with old DTs that were discovered. - Support for Freescale PFUZE3001 and SocioNext UniPhier. - The aforementioned Qualcomm RPMH driver together with the driver changes required to support it" * tag 'regulator-v4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (52 commits) regulator: add QCOM RPMh regulator driver regulator: dt-bindings: add QCOM RPMh regulator bindings regulator: samsung: Add SPDX license identifiers regulator: maxim: Add SPDX license identifiers regulator: bd71837: adobt MFD changes to regulator driver regulator: tps65217: Fix NULL pointer dereference on probe regulator: Add support for CPCAP regulators on Motorola Xoom devices. regulator: Add sw2_sw4 voltage table to cpcap regulator. regulator: bd9571mwv: Make symbol 'dev_attr_backup_mode' static regulator: pfuze100: add support to en-/disable switch regulators regulator: pfuze100: add optional disable switch-regulators binding soc: qcom: rmtfs-mem: fix memleak in probe error paths soc: qcom: llc-slice: Add missing MODULE_LICENSE() drivers: qcom: rpmh: fix unwanted error check for get_tcs_of_type() drivers: qcom: rpmh-rsc: fix the loop index check in get_req_from_tcs firmware: qcom: scm: add a dummy qcom_scm_assign_mem() drivers: qcom: rpmh-rsc: Check cmd_db_ready() to help children drivers: qcom: rpmh-rsc: allow active requests from wake TCS drivers: qcom: rpmh: add support for batch RPMH request drivers: qcom: rpmh: allow requests to be sent asynchronously ...
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index df3e1a44707a..2ab316d85651 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -372,6 +372,36 @@ void device_link_del(struct device_link *link)
372} 372}
373EXPORT_SYMBOL_GPL(device_link_del); 373EXPORT_SYMBOL_GPL(device_link_del);
374 374
375/**
376 * device_link_remove - remove a link between two devices.
377 * @consumer: Consumer end of the link.
378 * @supplier: Supplier end of the link.
379 *
380 * The caller must ensure proper synchronization of this function with runtime
381 * PM.
382 */
383void device_link_remove(void *consumer, struct device *supplier)
384{
385 struct device_link *link;
386
387 if (WARN_ON(consumer == supplier))
388 return;
389
390 device_links_write_lock();
391 device_pm_lock();
392
393 list_for_each_entry(link, &supplier->links.consumers, s_node) {
394 if (link->consumer == consumer) {
395 kref_put(&link->kref, __device_link_del);
396 break;
397 }
398 }
399
400 device_pm_unlock();
401 device_links_write_unlock();
402}
403EXPORT_SYMBOL_GPL(device_link_remove);
404
375static void device_links_missing_supplier(struct device *dev) 405static void device_links_missing_supplier(struct device *dev)
376{ 406{
377 struct device_link *link; 407 struct device_link *link;