summary refs log tree commit diff
path: root/drivers/fsi/fsi-master.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-05-29 15:01:07 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-07-12 11:59:13 +1000
commita2e7da86cc392417b0d9f605b28038aae80b002f (patch)
tree67055b97934d16fe02af373a2178a52b66eca24a /drivers/fsi/fsi-master.h
parent935f9636389f0acd96e6ebcbc7d97425b84163b5 (diff)
downloadlinux-a2e7da86cc392417b0d9f605b28038aae80b002f.tar.gz
fsi: Add mechanism to set the tSendDelay and tEchoDelay values
Those values control the amount of "dummy" clocks between commands and
between a command and its response.

This adds a way to configure them from sysfs (to be later extended to
defaults in the device-tree). The default remains 16 (the HW default).

This is only supported if the backend supports the new link_config()
callback to configure the generation of those delays.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Joel Stanley <joel@jms.id.au>
---
Diffstat (limited to 'drivers/fsi/fsi-master.h')
-rw-r--r--drivers/fsi/fsi-master.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/fsi/fsi-master.h b/drivers/fsi/fsi-master.h
index ee0b46086026..7d619c68ab9b 100644
--- a/drivers/fsi/fsi-master.h
+++ b/drivers/fsi/fsi-master.h
@@ -33,6 +33,8 @@ struct fsi_master {
 	int		(*term)(struct fsi_master *, int link, uint8_t id);
 	int		(*send_break)(struct fsi_master *, int link);
 	int		(*link_enable)(struct fsi_master *, int link);
+	int		(*link_config)(struct fsi_master *, int link,
+				       u8 t_send_delay, u8 t_echo_delay);
 };
 
 #define dev_to_fsi_master(d) container_of(d, struct fsi_master, dev)