Extract a helper function for handling an SMB alert, as every
SMBus implementation will have to loop through the peripheral
address which might have triggered the alert.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Add includes which are actually required for the compilation
in the headers themselves to avoid include dependencies.
Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
Do not enable subsystem/driver shell modules by default and stop abusing
CONFIG_SHELL_MINIMAL, which is internal to the shell subsystem, to decide
when to enable a driver shell.
The list of shell modules has grown considerably through the
years. Enabling CONFIG_SHELL for doing e.g. an interactive debug session
leads to a large number of shell modules also being enabled unless
explicitly disabled, which again leads to non-negligible increases in
RAM/ROM usage.
This commit attempts to establish a policy of subsystem/driver shell
modules being disabled by default, requiring the user/application to
explicitly enable only those needed.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove syscalls that allows user threads to set callbacks that
will be invoked by the kernel.
Userspace is not trusted we can't allow a user thread set callbacks
that will be invoked by the kernel and run with supervisor privileges.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Move the syscall_handler.h header, used internally only to a dedicated
internal folder that should not be used outside of Zephyr.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Select PCIE and DYNAMIC_INTERRUPTS as they are needed for driver to
work. This allows to remove board configuration overlay files.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
This adds a few line use zephyr_syscall_header() to include
headers containing syscall function prototypes.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Change init priority for SMBus from KERNEL_INIT_PRIORITY_DEVICE (50)
to KERNEL_INIT_PRIORITY_DEFAULT (40) since other devices which depend
on SMBus (like EEPROM) have the same priority.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Move smbus_utils.h header from generic includes to the driver's area
in order to have in include/zephyr/drivers only smbus.h header.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Unify the drivers/*/Kconfig menuconfig title strings to the format
"<class> [(acronym)] [bus] drivers".
Including both the full name of the driver class and an acronym makes
menuconfig more user friendly as some of the acronyms are less well-known
than others. It also improves Kconfig search, both via menuconfig and via
the generated Kconfig documentation.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
The callbacks API was similar to gpio / espi callbacks API. Refactor
it to use more intuitive names for set / remove callbacks.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Add SMBus shell module for testing. This allows arbitrary boards with
SMBus driver supported exploring the SMBus communication with
peripheral devices.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>