diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-07-31 15:42:18 +0200 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-08-26 10:05:45 +0200 |
| commit | d51fc9d4cd6eb18ac82913d83ecf7bd8c85f71ee (patch) | |
| tree | f5059168ba3f2dfc68e13dc22b9cba51cf29948f /drivers/gpu | |
| parent | a39ac4651e3b9d2ca78b6d3dc2a81a6bd25fa616 (diff) | |
| download | linux-d51fc9d4cd6eb18ac82913d83ecf7bd8c85f71ee.tar.gz linux-d51fc9d4cd6eb18ac82913d83ecf7bd8c85f71ee.zip | |
power: sequencing: rename pwrseq_power_on/off() to pwrseq_enable/disable()
The way power sequencing works means that a call to pwrseq_power_on()
does not necessarily result in the pwrseq target being powered-on at
that time: it may have already been powered on before. Similarly: a call
to pwrseq_power_off() does not have to result in an actual powering off
of resources: there may still be other users that requested a power-on
before.
We will also introduce the concept of "non-controllable" pwrseq targets
soon which further increases the disconnect between the naming
convention and the actual semantics.
What consumers of pwrseq descriptors actually do is: they *vote* for a
powering on of a given target or retract that vote. These operations
could be called get/put in line with runtime PM but this could become
confusing since we already provide pwrseq_get/put() for a different
purpose. pwrseq_vote_on/off() also have been rejected as unusual in
the tree.
Change the name of the two functions to pwrseq_enable/disable() which
better reflects their purpose and semantics and also mirrors other
enable-counted resources like regulators and clocks. No functional change
intended.
If at any point users need to know *when* the exact power event happens,
we can provide that information in the form of a notifier.
Acked-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Acked-by: Alessio Belle <alessio.belle@imgtec.com> # imagination
Link: https://patch.msgid.link/20260731-pwrseq-vote-rename-v3-1-44e60b8be053@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/imagination/pvr_power.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/imagination/pvr_power.c b/drivers/gpu/drm/imagination/pvr_power.c index a71d5b35601e..eb4b6ecdf4f4 100644 --- a/drivers/gpu/drm/imagination/pvr_power.c +++ b/drivers/gpu/drm/imagination/pvr_power.c @@ -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 = { |
