smbus: Add Host Notify and smbalert API

Add API for SMBus Host Notify and SMBALERT.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This commit is contained in:
Andrei Emeltchenko 2022-10-05 15:40:39 +03:00 committed by Anas Nashif
commit 2146b19cc7
3 changed files with 205 additions and 1 deletions

View file

@ -4,8 +4,9 @@
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/drivers/smbus.h>
#include <zephyr/sys/slist.h>
#include <zephyr/syscall_handler.h>
#include <zephyr/drivers/smbus.h>
static inline int z_vrfy_smbus_configure(const struct device *dev,
uint32_t dev_config)
@ -142,3 +143,23 @@ static inline int z_vrfy_smbus_block_pcall(const struct device *dev,
rcv_count, rcv_buf);
}
#include <syscalls/smbus_block_pcall_mrsh.c>
static inline int z_vrfy_smbus_manage_smbalert_cb(const struct device *dev,
struct smbus_callback *cb,
bool set)
{
Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_SMBUS));
return z_impl_smbus_manage_smbalert_cb(dev, cb, set);
}
#include <syscalls/smbus_manage_smbalert_cb_mrsh.c>
static inline int z_vrfy_smbus_manage_host_notify_cb(const struct device *dev,
struct smbus_callback *cb,
bool set)
{
Z_OOPS(Z_SYSCALL_OBJ(dev, K_OBJ_DRIVER_SMBUS));
return z_impl_smbus_manage_host_notify_cb(dev, cb, set);
}
#include <syscalls/smbus_manage_host_notify_cb_mrsh.c>