Skip to content

Commit

Permalink
Merge tag 'pmdomain-v6.10-rc2' of git://git.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/ulfh/linux-pm

Pull pmdomain fix from Ulf Hansson:

 - qcom: Skip retention level for rpmhpd's

* tag 'pmdomain-v6.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  pmdomain: qcom: rpmhpd: Skip retention level for Power Domains
  • Loading branch information
Linus Torvalds committed Jul 12, 2024
2 parents 01ec3bb + ddab91f commit ac6a9e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/pmdomain/qcom/rpmhpd.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* @addr: Resource address as looped up using resource name from
* cmd-db
* @state_synced: Indicator that sync_state has been invoked for the rpmhpd resource
* @skip_retention_level: Indicate that retention level should not be used for the power domain
*/
struct rpmhpd {
struct device *dev;
Expand All @@ -56,6 +57,7 @@ struct rpmhpd {
const char *res_name;
u32 addr;
bool state_synced;
bool skip_retention_level;
};

struct rpmhpd_desc {
Expand Down Expand Up @@ -173,13 +175,15 @@ static struct rpmhpd mxc = {
.pd = { .name = "mxc", },
.peer = &mxc_ao,
.res_name = "mxc.lvl",
.skip_retention_level = true,
};

static struct rpmhpd mxc_ao = {
.pd = { .name = "mxc_ao", },
.active_only = true,
.peer = &mxc,
.res_name = "mxc.lvl",
.skip_retention_level = true,
};

static struct rpmhpd nsp = {
Expand Down Expand Up @@ -819,6 +823,9 @@ static int rpmhpd_update_level_mapping(struct rpmhpd *rpmhpd)
return -EINVAL;

for (i = 0; i < rpmhpd->level_count; i++) {
if (rpmhpd->skip_retention_level && buf[i] == RPMH_REGULATOR_LEVEL_RETENTION)
continue;

rpmhpd->level[i] = buf[i];

/* Remember the first corner with non-zero level */
Expand Down

0 comments on commit ac6a9e0

Please sign in to comment.