Bridle API 4.1.99
A Zephyr based application framework
|
MFD Driver for an SC18IM604 bridge. More...
#include <string.h>
#include <zephyr/kernel.h>
#include <zephyr/sys/util_macro.h>
#include <zephyr/device.h>
#include <zephyr/pm/device.h>
#include <zephyr/drivers/spi.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/drivers/gpio/gpio_utils.h>
#include <zephyr/drivers/mfd/sc18is604.h>
#include "mfd_sc18is604.h"
#include <zephyr/logging/log.h>
Macros | |
#define | DT_DRV_COMPAT nxp_sc18is604 |
#define | MFD_SC18IS604_DEFINE(inst) |
Functions | |
LOG_MODULE_REGISTER (mfd_sc18is604, CONFIG_MFD_LOG_LEVEL) | |
int | mfd_sc18is604_add_callback (const struct device *dev, struct gpio_callback *callback) |
Register an interrupt callback. | |
int | mfd_sc18is604_remove_callback (const struct device *dev, struct gpio_callback *callback) |
Remove a previously registered interrupt callback. | |
int | mfd_sc18is604_claim (const struct device *dev, k_timeout_t timeout) |
Claim a lock on an SC18IS604 device, preventing other users from accessing the device until the lock is released. | |
void | mfd_sc18is604_release (const struct device *dev) |
Release a previously acquired lock on an SC18IS604 device. | |
static int | mfd_sc18is604_request_version_string (const struct device *dev) |
Request device version string. | |
static int | mfd_sc18is604_configure_gpio_pin (const struct device *dev, const struct gpio_dt_spec *gpio, const gpio_flags_t flags) |
Set up GPIO pin. | |
static int | mfd_sc18is604_chip_reset (const struct device *dev) |
Reset device. | |
static int | mfd_sc18is604_reset_state_apply (const struct device *dev) |
Apply register default values. | |
static int | mfd_sc18is604_clear_interrupt_source (const struct device *dev) |
static void | mfd_sc18is604_interrupt_callback (const struct device *dev, struct gpio_callback *cb, gpio_port_pins_t pins) |
static int | mfd_sc18is604_check_chipid (const struct device *dev, k_timeout_t timeout) |
static int | mfd_sc18is604_bind_interrupt (const struct device *dev, const struct gpio_dt_spec *gpio, const gpio_flags_t flags) |
Set up interrupt handling. | |
static int | mfd_sc18is604_init (const struct device *dev) |
DT_INST_FOREACH_STATUS_OKAY (MFD_SC18IS604_DEFINE) | |
MFD Driver for an SC18IM604 bridge.
#define DT_DRV_COMPAT nxp_sc18is604 |
#define MFD_SC18IS604_DEFINE | ( | inst | ) |
DT_INST_FOREACH_STATUS_OKAY | ( | MFD_SC18IS604_DEFINE | ) |
LOG_MODULE_REGISTER | ( | mfd_sc18is604 | , |
CONFIG_MFD_LOG_LEVEL | |||
) |
|
static |
Set up interrupt handling.
dev | An SC18IS604 MFD device. |
gpio | The GPIO specification from devicetree. |
flags | Additional GPIO flags. |
0 | On success. |
|
static |
|
static |
Reset device.
dev | An SC18IS604 MFD device. |
0 | On success. |
|
static |
|
static |
Set up GPIO pin.
dev | An SC18IS604 MFD device. |
gpio | The GPIO specification from devicetree. |
flags | Additional GPIO flags. |
0 | On success. |
|
static |
|
static |
|
static |
Request device version string.
The string will be placed in the internal buffer. The device interrupt is set once the string is ready to be read from the buffer.
dev | An SC18IS604 MFD device. |
|
static |
Apply register default values.
dev | An SC18IS604 MFD device. |
0 | On success. |