Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d9bd811 authored by Lina Iyer's avatar Lina Iyer
Browse files

drivers: mailbox: rename mbox_send_controller_data



Rename mbox_send_controller_data to mbox_write_controller_data, since
the data is never actually sent, but only written to the controller.

Change-Id: I450802ea6e7dc870c85ab8d5473985c7882105e6
Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
parent ac6e850d
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -293,8 +293,9 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg)
EXPORT_SYMBOL_GPL(mbox_send_message);

/**
 * mbox_send_controller_data-	For client to submit a message to be
 *				sent only to the controller.
 * mbox_write_controller_data -	For client to submit a message to be
 *				written to the controller but not sent to
 *				the remote processor.
 * @chan: Mailbox channel assigned to this client.
 * @mssg: Client specific message typecasted.
 *
@@ -305,7 +306,7 @@ EXPORT_SYMBOL_GPL(mbox_send_message);
 *	or transmission over chan (blocking mode).
 *	Negative value denotes failure.
 */
int mbox_send_controller_data(struct mbox_chan *chan, void *mssg)
int mbox_write_controller_data(struct mbox_chan *chan, void *mssg)
{
	unsigned long flags;
	int err;
@@ -314,12 +315,12 @@ int mbox_send_controller_data(struct mbox_chan *chan, void *mssg)
		return -EINVAL;

	spin_lock_irqsave(&chan->lock, flags);
	err = chan->mbox->ops->send_controller_data(chan, mssg);
	err = chan->mbox->ops->write_controller_data(chan, mssg);
	spin_unlock_irqrestore(&chan->lock, flags);

	return err;
}
EXPORT_SYMBOL(mbox_send_controller_data);
EXPORT_SYMBOL(mbox_write_controller_data);

bool mbox_controller_is_idle(struct mbox_chan *chan)
{
+1 −1
Original line number Diff line number Diff line
@@ -1075,7 +1075,7 @@ static void chan_shutdown(struct mbox_chan *chan)

static const struct mbox_chan_ops mbox_ops = {
	.send_data = chan_tcs_write,
	.send_controller_data = chan_tcs_ctrl_write,
	.write_controller_data = chan_tcs_ctrl_write,
	.startup = chan_init,
	.shutdown = chan_shutdown,
};
+4 −4
Original line number Diff line number Diff line
@@ -563,7 +563,7 @@ static int flush_passthru(struct rpmh_client *rc)
	spin_lock_irqsave(&rpm->lock, flags);
	for (i = 0; rpm->passthru_cache[i]; i++) {
		rpm_msg = rpm->passthru_cache[i];
		ret = mbox_send_controller_data(rc->chan, &rpm_msg->msg);
		ret = mbox_write_controller_data(rc->chan, &rpm_msg->msg);
		if (ret)
			goto fail;
	}
@@ -762,7 +762,7 @@ int rpmh_write_control(struct rpmh_client *rc, struct tcs_cmd *cmd, int n)
	rpm_msg.msg.is_control = true;
	rpm_msg.msg.is_complete = false;

	return mbox_send_controller_data(rc->chan, &rpm_msg.msg);
	return mbox_write_controller_data(rc->chan, &rpm_msg.msg);
}
EXPORT_SYMBOL(rpmh_write_control);

@@ -797,7 +797,7 @@ int rpmh_invalidate(struct rpmh_client *rc)
	rpm->dirty = true;
	spin_unlock_irqrestore(&rpm->lock, flags);

	return mbox_send_controller_data(rc->chan, &rpm_msg.msg);
	return mbox_write_controller_data(rc->chan, &rpm_msg.msg);
}
EXPORT_SYMBOL(rpmh_invalidate);

@@ -886,7 +886,7 @@ int send_single(struct rpmh_client *rc, enum rpmh_state state, u32 addr,
	rpm_msg.msg.num_payload = 1;
	rpm_msg.msg.is_complete = false;

	return mbox_send_controller_data(rc->chan, &rpm_msg.msg);
	return mbox_write_controller_data(rc->chan, &rpm_msg.msg);
}

/**
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ struct mbox_chan *mbox_request_channel_byname(struct mbox_client *cl,
					      const char *name);
struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index);
int mbox_send_message(struct mbox_chan *chan, void *mssg);
int mbox_send_controller_data(struct mbox_chan *chan, void *mssg);
int mbox_write_controller_data(struct mbox_chan *chan, void *mssg);
void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */
bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */
void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
+3 −3
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ struct mbox_chan;
 *		transmission of data is reported by the controller via
 *		mbox_chan_txdone (if it has some TX ACK irq). It must not
 *		sleep.
 * @send_controller_data:
 *		Send data for the controller driver. This could be data to
 * @write_controller_data:
 *		Write data for the controller driver. This could be data to
 *		configure the controller or data that may be cached in the
 *		controller and not transmitted immediately. There is no ACK
 *		for this request and the request is not buffered in the
@@ -54,7 +54,7 @@ struct mbox_chan;
 */
struct mbox_chan_ops {
	int (*send_data)(struct mbox_chan *chan, void *data);
	int (*send_controller_data)(struct mbox_chan *chan, void *data);
	int (*write_controller_data)(struct mbox_chan *chan, void *data);
	int (*startup)(struct mbox_chan *chan);
	void (*shutdown)(struct mbox_chan *chan);
	bool (*last_tx_done)(struct mbox_chan *chan);