/linux/drivers/char/ipmi/ |
H A D | ssif_bmc.c | 28 /* Transaction includes the address, the command, the length and the PEC byte */ 54 u8 pec; member 342 /* PEC - Start Read Address */ in calculate_response_part_pec() 343 part->pec = i2c_smbus_pec(0, &addr, 1); in calculate_response_part_pec() 344 /* PEC - SSIF Command */ in calculate_response_part_pec() 345 part->pec = i2c_smbus_pec(part->pec, &part->smbus_cmd, 1); in calculate_response_part_pec() 346 /* PEC - Restart Write Address */ in calculate_response_part_pec() 348 part->pec = i2c_smbus_pec(part->pec, &addr, 1); in calculate_response_part_pec() 349 part->pec = i2c_smbus_pec(part->pec, &part->length, 1); in calculate_response_part_pec() 351 part->pec = i2c_smbus_pec(part->pec, part->payload, part->length); in calculate_response_part_pec() [all …]
|
/linux/drivers/net/mctp/ |
H A D | mctp-i3c.c | 26 /* One byte less to allow for the PEC */ 28 /* 4 byte MCTP header, no data, 1 byte PEC */ 108 u8 pec, addr; in mctp_i3c_read() local 145 /* check PEC, including address byte */ in mctp_i3c_read() 147 pec = i2c_smbus_pec(0, &addr, 1); in mctp_i3c_read() 148 pec = i2c_smbus_pec(pec, xfer.data.in, xfer.len - 1); in mctp_i3c_read() 149 if (pec != ((u8 *)xfer.data.in)[xfer.len - 1]) { in mctp_i3c_read() 155 /* Remove PEC */ in mctp_i3c_read() 368 u8 addr, pec; in mctp_i3c_xmit() local 394 /* Need a linear buffer with space for the PEC */ in mctp_i3c_xmit() [all …]
|
H A D | mctp-i2c.c | 33 /* Allow space for dest_address, command, byte_count, data, PEC */ 104 /* Count of bytes following byte_count, excluding PEC */ 278 u8 pec, calc_pec; in mctp_i2c_recv() local 282 /* + 1 for the PEC */ in mctp_i2c_recv() 287 /* recvlen excludes PEC */ in mctp_i2c_recv() 301 pec = midev->rx_buffer[midev->rx_pos - 1]; in mctp_i2c_recv() 303 if (pec != calc_pec) { in mctp_i2c_recv() 503 /* Linear case with space, we can just append the PEC */ in mctp_i2c_xmit() 514 /* command, bytecount, data, pec */ in mctp_i2c_xmit()
|
/linux/arch/s390/pci/ |
H A D | pci_event.c | 35 u16 pec; /* PCI event code */ member 48 u16 pec; /* PCI event code */ member 297 zpci_dbg(3, "err fid:%x, fh:%x, pec:%x\n", in __zpci_event_error() 298 ccdf->fid, ccdf->fh, ccdf->pec); in __zpci_event_error() 319 pdev ? pci_name(pdev) : "n/a", ccdf->pec, ccdf->fid); in __zpci_event_error() 324 switch (ccdf->pec) { in __zpci_event_error() 389 zpci_dbg(3, "avl fid:%x, fh:%x, pec:%x\n", in __zpci_event_availability() 390 ccdf->fid, ccdf->fh, ccdf->pec); in __zpci_event_availability() 395 switch (ccdf->pec) { in __zpci_event_availability()
|
/linux/drivers/i2c/busses/ |
H A D | i2c-amd8111.c | 150 #define AMD_SMB_PRTCL 0x00 /* protocol, PEC */ 194 unsigned char protocol, len, pec, temp[2]; in amd8111_access() local 199 pec = (flags & I2C_CLIENT_PEC) ? AMD_SMB_PRTCL_PEC : 0; in amd8111_access() 244 protocol |= AMD_SMB_PRTCL_WORD_DATA | pec; in amd8111_access() 265 protocol |= AMD_SMB_PRTCL_BLOCK_DATA | pec; in amd8111_access() 300 protocol = AMD_SMB_PRTCL_PROC_CALL | pec; in amd8111_access() 319 protocol = AMD_SMB_PRTCL_BLOCK_PROC_CALL | pec; in amd8111_access()
|
H A D | i2c-amd-asf-plat.c | 158 /* Enable PEC and PEC append */ in amd_asf_setup_target() 182 /* Enable PEC and PEC append */ in amd_asf_access() 203 /* Exclude the receive header and PEC */ in amd_asf_xfer()
|
H A D | i2c-mlxbf.c | 210 /* Packet error check (PEC) value. */ 237 #define MLXBF_I2C_MASTER_SEND_PEC_SHIFT 20 /* Send PEC byte when set to 1 */ 275 /* Packet error check (PEC) value. */ 293 #define MLXBF_I2C_SLAVE_SEND_PEC_SHIFT 21 /* Send PEC byte shift. */ 666 /* Zero PEC byte. */ in mlxbf_i2c_smbus_enable() 1018 *data_len = length; /* including PEC byte. */ in mlxbf_i2c_smbus_blk_process_call_func() 1892 pec_en = 0; /* Disable PEC since it is not supported. */ in mlxbf_i2c_irq_send() 2037 bool read, pec; in mlxbf_i2c_smbus_xfer() local 2043 pec = flags & I2C_FUNC_SMBUS_PEC; in mlxbf_i2c_smbus_xfer() 2054 pec); in mlxbf_i2c_smbus_xfer() [all …]
|
H A D | i2c-i801.c | 17 * Chip name PCI ID size PEC buffer call read 88 * Software PEC no 89 * Hardware PEC yes 324 "SMBus PEC", 335 "\t\t 0x01 disable SMBus PEC\n" 460 * This may be a PEC error, check and clear it. in i801_check_post() 476 pci_dbg(priv->pci_dev, "PEC error\n"); in i801_check_post() 904 if (hwpec) /* enable/disable hardware PEC */ in i801_access() 919 /* Some BIOSes don't like it when PEC is enabled at reboot or resume in i801_access()
|
H A D | i2c-stm32f7.c | 274 * contain a maximum of 32 bytes of data + byte command + byte count + PEC 1089 /* Configure PEC */ in stm32f7_i2c_smbus_xfer_msg() 1182 /* Add one byte for PEC if needed */ in stm32f7_i2c_smbus_rep_start() 1257 dev_err(i2c_dev->dev, "Unsupported smbus protocol for PEC\n"); in stm32f7_i2c_smbus_check_pec() 1262 dev_err(i2c_dev->dev, "Bad PEC 0x%02x vs. 0x%02x\n", in stm32f7_i2c_smbus_check_pec() 1542 dev_err(dev, "PEC error in reception accessing addr 0x%x\n", addr); in stm32f7_i2c_handle_isr_errs() 1843 /* Check PEC */ in stm32f7_i2c_smbus_xfer() 1905 dev_err(dev, "SMBus PEC not supported in slave mode\n"); in stm32f7_i2c_reg_slave()
|
/linux/drivers/i3c/master/ |
H A D | ast2600-i3c-master.c | 109 * if the PEC is disabled. We have no way to restrict the length of in ast2600_i3c_set_dat_ibi() 111 * PEC checking, which means we drop a byte of payload data in ast2600_i3c_set_dat_ibi() 115 "Enabling PEC workaround. IBI payloads will be truncated\n"); in ast2600_i3c_set_dat_ibi()
|
/linux/drivers/i2c/ |
H A D | i2c-core-smbus.c | 61 static u8 i2c_smbus_msg_pec(u8 pec, struct i2c_msg *msg) in i2c_smbus_msg_pec() argument 65 pec = i2c_smbus_pec(pec, &addr, 1); in i2c_smbus_msg_pec() 68 return i2c_smbus_pec(pec, msg->buf, msg->len); in i2c_smbus_msg_pec() 89 pr_debug("Bad PEC 0x%02x vs. 0x%02x\n", in i2c_smbus_check_pec() 458 /* Compute PEC if first message is a write */ in i2c_smbus_xfer_emulated() 465 /* Ask for PEC if last message is a read */ in i2c_smbus_xfer_emulated() 479 /* Check PEC if last message is a read */ in i2c_smbus_xfer_emulated()
|
H A D | i2c-dev.c | 427 * Setting the PEC flag here won't affect kernel drivers, in i2cdev_ioctl() 430 * the PEC flag already set, the i2c-dev driver won't see in i2cdev_ioctl() 613 * information and maybe a PEC flag. in i2cdev_open()
|
/linux/include/uapi/linux/ |
H A D | i2c.h | 50 * if used, the SMBus PEC); and this value will be incremented by the number 64 * with SMBus PEC. The transfer terminates with a NAK, or when all those
|
H A D | i2c-dev.h | 37 #define I2C_PEC 0x0708 /* != 0 to use PEC with SMBus */
|
/linux/Documentation/i2c/ |
H A D | smbus-protocol.rst | 246 Packet Error Checking (PEC) 251 PEC adds a CRC-8 error-checking byte to transfers using it, immediately 264 require PEC checksums.
|
H A D | fault-codes.rst | 60 may have a way to report PEC mismatches on writes from the
|
/linux/Documentation/i2c/busses/ |
H A D | i2c-amd8111.rst | 35 Supported. Both PEC and block process call support is implemented. Slave
|
H A D | i2c-viapro.rst | 76 The CX700/VX800/VX820 additionally appears to support SMBus PEC, although
|
/linux/drivers/hwmon/ |
H A D | max6621.c | 499 /* Set CONFIG0 register masking temperature alerts and PEC. */ in max6621_probe() 505 /* Set CONFIG1 register for PEC access retry number. */ in max6621_probe()
|
/linux/drivers/gpu/drm/xe/ |
H A D | xe_oa.c | 135 [XE_OA_FORMAT_PEC64u64] = { 1, 576, DRM_FMT(PEC), HDR_64_BIT, 1, 0 }, 136 [XE_OA_FORMAT_PEC64u64_B8_C8] = { 1, 640, DRM_FMT(PEC), HDR_64_BIT, 1, 1 }, 137 [XE_OA_FORMAT_PEC64u32] = { 1, 320, DRM_FMT(PEC), HDR_64_BIT }, 138 [XE_OA_FORMAT_PEC32u64_G1] = { 5, 320, DRM_FMT(PEC), HDR_64_BIT, 1, 0 }, 139 [XE_OA_FORMAT_PEC32u32_G1] = { 5, 192, DRM_FMT(PEC), HDR_64_BIT }, 140 [XE_OA_FORMAT_PEC32u64_G2] = { 6, 320, DRM_FMT(PEC), HDR_64_BIT, 1, 0 }, 141 [XE_OA_FORMAT_PEC32u32_G2] = { 6, 192, DRM_FMT(PEC), HDR_64_BIT }, 142 [XE_OA_FORMAT_PEC36u64_G1_32_G2_4] = { 3, 320, DRM_FMT(PEC), HDR_64_BIT, 1, 0 }, 143 [XE_OA_FORMAT_PEC36u64_G1_4_G2_32] = { 4, 320, DRM_FMT(PEC), HDR_64_BIT, 1, 0 }, 1095 /* The three bits below are needed to get PEC counters running */ in xe_oa_enable_metric_set()
|
/linux/drivers/hwmon/pmbus/ |
H A D | pli1209bc.c | 17 * the page register is set to 1 will falsely enable PEC support. Disable
|
/linux/Documentation/ABI/testing/ |
H A D | sysfs-class-hwmon | 1068 What: /sys/class/hwmon/hwmonX/device/pec 1070 PEC support on I2C devices
|
/linux/arch/s390/include/asm/ |
H A D | ctlreg.h | 204 unsigned long pec : 1; /* PAI extension control */ member
|
/linux/drivers/iio/temperature/ |
H A D | mlx90614.c | 115 * Note: The mlx90614 requires a PEC on writing but does not send us a in mlx90614_write_word() 116 * valid PEC on reading. Hence, we cannot set I2C_CLIENT_PEC in in mlx90614_write_word()
|
/linux/drivers/i2c/algos/ |
H A D | i2c-algo-bit.c | 363 * the SMBus PEC was wrong. in sendbytes() 438 or 2 for a PEC transaction. */ in readbytes()
|