summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorZbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>2022-05-10 18:37:55 +0300
committerZbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>2022-05-20 14:49:59 +0300
commit8dcd772516812e8dd37fdf748b1724726b9fd31d (patch)
treeb2d89068298cf5f5095b3b6b6eaff716e4f80f55 /include
parentefe6d9649b1d6b85b50cef64745df2e6749a8a45 (diff)
downloadlinux-8dcd772516812e8dd37fdf748b1724726b9fd31d.tar.xz
i3c: master: Enable support for PEC
PEC (Packet Error Check) support enabled in I3C controller driver. API for I3C device driver to control (enable or disable) PEC support in lower layer driver added. Signed-off-by: Zbigniew Lukwinski <zbigniew.lukwinski@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/i3c/device.h5
-rw-r--r--include/linux/i3c/master.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/i3c/device.h b/include/linux/i3c/device.h
index e036a30f8c7e..1bc9f65dbb6a 100644
--- a/include/linux/i3c/device.h
+++ b/include/linux/i3c/device.h
@@ -109,6 +109,8 @@ enum i3c_dcr {
* @max_read_turnaround: max read turn-around time in micro-seconds
* @max_read_len: max private SDR read length in bytes
* @max_write_len: max private SDR write length in bytes
+ * @pec: flag telling whether PEC (Packet Error Check) generation and verification for read
+ * and write transaction is enabled
*
* These are all basic information that should be advertised by an I3C device.
* Some of them are optional depending on the device type and device
@@ -130,6 +132,7 @@ struct i3c_device_info {
u32 max_read_turnaround;
u16 max_read_len;
u16 max_write_len;
+ u8 pec;
__be16 status;
};
@@ -346,4 +349,6 @@ struct i3c_target_read_setup {
int i3c_target_read_register(struct i3c_device *dev, const struct i3c_target_read_setup *setup);
+int i3c_device_control_pec(struct i3c_device *dev, bool pec);
+
#endif /* I3C_DEV_H */
diff --git a/include/linux/i3c/master.h b/include/linux/i3c/master.h
index 5d35a6d1c992..c9e7a2084f1e 100644
--- a/include/linux/i3c/master.h
+++ b/include/linux/i3c/master.h
@@ -500,6 +500,7 @@ struct i3c_master_controller {
struct i2c_adapter i2c;
const struct i3c_master_controller_ops *ops;
const struct i3c_target_ops *target_ops;
+ unsigned int pec_supported : 1;
unsigned int target : 1;
unsigned int secondary : 1;
unsigned int init_done : 1;