astlpc: Provide KCS device path as a binding argument
Currently astlpc binding expects a '/dev/mctp0' device in the system
for the KCS communication. This device is a symbolic link to the
real '/dev/raw-kcsX' device, created by the udev rules populated by the
build system.
This approach is not ideal since the build system populates udev rules
for the KCS3 and KCS4 channels simultaneously and for these channels
only. This means that there are some design limitations for the MCTP
communication. It is only possible on KCS3 or KCS4 channel, and if one
of these channels is used, the other one must be disabled.
To make design more flexible get rid of all the udev rules and provide
'/dev/raw-kcsX' device path as an argument to the binding
initialization code.
Change-Id: I505e44280636c83b59669b314f60279b371d0403
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
diff --git a/libmctp-astlpc.h b/libmctp-astlpc.h
index 110b998..362e4bb 100644
--- a/libmctp-astlpc.h
+++ b/libmctp-astlpc.h
@@ -45,7 +45,7 @@
int mctp_astlpc_poll(struct mctp_binding_astlpc *astlpc);
/* fileio-based interface */
-struct mctp_binding_astlpc *mctp_astlpc_init_fileio(void);
+struct mctp_binding_astlpc *mctp_astlpc_init_fileio(const char *kcs_path);
struct pollfd;
int mctp_astlpc_init_pollfd(struct mctp_binding_astlpc *astlpc,