summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJens Taprogge <jens.taprogge@taprogge.org>2012-09-11 11:34:55 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-11 19:16:35 (GMT)
commit7b6ab33c28980ae26de09654a0d5db6080c76921 (patch)
tree8f36c23a20a0f967db61d7c9d666d79dba47b25a /drivers
parent28086cbdadc6ef7fc3600b8478e5d5b9bfe483b8 (diff)
downloadlinux-7b6ab33c28980ae26de09654a0d5db6080c76921.tar.xz
Staging: ipack: Provide several carrier callbacks.
We provide callbacks to: - set/get the clockrate a module is accessed at, - get the error state of a slot, - get/reset the timeout state of a slot. Signed-off-by: Jens Taprogge <jens.taprogge@taprogge.org> Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/ipack/ipack.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/staging/ipack/ipack.h b/drivers/staging/ipack/ipack.h
index 4d73f75..a133304 100644
--- a/drivers/staging/ipack/ipack.h
+++ b/drivers/staging/ipack/ipack.h
@@ -113,6 +113,15 @@ struct ipack_driver {
* @request_irq: request IRQ
* @free_irq: free IRQ
* @remove_device: tell the bridge module that the device has been removed
+ * @get_clockrate: Returns the clockrate the carrier is currently
+ * communicating with the device at.
+ * @set_clockrate: Sets the clock-rate for carrier / module communication.
+ * Should return -EINVAL if the requested speed is not supported.
+ * @get_error: Returns the error state for the slot the device is attached
+ * to.
+ * @get_timeout: Returns 1 if the communication with the device has
+ * previously timed out.
+ * @reset_timeout: Resets the state returned by get_timeout.
*/
struct ipack_bus_ops {
int (*map_space) (struct ipack_device *dev, unsigned int memory_size, int space);
@@ -120,6 +129,12 @@ struct ipack_bus_ops {
int (*request_irq) (struct ipack_device *dev, int vector, int (*handler)(void *), void *arg);
int (*free_irq) (struct ipack_device *dev);
int (*remove_device) (struct ipack_device *dev);
+
+ int (*get_clockrate) (struct ipack_device *dev);
+ int (*set_clockrate) (struct ipack_device *dev, int mherz);
+ int (*get_error) (struct ipack_device *dev);
+ int (*get_timeout) (struct ipack_device *dev);
+ int (*reset_timeout) (struct ipack_device *dev);
};
/**