mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 13:23:02 -04:00
Merge tag 'pwrseq-updates-for-v7.3-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull another power sequencing update from Bartosz Golaszewski: "A single tree-wide rename of two of the public functions to better reflect their actual semantics: - rename pwrseq_power_on/off() to pwrseq_enable/disable() tree-wide" * tag 'pwrseq-updates-for-v7.3-rc1-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: power: sequencing: rename pwrseq_power_on/off() to pwrseq_enable/disable()
This commit is contained in:
@@ -50,9 +50,9 @@ Consumer interface
|
||||
The consumer API is aimed to be as simple as possible. The driver interested in
|
||||
getting a descriptor from the power sequencer should call pwrseq_get() and
|
||||
specify the name of the target it wants to reach in the sequence after calling
|
||||
pwrseq_power_up(). The descriptor can be released by calling pwrseq_put() and
|
||||
pwrseq_enable(). The descriptor can be released by calling pwrseq_put() and
|
||||
the consumer can request the powering down of its target with
|
||||
pwrseq_power_off(). Note that there is no guarantee that pwrseq_power_off()
|
||||
pwrseq_disable(). Note that there is no guarantee that pwrseq_disable()
|
||||
will have any effect as there may be multiple users of the underlying resources
|
||||
who may keep them active.
|
||||
|
||||
|
||||
@@ -1872,7 +1872,7 @@ static int nxp_serdev_probe(struct serdev_device *serdev)
|
||||
"failed to get pwrseq\n");
|
||||
|
||||
nxpdev->pwrseq = pwrseq;
|
||||
err = pwrseq_power_on(pwrseq);
|
||||
err = pwrseq_enable(pwrseq);
|
||||
if (err)
|
||||
goto err_pwrseq_put;
|
||||
}
|
||||
|
||||
@@ -2259,7 +2259,7 @@ static void qca_power_off(struct hci_uart *hu)
|
||||
}
|
||||
|
||||
if (power && power->pwrseq) {
|
||||
pwrseq_power_off(power->pwrseq);
|
||||
pwrseq_disable(power->pwrseq);
|
||||
set_bit(QCA_BT_OFF, &qca->flags);
|
||||
return;
|
||||
}
|
||||
@@ -2319,7 +2319,7 @@ static int qca_regulator_enable(struct qca_serdev *qcadev)
|
||||
int ret;
|
||||
|
||||
if (power->pwrseq)
|
||||
return pwrseq_power_on(power->pwrseq);
|
||||
return pwrseq_enable(power->pwrseq);
|
||||
|
||||
/* Already enabled */
|
||||
if (power->vregs_on)
|
||||
|
||||
@@ -352,12 +352,12 @@ static int pvr_power_init_pwrseq(struct pvr_device *pvr_dev)
|
||||
|
||||
static int pvr_power_on_sequence_pwrseq(struct pvr_device *pvr_dev)
|
||||
{
|
||||
return pwrseq_power_on(pvr_dev->pwrseq);
|
||||
return pwrseq_enable(pvr_dev->pwrseq);
|
||||
}
|
||||
|
||||
static int pvr_power_off_sequence_pwrseq(struct pvr_device *pvr_dev)
|
||||
{
|
||||
return pwrseq_power_off(pvr_dev->pwrseq);
|
||||
return pwrseq_disable(pvr_dev->pwrseq);
|
||||
}
|
||||
|
||||
const struct pvr_power_sequence_ops pvr_power_sequence_ops_pwrseq = {
|
||||
|
||||
@@ -1026,7 +1026,7 @@ static int ath10k_hw_power_on(struct ath10k *ar)
|
||||
|
||||
ath10k_dbg(ar, ATH10K_DBG_SNOC, "soc power on\n");
|
||||
|
||||
ret = pwrseq_power_on(ar_snoc->pwrseq);
|
||||
ret = pwrseq_enable(ar_snoc->pwrseq);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -1043,7 +1043,7 @@ static int ath10k_hw_power_on(struct ath10k *ar)
|
||||
vreg_off:
|
||||
regulator_bulk_disable(ar_snoc->num_vregs, ar_snoc->vregs);
|
||||
pwrseq_off:
|
||||
pwrseq_power_off(ar_snoc->pwrseq);
|
||||
pwrseq_disable(ar_snoc->pwrseq);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -1061,7 +1061,7 @@ static int ath10k_hw_power_off(struct ath10k *ar)
|
||||
ret_vreg = regulator_bulk_disable(ar_snoc->num_vregs, ar_snoc->vregs);
|
||||
|
||||
if (ar_snoc->pwrseq)
|
||||
ret_seq = pwrseq_power_off(ar_snoc->pwrseq);
|
||||
ret_seq = pwrseq_disable(ar_snoc->pwrseq);
|
||||
|
||||
return ret_vreg ? : ret_seq;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ static int slot_pwrctrl_power_on(struct pci_pwrctrl *pwrctrl)
|
||||
int ret;
|
||||
|
||||
if (slot->pwrseq) {
|
||||
pwrseq_power_on(slot->pwrseq);
|
||||
pwrseq_enable(slot->pwrseq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ static int slot_pwrctrl_power_off(struct pci_pwrctrl *pwrctrl)
|
||||
struct slot_pwrctrl, pwrctrl);
|
||||
|
||||
if (slot->pwrseq) {
|
||||
pwrseq_power_off(slot->pwrseq);
|
||||
pwrseq_disable(slot->pwrseq);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ static int pwrseq_pwrctrl_power_on(struct pci_pwrctrl *pwrctrl)
|
||||
struct pwrseq_pwrctrl *pwrseq = container_of(pwrctrl,
|
||||
struct pwrseq_pwrctrl, pwrctrl);
|
||||
|
||||
return pwrseq_power_on(pwrseq->pwrseq);
|
||||
return pwrseq_enable(pwrseq->pwrseq);
|
||||
}
|
||||
|
||||
static int pwrseq_pwrctrl_power_off(struct pci_pwrctrl *pwrctrl)
|
||||
@@ -64,7 +64,7 @@ static int pwrseq_pwrctrl_power_off(struct pci_pwrctrl *pwrctrl)
|
||||
struct pwrseq_pwrctrl *pwrseq = container_of(pwrctrl,
|
||||
struct pwrseq_pwrctrl, pwrctrl);
|
||||
|
||||
return pwrseq_power_off(pwrseq->pwrseq);
|
||||
return pwrseq_disable(pwrseq->pwrseq);
|
||||
}
|
||||
|
||||
static int pwrseq_pwrctrl_probe(struct platform_device *pdev)
|
||||
|
||||
@@ -708,7 +708,7 @@ void pwrseq_put(struct pwrseq_desc *desc)
|
||||
pwrseq = desc->pwrseq;
|
||||
|
||||
if (desc->powered_on)
|
||||
pwrseq_power_off(desc);
|
||||
pwrseq_disable(desc);
|
||||
|
||||
kfree(desc);
|
||||
module_put(pwrseq->owner);
|
||||
@@ -874,7 +874,7 @@ static int pwrseq_unit_disable(struct pwrseq_device *pwrseq,
|
||||
}
|
||||
|
||||
/**
|
||||
* pwrseq_power_on() - Issue a power-on request on behalf of the consumer
|
||||
* pwrseq_enable() - Issue a power-on request on behalf of the consumer
|
||||
* device.
|
||||
* @desc: Descriptor referencing the power sequencer.
|
||||
*
|
||||
@@ -887,7 +887,7 @@ static int pwrseq_unit_disable(struct pwrseq_device *pwrseq,
|
||||
* Returns:
|
||||
* 0 on success, negative error number on failure.
|
||||
*/
|
||||
int pwrseq_power_on(struct pwrseq_desc *desc)
|
||||
int pwrseq_enable(struct pwrseq_desc *desc)
|
||||
{
|
||||
struct pwrseq_device *pwrseq;
|
||||
struct pwrseq_target *target;
|
||||
@@ -925,14 +925,14 @@ int pwrseq_power_on(struct pwrseq_desc *desc)
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pwrseq_power_on);
|
||||
EXPORT_SYMBOL_GPL(pwrseq_enable);
|
||||
|
||||
/**
|
||||
* pwrseq_power_off() - Issue a power-off request on behalf of the consumer
|
||||
* pwrseq_disable() - Issue a power-off request on behalf of the consumer
|
||||
* device.
|
||||
* @desc: Descriptor referencing the power sequencer.
|
||||
*
|
||||
* This undoes the effects of pwrseq_power_on(). It issues a power-off request
|
||||
* This undoes the effects of pwrseq_enable(). It issues a power-off request
|
||||
* on behalf of the consumer and when the last remaining user does so, the
|
||||
* power-down sequence will be started. If one is in progress, the function
|
||||
* will block until it's complete and then return.
|
||||
@@ -940,7 +940,7 @@ EXPORT_SYMBOL_GPL(pwrseq_power_on);
|
||||
* Returns:
|
||||
* 0 on success, negative error number on failure.
|
||||
*/
|
||||
int pwrseq_power_off(struct pwrseq_desc *desc)
|
||||
int pwrseq_disable(struct pwrseq_desc *desc)
|
||||
{
|
||||
struct pwrseq_device *pwrseq;
|
||||
struct pwrseq_unit *unit;
|
||||
@@ -966,7 +966,7 @@ int pwrseq_power_off(struct pwrseq_desc *desc)
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pwrseq_power_off);
|
||||
EXPORT_SYMBOL_GPL(pwrseq_disable);
|
||||
|
||||
/**
|
||||
* pwrseq_to_device() - Get the pwrseq device pointer from a descriptor.
|
||||
|
||||
@@ -20,8 +20,8 @@ void pwrseq_put(struct pwrseq_desc *desc);
|
||||
struct pwrseq_desc * __must_check
|
||||
devm_pwrseq_get(struct device *dev, const char *target);
|
||||
|
||||
int pwrseq_power_on(struct pwrseq_desc *desc);
|
||||
int pwrseq_power_off(struct pwrseq_desc *desc);
|
||||
int pwrseq_enable(struct pwrseq_desc *desc);
|
||||
int pwrseq_disable(struct pwrseq_desc *desc);
|
||||
|
||||
struct device *pwrseq_to_device(struct pwrseq_desc *desc);
|
||||
|
||||
@@ -43,12 +43,12 @@ devm_pwrseq_get(struct device *dev, const char *target)
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline int pwrseq_power_on(struct pwrseq_desc *desc)
|
||||
static inline int pwrseq_enable(struct pwrseq_desc *desc)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
static inline int pwrseq_power_off(struct pwrseq_desc *desc)
|
||||
static inline int pwrseq_disable(struct pwrseq_desc *desc)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user