Lines Matching defs:state
43 * @state: rpmh clock requested state
44 * @aggr_state: rpmh clock aggregated state
45 * @last_sent_aggr_state: rpmh clock last aggr state sent to RPMh
46 * @valid_state_mask: mask to determine the state of the rpmh clock
57 u32 state;
140 static inline bool has_state_changed(struct clk_rpmh *c, u32 state)
142 return (c->last_sent_aggr_state & BIT(state))
143 != (c->aggr_state & BIT(state));
146 static int clk_rpmh_send(struct clk_rpmh *c, enum rpmh_state state,
150 return rpmh_write(c->dev, state, cmd, 1);
152 return rpmh_write_async(c->dev, state, cmd, 1);
159 enum rpmh_state state = RPMH_SLEEP_STATE;
167 for (; state <= RPMH_ACTIVE_ONLY_STATE; state++) {
168 if (has_state_changed(c, state)) {
169 if (cmd_state & BIT(state))
172 wait = cmd_state && state == RPMH_ACTIVE_ONLY_STATE;
173 ret = clk_rpmh_send(c, state, &cmd, wait);
175 dev_err(c->dev, "set %s state of %s failed: (%d)\n",
176 !state ? "sleep" :
177 state == RPMH_WAKE_ONLY_STATE ?
191 * Update state and aggregate state values based on enable value.
199 if (enable == c->state)
202 c->state = enable ? c->valid_state_mask : 0;
203 c->aggr_state = c->state | c->peer->state;
211 c->state = 0;
213 c->state = c->valid_state_mask;
279 dev_err(c->dev, "set active state of %s failed: (%d)\n",