diff options
author | Eddie James | 2021-07-21 14:02:30 -0500 |
---|---|---|
committer | Joel Stanley | 2021-10-15 15:09:26 +1030 |
commit | 908dbf0242e21dd95c69a1b0935814cd1abfc134 (patch) | |
tree | ecb3df0f59c763b15a5ab357b532237ec5303533 /drivers/hwmon/occ/common.h | |
parent | 62f79f3d0eb9f4c224bcc3c7f6fa758515a0a7fa (diff) |
hwmon: (occ) Remove sequence numbering and checksum calculation
Checksumming of the request and sequence numbering is now done in the
OCC interface driver in order to keep unique sequence numbers. So
remove those in the hwmon driver. Also, add the command length to the
send_cmd function pointer, since the checksum must be placed in the
last two bytes of the command. The submit interface must receive the
exact size of the command - previously it could be rounded to the
nearest 8 bytes with no consequence.
Signed-off-by: Eddie James <eajames@linux.ibm.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210721190231.117185-3-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au>
Diffstat (limited to 'drivers/hwmon/occ/common.h')
-rw-r--r-- | drivers/hwmon/occ/common.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hwmon/occ/common.h b/drivers/hwmon/occ/common.h index e6df719770e8..5020117be740 100644 --- a/drivers/hwmon/occ/common.h +++ b/drivers/hwmon/occ/common.h @@ -95,9 +95,8 @@ struct occ { struct occ_sensors sensors; int powr_sample_time_us; /* average power sample time */ - u8 seq_no; u8 poll_cmd_data; /* to perform OCC poll command */ - int (*send_cmd)(struct occ *occ, u8 *cmd); + int (*send_cmd)(struct occ *occ, u8 *cmd, size_t len); unsigned long next_update; struct mutex lock; /* lock OCC access */ |