Commit Graph

16 Commits

Author SHA1 Message Date
Andrei Emeltchenko e56c5b2eb2 drivers: smbus: Select PCIE and DYNAMIC_INTERRUPTS
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>
2023-08-10 13:59:15 +03:00
Daniel Leung 26ecaba4af drivers: syscalls: use zephyr_syscall_header
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>
2023-06-17 07:57:45 -04:00
Andrei Emeltchenko cd2fe8c186 doc: smbus: Correct syntax in sources and headers
Correct syntax in SMBus sources and headers used to generate the SMBus
documentation.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-06-01 18:04:58 -04:00
Andrei Emeltchenko c1fa65eec7 smbus: Change init priority from DEVICE to DEFAULT
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>
2023-04-21 16:26:28 +02:00
Andrei Emeltchenko 1679faaa0e smbus: Move smbus_utils.h from includes to driver area
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>
2023-03-30 09:45:02 +00:00
Henrik Brix Andersen c41dd36de2 drivers: kconfig: unify menuconfig title strings
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>
2023-03-28 15:06:06 +02:00
Andrei Emeltchenko e829b72ad5 drivers: smbus: pch: Wrap respective code with ifdefs
Wrap code for SMBALERT and HOST_NOTIFY with configuration ifdefs.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko a42ab2729f smbus: Convert to use runtime BDF lookup
Convert PCH SMBus driver, tests and samples to use new dynamic BDF
lookup.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 14923f4131 smbus: Refactor callbacks API
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>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko fe46408ff2 drivers: smbus: Implement Host Notify and SMBALERT for PCH
Implement SMBus Host Notify and SMBALERT for Intel PCH driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 2146b19cc7 smbus: Add Host Notify and smbalert API
Add API for SMBus Host Notify and SMBALERT.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 2de1936acc drivers: smbus: pch: Add Block Process Call operation
Add SMBus Block Process Call implementation for Intel PCH SMBus
driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 4099bc2e63 drivers: smbus: Add Intel ICH / PCH SMbus driver
Add driver supporting Intel I/O Controller Hub (ICH), later renamed
to Intel Platform Controller Hub (PCH).

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko af984aa58b drivers: smbus: Add Intel PCH driver register header
Add header file for Intel PCH SMBus driver.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko 5fc55364a2 smbus: shell: Add SMBus subsystem shell module
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>
2023-03-22 08:16:23 -04:00
Andrei Emeltchenko adff73d618 smbus: Introduce SMBus subsystem driver API
Introduces SMBus driver API for SMBus controllers.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-22 08:16:23 -04:00