drivers: device: do not reuse tag name 'device'
Do not reuse tag name (misra rule 5.7). Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
a86505b450
commit
5d6c219210
47 changed files with 118 additions and 117 deletions
|
@ -124,7 +124,7 @@
|
|||
#define PM6_LR_CSS_STAT ((1 << BIT2) << PM6_OFFSET)
|
||||
|
||||
|
||||
static int pmod_mux_init(const struct device *device)
|
||||
static int pmod_mux_init(const struct device *dev)
|
||||
{
|
||||
volatile uint32_t *mux_regs = (uint32_t *)(PMODMUX_BASE_ADDR);
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
#include <init.h>
|
||||
#include <drivers/pinmux.h>
|
||||
|
||||
static int board_pinmux_init(const struct device *device)
|
||||
static int board_pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
const struct device *pinmux = DEVICE_DT_GET(DT_NODELABEL(pinctrl));
|
||||
|
||||
|
|
|
@ -160,9 +160,9 @@ void timer0_nrf_isr(void *arg)
|
|||
sys_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? dticks : (dticks > 0));
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
/* FIXME switch to 1 MHz once this is fixed in QEMU */
|
||||
nrf_timer_frequency_set(TIMER, NRF_TIMER_FREQ_2MHz);
|
||||
|
|
|
@ -897,9 +897,9 @@ UTIL_LISTIFY(CONFIG_UART_MUX_DEVICE_COUNT, DEFINE_UART_MUX_CFG_DATA, _)
|
|||
UTIL_LISTIFY(CONFIG_UART_MUX_DEVICE_COUNT, DEFINE_UART_MUX_DEV_DATA, _)
|
||||
UTIL_LISTIFY(CONFIG_UART_MUX_DEVICE_COUNT, DEFINE_UART_MUX_DEVICE, _)
|
||||
|
||||
static int init_uart_mux(const struct device *device)
|
||||
static int init_uart_mux(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
k_work_q_start(&uart_mux_workq, uart_mux_stack,
|
||||
K_KERNEL_STACK_SIZEOF(uart_mux_stack),
|
||||
|
|
|
@ -43,7 +43,7 @@ static inline uint32_t entropy_esp32_get_u32(void)
|
|||
return REG_READ(WDEV_RND_REG);
|
||||
}
|
||||
|
||||
static int entropy_esp32_get_entropy(const struct device *device, uint8_t *buf,
|
||||
static int entropy_esp32_get_entropy(const struct device *dev, uint8_t *buf,
|
||||
uint16_t len)
|
||||
{
|
||||
assert(buf != NULL);
|
||||
|
@ -61,7 +61,7 @@ static int entropy_esp32_get_entropy(const struct device *device, uint8_t *buf,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int entropy_esp32_init(const struct device *device)
|
||||
static int entropy_esp32_init(const struct device *dev)
|
||||
{
|
||||
/* clock initialization handled by clock manager */
|
||||
return 0;
|
||||
|
|
|
@ -84,7 +84,7 @@ static int entropy_gecko_trng_get_entropy_isr(const struct device *dev,
|
|||
}
|
||||
}
|
||||
|
||||
static int entropy_gecko_trng_init(const struct device *device)
|
||||
static int entropy_gecko_trng_init(const struct device *dev)
|
||||
{
|
||||
/* Enable the TRNG0 clock. */
|
||||
CMU_ClockEnable(cmuClock_TRNG0, true);
|
||||
|
|
|
@ -227,11 +227,11 @@ static void isr(const void *arg)
|
|||
}
|
||||
}
|
||||
|
||||
static int entropy_nrf5_get_entropy(const struct device *device, uint8_t *buf,
|
||||
static int entropy_nrf5_get_entropy(const struct device *dev, uint8_t *buf,
|
||||
uint16_t len)
|
||||
{
|
||||
/* Check if this API is called on correct driver instance. */
|
||||
__ASSERT_NO_MSG(&entropy_nrf5_data == DEV_DATA(device));
|
||||
__ASSERT_NO_MSG(&entropy_nrf5_data == DEV_DATA(dev));
|
||||
|
||||
while (len) {
|
||||
uint16_t bytes;
|
||||
|
@ -324,7 +324,7 @@ static int entropy_nrf5_get_entropy_isr(const struct device *dev,
|
|||
return cnt;
|
||||
}
|
||||
|
||||
static int entropy_nrf5_init(const struct device *device);
|
||||
static int entropy_nrf5_init(const struct device *dev);
|
||||
|
||||
static const struct entropy_driver_api entropy_nrf5_api_funcs = {
|
||||
.get_entropy = entropy_nrf5_get_entropy,
|
||||
|
@ -337,10 +337,10 @@ DEVICE_DT_INST_DEFINE(0,
|
|||
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE,
|
||||
&entropy_nrf5_api_funcs);
|
||||
|
||||
static int entropy_nrf5_init(const struct device *device)
|
||||
static int entropy_nrf5_init(const struct device *dev)
|
||||
{
|
||||
/* Check if this API is called on correct driver instance. */
|
||||
__ASSERT_NO_MSG(&entropy_nrf5_data == DEV_DATA(device));
|
||||
__ASSERT_NO_MSG(&entropy_nrf5_data == DEV_DATA(dev));
|
||||
|
||||
/* Locking semaphore initialized to 1 (unlocked) */
|
||||
k_sem_init(&entropy_nrf5_data.sem_lock, 1, 1);
|
||||
|
|
|
@ -249,12 +249,12 @@ static void stm32_rng_isr(const void *arg)
|
|||
}
|
||||
}
|
||||
|
||||
static int entropy_stm32_rng_get_entropy(const struct device *device,
|
||||
static int entropy_stm32_rng_get_entropy(const struct device *dev,
|
||||
uint8_t *buf,
|
||||
uint16_t len)
|
||||
{
|
||||
/* Check if this API is called on correct driver instance. */
|
||||
__ASSERT_NO_MSG(&entropy_stm32_rng_data == DEV_DATA(device));
|
||||
__ASSERT_NO_MSG(&entropy_stm32_rng_data == DEV_DATA(dev));
|
||||
|
||||
while (len) {
|
||||
uint16_t bytes;
|
||||
|
|
|
@ -45,11 +45,11 @@ static inline int espi_manage_callback(sys_slist_t *callbacks,
|
|||
* @brief Generic function to go through and fire callback from a callback list.
|
||||
*
|
||||
* @param list A pointer on the espi callback list.
|
||||
* @param device A pointer on the espi driver instance.
|
||||
* @param dev A pointer on the espi driver instance.
|
||||
* @param pins The details on the event that triggered the callback.
|
||||
*/
|
||||
static inline void espi_send_callbacks(sys_slist_t *list,
|
||||
const struct device *device,
|
||||
const struct device *dev,
|
||||
struct espi_event evt)
|
||||
{
|
||||
struct espi_callback *cb, *tmp;
|
||||
|
@ -57,7 +57,7 @@ static inline void espi_send_callbacks(sys_slist_t *list,
|
|||
SYS_SLIST_FOR_EACH_CONTAINER_SAFE(list, cb, tmp, node) {
|
||||
if (cb->evt_type & evt.evt_type) {
|
||||
__ASSERT(cb->handler, "No callback handler!");
|
||||
cb->handler(device, cb, evt);
|
||||
cb->handler(dev, cb, evt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,9 +108,9 @@ static int e1000_tx(struct e1000_dev *dev, void *buf, size_t len)
|
|||
return (dev->tx.sta & TDESC_STA_DD) ? 0 : -EIO;
|
||||
}
|
||||
|
||||
static int e1000_send(const struct device *device, struct net_pkt *pkt)
|
||||
static int e1000_send(const struct device *ddev, struct net_pkt *pkt)
|
||||
{
|
||||
struct e1000_dev *dev = device->data;
|
||||
struct e1000_dev *dev = ddev->data;
|
||||
size_t len = net_pkt_get_len(pkt);
|
||||
|
||||
if (net_pkt_read(pkt, dev->txb, len)) {
|
||||
|
@ -160,9 +160,9 @@ out:
|
|||
return pkt;
|
||||
}
|
||||
|
||||
static void e1000_isr(const struct device *device)
|
||||
static void e1000_isr(const struct device *ddev)
|
||||
{
|
||||
struct e1000_dev *dev = device->data;
|
||||
struct e1000_dev *dev = ddev->data;
|
||||
uint32_t icr = ior32(dev, ICR); /* Cleared upon read */
|
||||
uint16_t vlan_tag = NET_VLAN_TAG_UNSPEC;
|
||||
|
||||
|
@ -210,10 +210,10 @@ static void e1000_isr(const struct device *device)
|
|||
#define PCI_VENDOR_ID_INTEL 0x8086
|
||||
#define PCI_DEVICE_ID_I82540EM 0x100e
|
||||
|
||||
int e1000_probe(const struct device *device)
|
||||
int e1000_probe(const struct device *ddev)
|
||||
{
|
||||
const pcie_bdf_t bdf = PCIE_BDF(0, 3, 0);
|
||||
struct e1000_dev *dev = device->data;
|
||||
struct e1000_dev *dev = ddev->data;
|
||||
uint32_t ral, rah;
|
||||
struct pcie_mbar mbar;
|
||||
|
||||
|
|
|
@ -253,21 +253,21 @@ static int gpio_esp32_manage_callback(const struct device *dev,
|
|||
return gpio_manage_callback(&data->cb, callback, set);
|
||||
}
|
||||
|
||||
static void gpio_esp32_fire_callbacks(const struct device *device)
|
||||
static void gpio_esp32_fire_callbacks(const struct device *dev)
|
||||
{
|
||||
struct gpio_esp32_data *data = device->data;
|
||||
struct gpio_esp32_data *data = dev->data;
|
||||
uint32_t irq_status = *data->port.irq_status_reg;
|
||||
|
||||
*data->port.irq_ack_reg = irq_status;
|
||||
|
||||
gpio_fire_callbacks(&data->cb, device, irq_status);
|
||||
gpio_fire_callbacks(&data->cb, dev, irq_status);
|
||||
}
|
||||
|
||||
static void gpio_esp32_isr(const void *param);
|
||||
|
||||
static int gpio_esp32_init(const struct device *device)
|
||||
static int gpio_esp32_init(const struct device *dev)
|
||||
{
|
||||
struct gpio_esp32_data *data = device->data;
|
||||
struct gpio_esp32_data *data = dev->data;
|
||||
static bool isr_connected;
|
||||
|
||||
data->pinmux = DEVICE_DT_GET(DT_NODELABEL(pinmux));
|
||||
|
|
|
@ -571,13 +571,13 @@ static const struct gpio_driver_api gpio_stm32_driver = {
|
|||
*
|
||||
* @return 0
|
||||
*/
|
||||
static int gpio_stm32_init(const struct device *device)
|
||||
static int gpio_stm32_init(const struct device *dev)
|
||||
{
|
||||
struct gpio_stm32_data *data = device->data;
|
||||
struct gpio_stm32_data *data = dev->data;
|
||||
|
||||
data->dev = device;
|
||||
data->dev = dev;
|
||||
|
||||
return gpio_stm32_clock_request(device, true);
|
||||
return gpio_stm32_clock_request(dev, true);
|
||||
}
|
||||
|
||||
#define GPIO_DEVICE_INIT(__node, __suffix, __base_addr, __port, __cenr, __bus) \
|
||||
|
@ -654,9 +654,9 @@ GPIO_DEVICE_INIT_STM32(k, K);
|
|||
|
||||
#if defined(CONFIG_SOC_SERIES_STM32F1X)
|
||||
|
||||
static int gpio_stm32_afio_init(const struct device *device)
|
||||
static int gpio_stm32_afio_init(const struct device *dev)
|
||||
{
|
||||
UNUSED(device);
|
||||
UNUSED(dev);
|
||||
|
||||
LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_AFIO);
|
||||
|
||||
|
|
|
@ -547,16 +547,16 @@ static int i2c_esp32_transfer(const struct device *dev, struct i2c_msg *msgs,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void i2c_esp32_isr(const struct device *device)
|
||||
static void i2c_esp32_isr(const struct device *dev)
|
||||
{
|
||||
const int fifo_give_mask = I2C_ACK_ERR_INT_ST |
|
||||
I2C_TIME_OUT_INT_ST |
|
||||
I2C_TRANS_COMPLETE_INT_ST |
|
||||
I2C_ARBITRATION_LOST_INT_ST;
|
||||
const struct i2c_esp32_config *config = device->config;
|
||||
const struct i2c_esp32_config *config = dev->config;
|
||||
|
||||
if (sys_read32(I2C_INT_STATUS_REG(config->index)) & fifo_give_mask) {
|
||||
struct i2c_esp32_data *data = device->data;
|
||||
struct i2c_esp32_data *data = dev->data;
|
||||
|
||||
/* Only give the semaphore if a watched interrupt happens.
|
||||
* Error checking is performed at the other side of the
|
||||
|
|
|
@ -191,7 +191,7 @@ static int arc_v2_irq_unit_get_state(const struct device *dev)
|
|||
*
|
||||
* @return operation result
|
||||
*/
|
||||
static int arc_v2_irq_unit_device_ctrl(const struct device *device,
|
||||
static int arc_v2_irq_unit_device_ctrl(const struct device *dev,
|
||||
uint32_t ctrl_command, void *context,
|
||||
device_pm_cb cb, void *arg)
|
||||
{
|
||||
|
@ -200,18 +200,18 @@ static int arc_v2_irq_unit_device_ctrl(const struct device *device,
|
|||
|
||||
if (ctrl_command == DEVICE_PM_SET_POWER_STATE) {
|
||||
if (*((uint32_t *)context) == DEVICE_PM_SUSPEND_STATE) {
|
||||
ret = arc_v2_irq_unit_suspend(device);
|
||||
ret = arc_v2_irq_unit_suspend(dev);
|
||||
} else if (*((uint32_t *)context) == DEVICE_PM_ACTIVE_STATE) {
|
||||
ret = arc_v2_irq_unit_resume(device);
|
||||
ret = arc_v2_irq_unit_resume(dev);
|
||||
}
|
||||
} else if (ctrl_command == DEVICE_PM_GET_POWER_STATE) {
|
||||
*((uint32_t *)context) = arc_v2_irq_unit_get_state(device);
|
||||
*((uint32_t *)context) = arc_v2_irq_unit_get_state(dev);
|
||||
}
|
||||
|
||||
arch_irq_unlock(key);
|
||||
|
||||
if (cb) {
|
||||
cb(device, ret, context, arg);
|
||||
cb(dev, ret, context, arg);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -303,7 +303,7 @@ int ioapic_resume_from_suspend(const struct device *port)
|
|||
* Implements the driver control management functionality
|
||||
* the *context may include IN data or/and OUT data
|
||||
*/
|
||||
static int ioapic_device_ctrl(const struct device *device,
|
||||
static int ioapic_device_ctrl(const struct device *dev,
|
||||
uint32_t ctrl_command,
|
||||
void *context, device_pm_cb cb, void *arg)
|
||||
{
|
||||
|
@ -311,16 +311,16 @@ static int ioapic_device_ctrl(const struct device *device,
|
|||
|
||||
if (ctrl_command == DEVICE_PM_SET_POWER_STATE) {
|
||||
if (*((uint32_t *)context) == DEVICE_PM_SUSPEND_STATE) {
|
||||
ret = ioapic_suspend(device);
|
||||
ret = ioapic_suspend(dev);
|
||||
} else if (*((uint32_t *)context) == DEVICE_PM_ACTIVE_STATE) {
|
||||
ret = ioapic_resume_from_suspend(device);
|
||||
ret = ioapic_resume_from_suspend(dev);
|
||||
}
|
||||
} else if (ctrl_command == DEVICE_PM_GET_POWER_STATE) {
|
||||
*((uint32_t *)context) = ioapic_device_power_state;
|
||||
}
|
||||
|
||||
if (cb) {
|
||||
cb(device, ret, context, arg);
|
||||
cb(dev, ret, context, arg);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -689,9 +689,9 @@ static void gsm_configure(struct k_work *work)
|
|||
gsm_finalize_connection(gsm);
|
||||
}
|
||||
|
||||
void gsm_ppp_start(const struct device *device)
|
||||
void gsm_ppp_start(const struct device *dev)
|
||||
{
|
||||
struct gsm_modem *gsm = device->data;
|
||||
struct gsm_modem *gsm = dev->data;
|
||||
|
||||
/* Re-init underlying UART comms */
|
||||
int r = modem_iface_uart_init_dev(&gsm->context.iface,
|
||||
|
@ -705,9 +705,9 @@ void gsm_ppp_start(const struct device *device)
|
|||
(void)k_delayed_work_submit(&gsm->gsm_configure_work, K_NO_WAIT);
|
||||
}
|
||||
|
||||
void gsm_ppp_stop(const struct device *device)
|
||||
void gsm_ppp_stop(const struct device *dev)
|
||||
{
|
||||
struct gsm_modem *gsm = device->data;
|
||||
struct gsm_modem *gsm = dev->data;
|
||||
struct net_if *iface = gsm->iface;
|
||||
|
||||
net_if_l2(iface)->enable(iface, false);
|
||||
|
@ -727,9 +727,9 @@ void gsm_ppp_stop(const struct device *device)
|
|||
}
|
||||
}
|
||||
|
||||
static int gsm_init(const struct device *device)
|
||||
static int gsm_init(const struct device *dev)
|
||||
{
|
||||
struct gsm_modem *gsm = device->data;
|
||||
struct gsm_modem *gsm = dev->data;
|
||||
int r;
|
||||
|
||||
LOG_DBG("Generic GSM modem (%p)", gsm);
|
||||
|
@ -795,7 +795,7 @@ static int gsm_init(const struct device *device)
|
|||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_GSM_PPP_AUTOSTART)) {
|
||||
gsm_ppp_start(device);
|
||||
gsm_ppp_start(dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -167,9 +167,9 @@ static struct pinmux_driver_api api_funcs = {
|
|||
.input = pinmux_input
|
||||
};
|
||||
|
||||
static int pinmux_initialize(const struct device *device)
|
||||
static int pinmux_initialize(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#if !CONFIG_BOOTLOADER_ESP_IDF
|
||||
uint32_t pin;
|
||||
|
|
|
@ -88,9 +88,9 @@ static struct pinmux_driver_api apis = {
|
|||
.input = pinmux_input
|
||||
};
|
||||
|
||||
static int pinmux_init(const struct device *device)
|
||||
static int pinmux_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,9 +42,9 @@ static void timer_irq_handler(const void *unused)
|
|||
wrapped_announce(_sys_idle_elapsed_ticks);
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
IOWR_ALTERA_AVALON_TIMER_PERIODL(TIMER_0_BASE,
|
||||
k_ticks_to_cyc_floor32(1) & 0xFFFF);
|
||||
|
|
|
@ -213,11 +213,11 @@ uint32_t sys_clock_cycle_get_32(void)
|
|||
|
||||
#endif
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
uint32_t val;
|
||||
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
val = x86_read_loapic(LOAPIC_TIMER_CONFIG); /* set divider */
|
||||
val &= ~DCR_DIVIDER_MASK;
|
||||
|
|
|
@ -277,9 +277,9 @@ static void timer_int_handler(const void *unused)
|
|||
*
|
||||
* @return 0
|
||||
*/
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
/* ensure that the timer will not generate interrupts */
|
||||
timer0_control_register_set(0);
|
||||
|
|
|
@ -46,9 +46,9 @@ static void arm_arch_timer_compare_isr(const void *arg)
|
|||
sys_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? delta_ticks : 1);
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
IRQ_CONNECT(ARM_ARCH_TIMER_IRQ, ARM_ARCH_TIMER_PRIO,
|
||||
arm_arch_timer_compare_isr, NULL, ARM_ARCH_TIMER_FLAGS);
|
||||
|
|
|
@ -121,7 +121,7 @@ static void compare_isr(const void *arg)
|
|||
sys_clock_announce(dticks);
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
uint64_t curr = count();
|
||||
|
||||
|
|
|
@ -183,9 +183,9 @@ static void startDevice(void)
|
|||
irq_unlock(key);
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
rtc_last = 0U;
|
||||
|
||||
|
|
|
@ -149,9 +149,9 @@ void sys_clock_isr(void *arg)
|
|||
z_arm_int_exit();
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
NVIC_SetPriority(SysTick_IRQn, _IRQ_PRIO_OFFSET);
|
||||
last_load = CYC_PER_TICK - 1;
|
||||
|
|
|
@ -106,12 +106,12 @@ static void set_timer0_irq(unsigned int irq)
|
|||
TIMER0_CONF_REG = val;
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
extern int z_clock_hw_cycles_per_sec;
|
||||
uint32_t hz;
|
||||
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
DEVICE_MMIO_TOPLEVEL_MAP(hpet_regs, K_MEM_CACHE_NONE);
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ static void timer_isr(const void *unused)
|
|||
sys_clock_announce(dticks);
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
timer_init_combine(CTIMER_HW_TIMER_INDEX, TRUE);
|
||||
timer_init(CTIMER_HW_TIMER_INDEX, ET_PSR_32K, TRUE, FALSE, 0);
|
||||
|
|
|
@ -101,8 +101,9 @@ static void init_downcounter(volatile struct gptimer_timer_regs *tmr)
|
|||
tmr->ctrl = GPTIMER_CTRL_LD | GPTIMER_CTRL_RS | GPTIMER_CTRL_EN;
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(dev);
|
||||
const int timer_interrupt = get_timer_irq();
|
||||
volatile struct gptimer_regs *regs = get_regs();
|
||||
volatile struct gptimer_timer_regs *tmr = ®s->timer[0];
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
static void litex_timer_irq_handler(const void *device)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
int key = irq_lock();
|
||||
|
||||
sys_write8(TIMER_EV, TIMER_EV_PENDING_ADDR);
|
||||
|
@ -59,9 +58,9 @@ uint32_t sys_clock_elapsed(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
IRQ_CONNECT(TIMER_IRQ, DT_INST_IRQ(0, priority),
|
||||
litex_timer_irq_handler, NULL, 0);
|
||||
irq_enable(TIMER_IRQ);
|
||||
|
|
|
@ -314,9 +314,9 @@ void sys_clock_disable(void)
|
|||
TIMER_REGS->CTRL = 0U;
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
mchp_pcr_periph_slp_ctrl(PCR_RTMR, MCHP_PCR_SLEEP_DIS);
|
||||
|
||||
|
|
|
@ -60,9 +60,9 @@ void np_timer_isr_test_hook(const void *arg)
|
|||
*
|
||||
* Enable the hw timer, setting its tick period, and setup its interrupt
|
||||
*/
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
tick_period = 1000000ul / CONFIG_SYS_CLOCK_TICKS_PER_SEC;
|
||||
|
||||
|
|
|
@ -265,9 +265,9 @@ uint32_t sys_clock_cycle_get_32(void)
|
|||
return (uint32_t)(current);
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
int ret;
|
||||
const struct device *const clk_dev =
|
||||
device_get_binding(NPCX_CLK_CTRL_NAME);
|
||||
|
|
|
@ -299,9 +299,9 @@ void z_nrf_rtc_timer_chan_free(uint32_t chan)
|
|||
atomic_or(&alloc_mask, BIT(chan));
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
static const enum nrf_lfclk_start_mode mode =
|
||||
IS_ENABLED(CONFIG_SYSTEM_CLOCK_NO_WAIT) ?
|
||||
CLOCK_CONTROL_NRF_LF_START_NOWAIT :
|
||||
|
|
|
@ -79,9 +79,9 @@ static void timer_isr(const void *arg)
|
|||
sys_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? dticks : 1);
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
IRQ_CONNECT(RISCV_MACHINE_TIMER_IRQ, 0, timer_isr, NULL, 0);
|
||||
last_count = mtime();
|
||||
|
|
|
@ -175,9 +175,9 @@ static void rtc_isr(const void *arg)
|
|||
#endif /* CONFIG_TICKLESS_KERNEL */
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
#ifdef MCLK
|
||||
MCLK->APBAMASK.reg |= MCLK_APBAMASK_RTC;
|
||||
|
|
|
@ -78,9 +78,9 @@ static void lptim_irq_handler(const struct device *unused)
|
|||
}
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
/* enable LPTIM clock source */
|
||||
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_LPTIM1);
|
||||
|
|
|
@ -23,14 +23,14 @@ void __weak sys_clock_isr(void *arg)
|
|||
__ASSERT_NO_MSG(false);
|
||||
}
|
||||
|
||||
int __weak sys_clock_driver_init(const struct device *device)
|
||||
int __weak sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __weak sys_clock_device_ctrl(const struct device *device,
|
||||
int __weak sys_clock_device_ctrl(const struct device *dev,
|
||||
uint32_t ctrl_command,
|
||||
void *context, device_pm_cb cb, void *arg)
|
||||
{
|
||||
|
|
|
@ -96,9 +96,10 @@ static void ttc_isr(const void *arg)
|
|||
sys_clock_announce(ticks);
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
uint32_t reg_val;
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
/* Stop timer */
|
||||
sys_write32(XTTCPS_CNT_CNTRL_DIS_MASK,
|
||||
|
|
|
@ -56,9 +56,9 @@ static void ccompare_isr(const void *arg)
|
|||
sys_clock_announce(IS_ENABLED(CONFIG_TICKLESS_KERNEL) ? dticks : 1);
|
||||
}
|
||||
|
||||
int sys_clock_driver_init(const struct device *device)
|
||||
int sys_clock_driver_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
IRQ_CONNECT(TIMER_IRQ, 0, ccompare_isr, 0, 0);
|
||||
set_ccompare(ccount() + CYC_PER_TICK);
|
||||
|
|
|
@ -1040,7 +1040,7 @@ static int winc1500_mgmt_connect(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int winc1500_mgmt_disconnect(const struct device *device)
|
||||
static int winc1500_mgmt_disconnect(const struct device *dev)
|
||||
{
|
||||
if (!w1500_data.connected) {
|
||||
return -EALREADY;
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
|
||||
/** @cond INTERNAL_HIDDEN */
|
||||
struct device;
|
||||
void gsm_ppp_start(const struct device *device);
|
||||
void gsm_ppp_stop(const struct device *device);
|
||||
void gsm_ppp_start(const struct device *dev);
|
||||
void gsm_ppp_stop(const struct device *dev);
|
||||
/** @endcond */
|
||||
|
||||
#endif /* GSM_PPP_H_ */
|
||||
|
|
|
@ -36,7 +36,7 @@ extern "C" {
|
|||
* initialization callback. It is a weak symbol that will be
|
||||
* implemented as a noop if undefined in the clock driver.
|
||||
*/
|
||||
extern int sys_clock_driver_init(const struct device *device);
|
||||
extern int sys_clock_driver_init(const struct device *dev);
|
||||
|
||||
/**
|
||||
* @brief Initialize system clock driver
|
||||
|
@ -46,7 +46,7 @@ extern int sys_clock_driver_init(const struct device *device);
|
|||
* management. It is a weak symbol that will be implemented as a noop
|
||||
* if undefined in the clock driver.
|
||||
*/
|
||||
extern int clock_device_ctrl(const struct device *device,
|
||||
extern int clock_device_ctrl(const struct device *dev,
|
||||
uint32_t ctrl_command,
|
||||
void *context, device_pm_cb cb, void *arg);
|
||||
|
||||
|
|
|
@ -87,14 +87,14 @@ int net_config_init_by_iface(struct net_if *iface, const char *app_info,
|
|||
* the config option and call the function manually when the
|
||||
* application starts.
|
||||
*
|
||||
* @param device Network device to use. The function will figure out what
|
||||
* @param dev Network device to use. The function will figure out what
|
||||
* network interface to use based on the device. If the device is NULL,
|
||||
* then default network interface is used by the function.
|
||||
* @param app_info String describing this application.
|
||||
*
|
||||
* @return 0 if ok, <0 if error.
|
||||
*/
|
||||
int net_config_init_app(const struct device *device, const char *app_info);
|
||||
int net_config_init_app(const struct device *dev, const char *app_info);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
|
@ -66,7 +66,7 @@ static struct rpmsg_endpoint rcv_ept;
|
|||
static K_SEM_DEFINE(data_sem, 0, 1);
|
||||
static K_SEM_DEFINE(data_rx_sem, 0, 1);
|
||||
|
||||
static void platform_ipm_callback(const struct device *device, void *context,
|
||||
static void platform_ipm_callback(const struct device *dev, void *context,
|
||||
uint32_t id, volatile void *data)
|
||||
{
|
||||
LOG_DBG("%s: msg received from mb %d\n", __func__, id);
|
||||
|
|
|
@ -651,9 +651,9 @@ ipv4_out:
|
|||
return !ok;
|
||||
}
|
||||
|
||||
static int llmnr_responder_init(const struct device *device)
|
||||
static int llmnr_responder_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return init_listener();
|
||||
}
|
||||
|
|
|
@ -603,9 +603,9 @@ ipv4_out:
|
|||
return !ok;
|
||||
}
|
||||
|
||||
static int mdns_responder_init(const struct device *device)
|
||||
static int mdns_responder_init(const struct device *dev)
|
||||
{
|
||||
ARG_UNUSED(device);
|
||||
ARG_UNUSED(dev);
|
||||
|
||||
return init_listener();
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ const struct foo_single_config_info foo0_config = {
|
|||
DEVICE_MMIO_ROM_INIT(DT_DRV_INST(0)),
|
||||
};
|
||||
|
||||
int foo_single_init(const struct device *device)
|
||||
int foo_single_init(const struct device *dev)
|
||||
{
|
||||
DEVICE_MMIO_MAP(device, K_MEM_CACHE_NONE);
|
||||
DEVICE_MMIO_MAP(dev, K_MEM_CACHE_NONE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -122,10 +122,10 @@ const struct foo_mult_config_info foo12_config = {
|
|||
#define DEV_DATA(dev) ((struct foo_mult_dev_data *)((dev)->data))
|
||||
#define DEV_CFG(dev) ((struct foo_mult_config_info *)((dev)->config))
|
||||
|
||||
int foo_mult_init(const struct device *device)
|
||||
int foo_mult_init(const struct device *dev)
|
||||
{
|
||||
DEVICE_MMIO_NAMED_MAP(device, courge, K_MEM_CACHE_NONE);
|
||||
DEVICE_MMIO_NAMED_MAP(device, grault, K_MEM_CACHE_NONE);
|
||||
DEVICE_MMIO_NAMED_MAP(dev, courge, K_MEM_CACHE_NONE);
|
||||
DEVICE_MMIO_NAMED_MAP(dev, grault, K_MEM_CACHE_NONE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue