Loading drivers/mailbox/mailbox.c +10 −0 Original line number Diff line number Diff line Loading @@ -281,6 +281,16 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg) } EXPORT_SYMBOL_GPL(mbox_send_message); bool mbox_controller_is_idle(struct mbox_chan *chan) { if (!chan || !chan->cl || !chan->mbox->is_idle) return false; return chan->mbox->is_idle(chan->mbox); } EXPORT_SYMBOL(mbox_controller_is_idle); /** * mbox_request_channel - Request a mailbox channel. * @cl: Identity of the client requesting the channel. Loading include/linux/mailbox_client.h +1 −0 Original line number Diff line number Diff line Loading @@ -47,5 +47,6 @@ int mbox_send_message(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 */ bool mbox_controller_is_idle(struct mbox_chan *chan); /* atomic */ #endif /* __MAILBOX_CLIENT_H */ include/linux/mailbox_controller.h +2 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ struct mbox_chan_ops { * @txpoll_period: If 'txdone_poll' is in effect, the API polls for * last TX's status after these many millisecs * @of_xlate: Controller driver specific mapping of channel via DT * @is_idle: Is the controller idle? * @poll_hrt: API private. hrtimer used to poll for TXDONE on all * channels. * @node: API private. To hook into list of controllers. Loading @@ -81,6 +82,7 @@ struct mbox_controller { unsigned txpoll_period; struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox, const struct of_phandle_args *sp); bool (*is_idle)(struct mbox_controller *mbox); /* Internal to API */ struct hrtimer poll_hrt; struct list_head node; Loading Loading
drivers/mailbox/mailbox.c +10 −0 Original line number Diff line number Diff line Loading @@ -281,6 +281,16 @@ int mbox_send_message(struct mbox_chan *chan, void *mssg) } EXPORT_SYMBOL_GPL(mbox_send_message); bool mbox_controller_is_idle(struct mbox_chan *chan) { if (!chan || !chan->cl || !chan->mbox->is_idle) return false; return chan->mbox->is_idle(chan->mbox); } EXPORT_SYMBOL(mbox_controller_is_idle); /** * mbox_request_channel - Request a mailbox channel. * @cl: Identity of the client requesting the channel. Loading
include/linux/mailbox_client.h +1 −0 Original line number Diff line number Diff line Loading @@ -47,5 +47,6 @@ int mbox_send_message(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 */ bool mbox_controller_is_idle(struct mbox_chan *chan); /* atomic */ #endif /* __MAILBOX_CLIENT_H */
include/linux/mailbox_controller.h +2 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ struct mbox_chan_ops { * @txpoll_period: If 'txdone_poll' is in effect, the API polls for * last TX's status after these many millisecs * @of_xlate: Controller driver specific mapping of channel via DT * @is_idle: Is the controller idle? * @poll_hrt: API private. hrtimer used to poll for TXDONE on all * channels. * @node: API private. To hook into list of controllers. Loading @@ -81,6 +82,7 @@ struct mbox_controller { unsigned txpoll_period; struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox, const struct of_phandle_args *sp); bool (*is_idle)(struct mbox_controller *mbox); /* Internal to API */ struct hrtimer poll_hrt; struct list_head node; Loading