]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: mailbox-test: add support for fasync/poll
authorSudeep Holla <sudeep.holla@arm.com>
Tue, 29 Nov 2016 14:37:04 +0000 (14:37 +0000)
committerJassi Brar <jaswinder.singh@linaro.org>
Mon, 19 Dec 2016 14:40:23 +0000 (20:10 +0530)
commitf6e750a6035e7642f40021e868a645b088e1e245
tree76e12c0aa8aa623afdee0cc74d78c4696489edb5
parent42c5c6c5f5989c1082ea8493dfdffaf73113d48b
mailbox: mailbox-test: add support for fasync/poll

Currently the read operation on the message debug file returns error if
there's no data ready to be read. It expects the userspace to retry if
it fails. Since the mailbox response could be asynchronous, it would be
good to add support to block the read until the data is available.

We can also implement poll file operations so that the userspace can
wait to become ready to perform any I/O.

This patch implements the poll and fasync file operation callback for
the test mailbox device.

Cc: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/mailbox-test.c