commit | 03d7dae24d74f35d5703da74931938fcab7467d3 | [log] [tgz] |
---|---|---|
author | Anna Platash <anna.platash@intel.com> | Fri Feb 05 13:52:05 2021 +0100 |
committer | Iwona Winiarska <iwona.winiarska@intel.com> | Fri Oct 08 00:28:27 2021 +0200 |
tree | b4b891029531d04c8ac10a599a1220529c54001f | |
parent | ff44e549c44c7658ec11e0c19c13c4c45900cfe4 [diff] |
Add capability to set PECI device file name This adds capability to set the name of the PECI device file. If the PECI device name is null, use "/dev/peci-default". If that does not exist fall back to "/dev/peci-0" PECI_DEV environment variable can be used to override default PECI device name, for example: export PECI_DEV=/dev/peci-wire Added -d <dev name> command line option to peci_cmds, that can be used to specify PECI device name, for example: peci_cmds -d /dev/peci-0 gettemp Added peci_SetDevName(char* dev_name) to libpeci API. Tested manually: 1) using peci_cmds -d <dev_name> gettemp 2) calling peci_SetDevName(<dev_name>) from client application Change-Id: I236857ec3ac42b8ff227aa32899ca8f1f3577d2b Signed-off-by: Anna Platash <anna.platash@intel.com> Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
libpeci is a library that provides various APIs to interface with the IOCTLs provided by the PECI driver in the OpenBMC kernel. Currently available here:
https://github.com/openbmc/linux/blob/dev-5.4/include/uapi/linux/peci-ioctl.h
This repo also includes a peci_cmds command-line utility with functions that map to the libpeci APIs. It can be used to test PECI functionality across the library, driver, and hardware.