device: Apply config_info rename everywhere

Via coccinelle:

@r_device_config@
struct device *D;
@@

D->
-	config_info
+	config

And 2 grep/sed rules for macros:

git grep -rlz 'dev)->config_info' |
	xargs -0 sed -i 's/dev)->config_info/dev)->config/g'

git grep -rlz 'dev->config_info' |
	xargs -0 sed -i 's/dev->config_info/dev->config/g'

Fixes #27397

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2020-05-28 20:44:16 +02:00 committed by Carles Cufí
parent a46b4a9921
commit af6140cc0d
324 changed files with 1048 additions and 1071 deletions

View file

@ -18,7 +18,7 @@ struct pwr_ctrl_cfg {
static int pwr_ctrl_init(struct device *dev)
{
const struct pwr_ctrl_cfg *cfg = dev->config_info;
const struct pwr_ctrl_cfg *cfg = dev->config;
struct device *gpio;
gpio = device_get_binding(cfg->port);

View file

@ -520,7 +520,7 @@ For example:
}
#define DEV_CFG(_dev) \
((const struct my_driver_config *)((_dev)->config_info))
((const struct my_driver_config *)((_dev)->config))
#define DEV_DATA(_dev) \
((struct my_driver_dev_data *)((_dev)->driver_data))

View file

@ -176,7 +176,7 @@ static inline uint8_t lmp90xxx_inst2_sz(size_t len)
static int lmp90xxx_read_reg(struct device *dev, uint8_t addr, uint8_t *dptr,
size_t len)
{
const struct lmp90xxx_config *config = dev->config_info;
const struct lmp90xxx_config *config = dev->config;
struct lmp90xxx_data *data = dev->driver_data;
uint8_t ura = LMP90XXX_URA(addr);
uint8_t inst1_uab[2] = { LMP90XXX_INST1_WAB, ura };
@ -250,7 +250,7 @@ static int lmp90xxx_read_reg8(struct device *dev, uint8_t addr, uint8_t *val)
static int lmp90xxx_write_reg(struct device *dev, uint8_t addr, uint8_t *dptr,
size_t len)
{
const struct lmp90xxx_config *config = dev->config_info;
const struct lmp90xxx_config *config = dev->config;
struct lmp90xxx_data *data = dev->driver_data;
uint8_t ura = LMP90XXX_URA(addr);
uint8_t inst1_uab[2] = { LMP90XXX_INST1_WAB, ura };
@ -328,7 +328,7 @@ static int lmp90xxx_soft_reset(struct device *dev)
static inline bool lmp90xxx_has_channel(struct device *dev, uint8_t channel)
{
const struct lmp90xxx_config *config = dev->config_info;
const struct lmp90xxx_config *config = dev->config;
if (channel >= config->channels) {
return false;
@ -339,7 +339,7 @@ static inline bool lmp90xxx_has_channel(struct device *dev, uint8_t channel)
static inline bool lmp90xxx_has_input(struct device *dev, uint8_t input)
{
const struct lmp90xxx_config *config = dev->config_info;
const struct lmp90xxx_config *config = dev->config;
if (input >= LMP90XXX_MAX_INPUTS) {
return false;
@ -497,7 +497,7 @@ static int lmp90xxx_validate_buffer_size(const struct adc_sequence *sequence)
static int lmp90xxx_adc_start_read(struct device *dev,
const struct adc_sequence *sequence)
{
const struct lmp90xxx_config *config = dev->config_info;
const struct lmp90xxx_config *config = dev->config;
struct lmp90xxx_data *data = dev->driver_data;
int err;
@ -570,7 +570,7 @@ static void adc_context_update_buffer_pointer(struct adc_context *ctx,
static int lmp90xxx_adc_read_channel(struct device *dev, uint8_t channel,
int32_t *result)
{
const struct lmp90xxx_config *config = dev->config_info;
const struct lmp90xxx_config *config = dev->config;
struct lmp90xxx_data *data = dev->driver_data;
uint8_t adc_done;
uint8_t ch_scan;
@ -914,7 +914,7 @@ int lmp90xxx_gpio_port_toggle_bits(struct device *dev, gpio_port_pins_t pins)
static int lmp90xxx_init(struct device *dev)
{
const struct lmp90xxx_config *config = dev->config_info;
const struct lmp90xxx_config *config = dev->config;
struct lmp90xxx_data *data = dev->driver_data;
struct device *drdyb_dev;
k_tid_t tid;

View file

@ -52,7 +52,7 @@ struct mcp320x_data {
static int mcp320x_channel_setup(struct device *dev,
const struct adc_channel_cfg *channel_cfg)
{
const struct mcp320x_config *config = dev->config_info;
const struct mcp320x_config *config = dev->config;
struct mcp320x_data *data = dev->driver_data;
if (channel_cfg->gain != ADC_GAIN_1) {
@ -86,7 +86,7 @@ static int mcp320x_channel_setup(struct device *dev,
static int mcp320x_validate_buffer_size(struct device *dev,
const struct adc_sequence *sequence)
{
const struct mcp320x_config *config = dev->config_info;
const struct mcp320x_config *config = dev->config;
uint8_t channels = 0;
size_t needed;
uint32_t mask;
@ -112,7 +112,7 @@ static int mcp320x_validate_buffer_size(struct device *dev,
static int mcp320x_start_read(struct device *dev,
const struct adc_sequence *sequence)
{
const struct mcp320x_config *config = dev->config_info;
const struct mcp320x_config *config = dev->config;
struct mcp320x_data *data = dev->driver_data;
int err;
@ -181,7 +181,7 @@ static void adc_context_update_buffer_pointer(struct adc_context *ctx,
static int mcp320x_read_channel(struct device *dev, uint8_t channel, uint16_t *result)
{
const struct mcp320x_config *config = dev->config_info;
const struct mcp320x_config *config = dev->config;
struct mcp320x_data *data = dev->driver_data;
uint8_t tx_bytes[2];
uint8_t rx_bytes[2];
@ -273,7 +273,7 @@ static void mcp320x_acquisition_thread(struct device *dev)
static int mcp320x_init(struct device *dev)
{
const struct mcp320x_config *config = dev->config_info;
const struct mcp320x_config *config = dev->config;
struct mcp320x_data *data = dev->driver_data;
k_sem_init(&data->sem, 0, 1);

View file

@ -73,7 +73,7 @@ static int mcux_adc12_channel_setup(struct device *dev,
static int mcux_adc12_start_read(struct device *dev,
const struct adc_sequence *sequence)
{
const struct mcux_adc12_config *config = dev->config_info;
const struct mcux_adc12_config *config = dev->config;
struct mcux_adc12_data *data = dev->driver_data;
adc12_hardware_average_mode_t mode;
adc12_resolution_t resolution;
@ -152,7 +152,7 @@ static int mcux_adc12_read(struct device *dev,
static void mcux_adc12_start_channel(struct device *dev)
{
const struct mcux_adc12_config *config = dev->config_info;
const struct mcux_adc12_config *config = dev->config;
struct mcux_adc12_data *data = dev->driver_data;
adc12_channel_config_t channel_config;
@ -191,7 +191,7 @@ static void adc_context_update_buffer_pointer(struct adc_context *ctx,
static void mcux_adc12_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct mcux_adc12_config *config = dev->config_info;
const struct mcux_adc12_config *config = dev->config;
struct mcux_adc12_data *data = dev->driver_data;
ADC_Type *base = config->base;
uint32_t channel_group = 0U;
@ -213,7 +213,7 @@ static void mcux_adc12_isr(void *arg)
static int mcux_adc12_init(struct device *dev)
{
const struct mcux_adc12_config *config = dev->config_info;
const struct mcux_adc12_config *config = dev->config;
struct mcux_adc12_data *data = dev->driver_data;
ADC_Type *base = config->base;
adc12_config_t adc_config;

View file

@ -66,7 +66,7 @@ static int mcux_adc16_channel_setup(struct device *dev,
static int start_read(struct device *dev, const struct adc_sequence *sequence)
{
const struct mcux_adc16_config *config = dev->config_info;
const struct mcux_adc16_config *config = dev->config;
struct mcux_adc16_data *data = dev->driver_data;
adc16_hardware_average_mode_t mode;
adc16_resolution_t resolution;
@ -162,7 +162,7 @@ static int mcux_adc16_read_async(struct device *dev,
static void mcux_adc16_start_channel(struct device *dev)
{
const struct mcux_adc16_config *config = dev->config_info;
const struct mcux_adc16_config *config = dev->config;
struct mcux_adc16_data *data = dev->driver_data;
adc16_channel_config_t channel_config;
@ -205,7 +205,7 @@ static void adc_context_update_buffer_pointer(struct adc_context *ctx,
static void mcux_adc16_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct mcux_adc16_config *config = dev->config_info;
const struct mcux_adc16_config *config = dev->config;
struct mcux_adc16_data *data = dev->driver_data;
ADC_Type *base = config->base;
uint32_t channel_group = 0U;
@ -227,7 +227,7 @@ static void mcux_adc16_isr(void *arg)
static int mcux_adc16_init(struct device *dev)
{
const struct mcux_adc16_config *config = dev->config_info;
const struct mcux_adc16_config *config = dev->config;
struct mcux_adc16_data *data = dev->driver_data;
ADC_Type *base = config->base;
adc16_config_t adc_config;

View file

@ -59,7 +59,7 @@ struct adc_sam0_cfg {
};
#define DEV_CFG(dev) \
((const struct adc_sam0_cfg *const)(dev)->config_info)
((const struct adc_sam0_cfg *const)(dev)->config)
#define DEV_DATA(dev) \
((struct adc_sam0_data *)(dev)->driver_data)

View file

@ -63,7 +63,7 @@ struct adc_sam_cfg {
};
#define DEV_CFG(dev) \
((const struct adc_sam_cfg *const)(dev)->config_info)
((const struct adc_sam_cfg *const)(dev)->config)
#define DEV_DATA(dev) \
((struct adc_sam_data *)(dev)->driver_data)

View file

@ -245,7 +245,7 @@ static int check_buffer_size(const struct adc_sequence *sequence,
static void adc_stm32_start_conversion(struct device *dev)
{
const struct adc_stm32_cfg *config = dev->config_info;
const struct adc_stm32_cfg *config = dev->config;
ADC_TypeDef *adc = (ADC_TypeDef *)config->base;
LOG_DBG("Starting conversion");
@ -265,7 +265,7 @@ static void adc_stm32_start_conversion(struct device *dev)
static int start_read(struct device *dev, const struct adc_sequence *sequence)
{
const struct adc_stm32_cfg *config = dev->config_info;
const struct adc_stm32_cfg *config = dev->config;
struct adc_stm32_data *data = dev->driver_data;
ADC_TypeDef *adc = (ADC_TypeDef *)config->base;
uint8_t resolution;
@ -390,7 +390,7 @@ static void adc_stm32_isr(void *arg)
struct device *dev = (struct device *)arg;
struct adc_stm32_data *data = (struct adc_stm32_data *)dev->driver_data;
const struct adc_stm32_cfg *config =
(const struct adc_stm32_cfg *)dev->config_info;
(const struct adc_stm32_cfg *)dev->config;
ADC_TypeDef *adc = config->base;
*data->buffer++ = LL_ADC_REG_ReadConversionData32(adc);
@ -450,7 +450,7 @@ static void adc_stm32_setup_speed(struct device *dev, uint8_t id,
uint8_t acq_time_index)
{
const struct adc_stm32_cfg *config =
(const struct adc_stm32_cfg *)dev->config_info;
(const struct adc_stm32_cfg *)dev->config;
ADC_TypeDef *adc = config->base;
#if defined(CONFIG_SOC_SERIES_STM32F0X) || defined(CONFIG_SOC_SERIES_STM32L0X)
@ -523,7 +523,7 @@ static int adc_stm32_channel_setup(struct device *dev,
static void adc_stm32_calib(struct device *dev)
{
const struct adc_stm32_cfg *config =
(const struct adc_stm32_cfg *)dev->config_info;
(const struct adc_stm32_cfg *)dev->config;
ADC_TypeDef *adc = config->base;
#if defined(CONFIG_SOC_SERIES_STM32F3X) || \
@ -545,7 +545,7 @@ static void adc_stm32_calib(struct device *dev)
static int adc_stm32_init(struct device *dev)
{
struct adc_stm32_data *data = dev->driver_data;
const struct adc_stm32_cfg *config = dev->config_info;
const struct adc_stm32_cfg *config = dev->config;
struct device *clk =
device_get_binding(STM32_CLOCK_CONTROL_NAME);
ADC_TypeDef *adc = (ADC_TypeDef *)config->base;

View file

@ -20,7 +20,7 @@ extern "C" {
#define MPXXDTYY_MAX_PDM_FREQ 3250000 /* 3.25MHz */
#define DEV_CFG(dev) \
((const struct mpxxdtyy_config *const)(dev)->config_info)
((const struct mpxxdtyy_config *const)(dev)->config)
#define DEV_DATA(dev) \
((struct mpxxdtyy_data *const)(dev)->driver_data)

View file

@ -51,7 +51,7 @@ static struct codec_driver_config codec_device_config = {
static struct codec_driver_data codec_device_data;
#define DEV_CFG(dev) \
((struct codec_driver_config *const)(dev)->config_info)
((struct codec_driver_config *const)(dev)->config)
#define DEV_DATA(dev) \
((struct codec_driver_data *const)(dev)->driver_data)

View file

@ -12,7 +12,7 @@
#define DEV_DATA(dev) ((struct can_loopback_data *const)(dev)->driver_data)
#define DEV_CFG(dev) \
((const struct can_loopback_config *const)(dev)->config_info)
((const struct can_loopback_config *const)(dev)->config)
struct can_loopback_filter {
can_rx_callback_t rx_cb;

View file

@ -15,7 +15,7 @@
#define MCP2515_FRAME_LEN 13
#define DEV_CFG(dev) \
((const struct mcp2515_config *const)(dev)->config_info)
((const struct mcp2515_config *const)(dev)->config)
#define DEV_DATA(dev) ((struct mcp2515_data *const)(dev)->driver_data)
struct mcp2515_tx_cb {

View file

@ -95,7 +95,7 @@ struct mcux_flexcan_data {
static int mcux_flexcan_configure(struct device *dev, enum can_mode mode,
uint32_t bitrate)
{
const struct mcux_flexcan_config *config = dev->config_info;
const struct mcux_flexcan_config *config = dev->config;
flexcan_config_t flexcan_config;
struct device *clock_dev;
uint32_t clock_freq;
@ -249,7 +249,7 @@ static int mcux_flexcan_send(struct device *dev, const struct zcan_frame *msg,
k_timeout_t timeout,
can_tx_callback_t callback_isr, void *callback_arg)
{
const struct mcux_flexcan_config *config = dev->config_info;
const struct mcux_flexcan_config *config = dev->config;
struct mcux_flexcan_data *data = dev->driver_data;
flexcan_mb_transfer_t xfer;
status_t status;
@ -299,7 +299,7 @@ static int mcux_flexcan_attach_isr(struct device *dev, can_rx_callback_t isr,
void *callback_arg,
const struct zcan_filter *filter)
{
const struct mcux_flexcan_config *config = dev->config_info;
const struct mcux_flexcan_config *config = dev->config;
struct mcux_flexcan_data *data = dev->driver_data;
flexcan_mb_transfer_t xfer;
status_t status;
@ -361,7 +361,7 @@ static void mcux_flexcan_register_state_change_isr(struct device *dev,
static enum can_state mcux_flexcan_get_state(struct device *dev,
struct can_bus_err_cnt *err_cnt)
{
const struct mcux_flexcan_config *config = dev->config_info;
const struct mcux_flexcan_config *config = dev->config;
uint32_t status_flags;
if (err_cnt) {
@ -386,7 +386,7 @@ static enum can_state mcux_flexcan_get_state(struct device *dev,
#ifndef CONFIG_CAN_AUTO_BUS_OFF_RECOVERY
int mcux_flexcan_recover(struct device *dev, k_timeout_t timeout)
{
const struct mcux_flexcan_config *config = dev->config_info;
const struct mcux_flexcan_config *config = dev->config;
int ret = 0;
uint64_t start_time;
@ -414,7 +414,7 @@ int mcux_flexcan_recover(struct device *dev, k_timeout_t timeout)
static void mcux_flexcan_detach(struct device *dev, int filter_id)
{
const struct mcux_flexcan_config *config = dev->config_info;
const struct mcux_flexcan_config *config = dev->config;
struct mcux_flexcan_data *data = dev->driver_data;
if (filter_id >= MCUX_FLEXCAN_MAX_RX) {
@ -443,7 +443,7 @@ static void mcux_flexcan_detach(struct device *dev, int filter_id)
static inline void mcux_flexcan_transfer_error_status(struct device *dev,
uint32_t error)
{
const struct mcux_flexcan_config *config = dev->config_info;
const struct mcux_flexcan_config *config = dev->config;
struct mcux_flexcan_data *data = dev->driver_data;
can_tx_callback_t function;
int status = CAN_TX_OK;
@ -545,7 +545,7 @@ static inline void mcux_flexcan_transfer_tx_idle(struct device *dev,
static inline void mcux_flexcan_transfer_rx_idle(struct device *dev,
uint32_t mb)
{
const struct mcux_flexcan_config *config = dev->config_info;
const struct mcux_flexcan_config *config = dev->config;
struct mcux_flexcan_data *data = dev->driver_data;
can_rx_callback_t function;
flexcan_mb_transfer_t xfer;
@ -610,7 +610,7 @@ static void mcux_flexcan_transfer_callback(CAN_Type *base,
static void mcux_flexcan_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct mcux_flexcan_config *config = dev->config_info;
const struct mcux_flexcan_config *config = dev->config;
struct mcux_flexcan_data *data = dev->driver_data;
FLEXCAN_TransferHandleIRQ(config->base, &data->handle);
@ -618,7 +618,7 @@ static void mcux_flexcan_isr(void *arg)
static int mcux_flexcan_init(struct device *dev)
{
const struct mcux_flexcan_config *config = dev->config_info;
const struct mcux_flexcan_config *config = dev->config;
struct mcux_flexcan_data *data = dev->driver_data;
int err;
int i;

View file

@ -12,7 +12,7 @@
#define DEV_DATA(dev) ((struct can_stm32_data *const)(dev)->driver_data)
#define DEV_CFG(dev) \
((const struct can_stm32_config *const)(dev)->config_info)
((const struct can_stm32_config *const)(dev)->config)
#define BIT_SEG_LENGTH(cfg) ((cfg)->prop_ts1 + (cfg)->ts2 + 1)

View file

@ -133,7 +133,7 @@ static int beetle_clock_control_get_subsys_rate(struct device *clock,
{
#ifdef CONFIG_CLOCK_CONTROL_BEETLE_ENABLE_PLL
const struct beetle_clock_control_cfg_t * const cfg =
clock->config_info;
clock->config;
uint32_t nc_mainclk = beetle_round_freq(cfg->freq);
*rate = nc_mainclk;
@ -219,7 +219,7 @@ static int beetle_clock_control_init(struct device *dev)
{
#ifdef CONFIG_CLOCK_CONTROL_BEETLE_ENABLE_PLL
const struct beetle_clock_control_cfg_t * const cfg =
dev->config_info;
dev->config;
/*
* Enable PLL if Beetle is configured to run at a different

View file

@ -58,7 +58,7 @@ struct pll_cfg {
#define DPORT_CPUPERIOD_SEL_160 1
#define DPORT_CPUPERIOD_SEL_240 2
#define DEV_CFG(dev) ((struct esp32_clock_config *)(dev->config_info))
#define DEV_CFG(dev) ((struct esp32_clock_config *)(dev->config))
#define GET_REG_BANK(module_id) ((uint32_t)module_id / 32U)
#define GET_REG_OFFSET(module_id) ((uint32_t)module_id % 32U)

View file

@ -15,7 +15,7 @@
#include "clock_control_lpc11u6x.h"
#define DEV_CFG(dev) ((const struct lpc11u6x_syscon_config *) \
((dev)->config_info))
((dev)->config))
#define DEV_DATA(dev) ((struct lpc11u6x_syscon_data *) \
((dev)->driver_data))

View file

@ -22,7 +22,7 @@ struct mcux_pcc_config {
uint32_t base_address;
};
#define DEV_CFG(dev) ((struct mcux_pcc_config *)(dev->config_info))
#define DEV_CFG(dev) ((struct mcux_pcc_config *)(dev->config))
#define DEV_BASE(dev) (DEV_CFG(dev)->base_address)
#ifndef MAKE_PCC_REGADDR
#define MAKE_PCC_REGADDR(base, offset) ((base) + (offset))

View file

@ -18,7 +18,7 @@ struct rv32m1_pcc_config {
uint32_t base_address;
};
#define DEV_CFG(dev) ((struct rv32m1_pcc_config *)(dev->config_info))
#define DEV_CFG(dev) ((struct rv32m1_pcc_config *)(dev->config))
#define DEV_BASE(dev) (DEV_CFG(dev)->base_address)
static inline clock_ip_name_t clock_ip(struct device *dev,

View file

@ -119,7 +119,7 @@ static const struct nrf_clock_control_sub_config *get_sub_config(
enum clock_control_nrf_type type)
{
const struct nrf_clock_control_config *config =
dev->config_info;
dev->config;
return &config->subsys[type];
}

View file

@ -28,7 +28,7 @@ static void ipm_console_thread(void *arg1, void *arg2, void *arg3)
d = (struct device *)arg1;
driver_data = d->driver_data;
config_info = d->config_info;
config_info = d->config;
ARG_UNUSED(arg2);
size32 = 0U;
pos = 0;
@ -118,7 +118,7 @@ static void ipm_console_receive_callback(struct device *ipm_dev, void *context,
int ipm_console_receiver_init(struct device *d)
{
const struct ipm_console_receiver_config_info *config_info =
d->config_info;
d->config;
struct ipm_console_receiver_runtime_data *driver_data = d->driver_data;
struct device *ipm;

View file

@ -37,7 +37,7 @@ int ipm_console_sender_init(struct device *d)
{
const struct ipm_console_sender_config_info *config_info;
config_info = d->config_info;
config_info = d->config;
ipm_console_device = device_get_binding(config_info->bind_to);
if (!ipm_console_device) {

View file

@ -234,7 +234,7 @@ static int uart_mux_init(struct device *dev)
k_work_init(&dev_data->cb_work, uart_mux_cb_work);
LOG_DBG("Device %s dev %p dev_data %p cfg %p created",
dev->name, dev, dev_data, dev->config_info);
dev->name, dev, dev_data, dev->config);
return 0;
}

View file

@ -41,7 +41,7 @@ struct counter_gecko_data {
#define DEV_NAME(dev) ((dev)->name)
#define DEV_CFG(dev) \
((const struct counter_gecko_config * const)(dev)->config_info)
((const struct counter_gecko_config * const)(dev)->config)
#define DEV_DATA(dev) \
((struct counter_gecko_data *const)(dev)->driver_data)

View file

@ -25,7 +25,7 @@ struct imx_epit_data {
static inline const struct imx_epit_config *get_epit_config(struct device *dev)
{
return CONTAINER_OF(dev->config_info, struct imx_epit_config,
return CONTAINER_OF(dev->config, struct imx_epit_config,
info);
}

View file

@ -58,7 +58,7 @@ struct rtc_stm32_data {
#define DEV_DATA(dev) ((struct rtc_stm32_data *)(dev)->driver_data)
#define DEV_CFG(dev) \
((const struct rtc_stm32_config * const)(dev)->config_info)
((const struct rtc_stm32_config * const)(dev)->config)
static void rtc_stm32_irq_config(struct device *dev);
@ -215,7 +215,7 @@ static uint32_t rtc_stm32_get_pending_int(struct device *dev)
static uint32_t rtc_stm32_get_top_value(struct device *dev)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
return info->max_top_value;
}
@ -224,7 +224,7 @@ static uint32_t rtc_stm32_get_top_value(struct device *dev)
static int rtc_stm32_set_top_value(struct device *dev,
const struct counter_top_cfg *cfg)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
if ((cfg->ticks != info->max_top_value) ||
!(cfg->flags & COUNTER_TOP_CFG_DONT_RESET)) {
@ -239,7 +239,7 @@ static int rtc_stm32_set_top_value(struct device *dev,
static uint32_t rtc_stm32_get_max_relative_alarm(struct device *dev)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
return info->max_top_value;
}

View file

@ -48,11 +48,11 @@ struct counter_xec_data {
#define COUNTER_XEC_REG_BASE(_dev) \
((BTMR_Type *) \
((const struct counter_xec_config * const) \
_dev->config_info)->base_address)
_dev->config)->base_address)
#define COUNTER_XEC_CONFIG(_dev) \
(((const struct counter_xec_config * const) \
_dev->config_info))
_dev->config))
#define COUNTER_XEC_DATA(_dev) \
((struct counter_xec_data *)dev->driver_data)

View file

@ -28,7 +28,7 @@ struct mcux_gpt_data {
static int mcux_gpt_start(struct device *dev)
{
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
GPT_StartTimer(config->base);
@ -37,7 +37,7 @@ static int mcux_gpt_start(struct device *dev)
static int mcux_gpt_stop(struct device *dev)
{
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
GPT_StopTimer(config->base);
@ -46,7 +46,7 @@ static int mcux_gpt_stop(struct device *dev)
static int mcux_gpt_get_value(struct device *dev, uint32_t *ticks)
{
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
*ticks = GPT_GetCurrentTimerCount(config->base);
return 0;
@ -55,7 +55,7 @@ static int mcux_gpt_get_value(struct device *dev, uint32_t *ticks)
static int mcux_gpt_set_alarm(struct device *dev, uint8_t chan_id,
const struct counter_alarm_cfg *alarm_cfg)
{
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
struct mcux_gpt_data *data = dev->driver_data;
uint32_t current = GPT_GetCurrentTimerCount(config->base);
@ -86,7 +86,7 @@ static int mcux_gpt_set_alarm(struct device *dev, uint8_t chan_id,
static int mcux_gpt_cancel_alarm(struct device *dev, uint8_t chan_id)
{
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
struct mcux_gpt_data *data = dev->driver_data;
if (chan_id != 0) {
@ -103,7 +103,7 @@ static int mcux_gpt_cancel_alarm(struct device *dev, uint8_t chan_id)
void mcux_gpt_isr(void *p)
{
struct device *dev = p;
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
struct mcux_gpt_data *data = dev->driver_data;
uint32_t current = GPT_GetCurrentTimerCount(config->base);
uint32_t status;
@ -128,7 +128,7 @@ void mcux_gpt_isr(void *p)
static uint32_t mcux_gpt_get_pending_int(struct device *dev)
{
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
return GPT_GetStatusFlags(config->base, kGPT_OutputCompare1Flag);
}
@ -136,7 +136,7 @@ static uint32_t mcux_gpt_get_pending_int(struct device *dev)
static int mcux_gpt_set_top_value(struct device *dev,
const struct counter_top_cfg *cfg)
{
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
struct mcux_gpt_data *data = dev->driver_data;
if (cfg->ticks != config->info.max_top_value) {
@ -155,21 +155,21 @@ static int mcux_gpt_set_top_value(struct device *dev,
static uint32_t mcux_gpt_get_top_value(struct device *dev)
{
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
return config->info.max_top_value;
}
static uint32_t mcux_gpt_get_max_relative_alarm(struct device *dev)
{
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
return config->info.max_top_value;
}
static int mcux_gpt_init(struct device *dev)
{
const struct mcux_gpt_config *config = dev->config_info;
const struct mcux_gpt_config *config = dev->config;
gpt_config_t gptConfig;
uint32_t clock_freq;

View file

@ -28,7 +28,7 @@ struct mcux_lptmr_data {
static int mcux_lptmr_start(struct device *dev)
{
const struct mcux_lptmr_config *config = dev->config_info;
const struct mcux_lptmr_config *config = dev->config;
LPTMR_EnableInterrupts(config->base,
kLPTMR_TimerInterruptEnable);
@ -39,7 +39,7 @@ static int mcux_lptmr_start(struct device *dev)
static int mcux_lptmr_stop(struct device *dev)
{
const struct mcux_lptmr_config *config = dev->config_info;
const struct mcux_lptmr_config *config = dev->config;
LPTMR_DisableInterrupts(config->base,
kLPTMR_TimerInterruptEnable);
@ -50,7 +50,7 @@ static int mcux_lptmr_stop(struct device *dev)
static int mcux_lptmr_get_value(struct device *dev, uint32_t *ticks)
{
const struct mcux_lptmr_config *config = dev->config_info;
const struct mcux_lptmr_config *config = dev->config;
*ticks = LPTMR_GetCurrentTimerCount(config->base);
@ -60,7 +60,7 @@ static int mcux_lptmr_get_value(struct device *dev, uint32_t *ticks)
static int mcux_lptmr_set_top_value(struct device *dev,
const struct counter_top_cfg *cfg)
{
const struct mcux_lptmr_config *config = dev->config_info;
const struct mcux_lptmr_config *config = dev->config;
struct mcux_lptmr_data *data = dev->driver_data;
if (cfg->ticks == 0) {
@ -87,7 +87,7 @@ static int mcux_lptmr_set_top_value(struct device *dev,
static uint32_t mcux_lptmr_get_pending_int(struct device *dev)
{
const struct mcux_lptmr_config *config = dev->config_info;
const struct mcux_lptmr_config *config = dev->config;
uint32_t mask = LPTMR_CSR_TCF_MASK | LPTMR_CSR_TIE_MASK;
uint32_t flags;
@ -98,7 +98,7 @@ static uint32_t mcux_lptmr_get_pending_int(struct device *dev)
static uint32_t mcux_lptmr_get_top_value(struct device *dev)
{
const struct mcux_lptmr_config *config = dev->config_info;
const struct mcux_lptmr_config *config = dev->config;
return (config->base->CMR & LPTMR_CMR_COMPARE_MASK) + 1U;
}
@ -114,7 +114,7 @@ static uint32_t mcux_lptmr_get_max_relative_alarm(struct device *dev)
static void mcux_lptmr_isr(void *arg)
{
struct device *dev = arg;
const struct mcux_lptmr_config *config = dev->config_info;
const struct mcux_lptmr_config *config = dev->config;
struct mcux_lptmr_data *data = dev->driver_data;
uint32_t flags;
@ -128,7 +128,7 @@ static void mcux_lptmr_isr(void *arg)
static int mcux_lptmr_init(struct device *dev)
{
const struct mcux_lptmr_config *config = dev->config_info;
const struct mcux_lptmr_config *config = dev->config;
lptmr_config_t lptmr_config;
LPTMR_GetDefaultConfig(&lptmr_config);

View file

@ -28,7 +28,7 @@ struct mcux_rtc_config {
static int mcux_rtc_start(struct device *dev)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
const struct mcux_rtc_config *config =
CONTAINER_OF(info, struct mcux_rtc_config, info);
@ -43,7 +43,7 @@ static int mcux_rtc_start(struct device *dev)
static int mcux_rtc_stop(struct device *dev)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
const struct mcux_rtc_config *config =
CONTAINER_OF(info, struct mcux_rtc_config, info);
@ -61,7 +61,7 @@ static int mcux_rtc_stop(struct device *dev)
static uint32_t mcux_rtc_read(struct device *dev)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
const struct mcux_rtc_config *config =
CONTAINER_OF(info, struct mcux_rtc_config, info);
@ -90,7 +90,7 @@ static int mcux_rtc_get_value(struct device *dev, uint32_t *ticks)
static int mcux_rtc_set_alarm(struct device *dev, uint8_t chan_id,
const struct counter_alarm_cfg *alarm_cfg)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
const struct mcux_rtc_config *config =
CONTAINER_OF(info, struct mcux_rtc_config, info);
struct mcux_rtc_data *data = dev->driver_data;
@ -144,7 +144,7 @@ static int mcux_rtc_cancel_alarm(struct device *dev, uint8_t chan_id)
static int mcux_rtc_set_top_value(struct device *dev,
const struct counter_top_cfg *cfg)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
const struct mcux_rtc_config *config =
CONTAINER_OF(info, struct mcux_rtc_config, info);
struct mcux_rtc_data *data = dev->driver_data;
@ -168,7 +168,7 @@ static int mcux_rtc_set_top_value(struct device *dev,
static uint32_t mcux_rtc_get_pending_int(struct device *dev)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
const struct mcux_rtc_config *config =
CONTAINER_OF(info, struct mcux_rtc_config, info);
@ -177,14 +177,14 @@ static uint32_t mcux_rtc_get_pending_int(struct device *dev)
static uint32_t mcux_rtc_get_top_value(struct device *dev)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
return info->max_top_value;
}
static uint32_t mcux_rtc_get_max_relative_alarm(struct device *dev)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
return info->max_top_value;
}
@ -192,7 +192,7 @@ static uint32_t mcux_rtc_get_max_relative_alarm(struct device *dev)
static void mcux_rtc_isr(void *arg)
{
struct device *dev = arg;
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
const struct mcux_rtc_config *config =
CONTAINER_OF(info, struct mcux_rtc_config, info);
struct mcux_rtc_data *data = dev->driver_data;
@ -233,7 +233,7 @@ static void mcux_rtc_isr(void *arg)
static int mcux_rtc_init(struct device *dev)
{
const struct counter_config_info *info = dev->config_info;
const struct counter_config_info *info = dev->config;
const struct mcux_rtc_config *config =
CONTAINER_OF(info, struct mcux_rtc_config, info);
rtc_config_t rtc_config;

View file

@ -74,7 +74,7 @@ static inline struct counter_nrfx_data *get_dev_data(struct device *dev)
static inline const struct counter_nrfx_config *get_nrfx_config(
struct device *dev)
{
return CONTAINER_OF(dev->config_info,
return CONTAINER_OF(dev->config,
struct counter_nrfx_config, info);
}

View file

@ -58,7 +58,7 @@ static inline struct counter_nrfx_data *get_dev_data(struct device *dev)
static inline const struct counter_nrfx_config *get_nrfx_config(
struct device *dev)
{
return CONTAINER_OF(dev->config_info,
return CONTAINER_OF(dev->config,
struct counter_nrfx_config, info);
}

View file

@ -42,7 +42,7 @@ struct counter_sam0_tc32_config {
};
#define DEV_CFG(dev) ((const struct counter_sam0_tc32_config *const) \
(dev)->config_info)
(dev)->config)
#define DEV_DATA(dev) ((struct counter_sam0_tc32_data *const) \
(dev)->driver_data)

View file

@ -149,7 +149,7 @@ static int sc_ctrl(struct device *dev,
uint8_t clear)
{
struct ds3231_data *data = dev->driver_data;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
struct register_map *rp = &data->registers;
uint8_t ctrl = (rp->ctrl & ~clear) | set;
int rc = ctrl;
@ -201,7 +201,7 @@ static inline int rsc_stat(struct device *dev,
uint8_t const ign = MAXIM_DS3231_REG_STAT_OSF | MAXIM_DS3231_ALARM1
| MAXIM_DS3231_ALARM2;
struct ds3231_data *data = dev->driver_data;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
struct register_map *rp = &data->registers;
uint8_t addr = offsetof(struct register_map, ctrl_stat);
int rc;
@ -248,7 +248,7 @@ int maxim_ds3231_stat_update(struct device *dev,
static void validate_isw_monitoring(struct device *dev)
{
struct ds3231_data *data = dev->driver_data;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
const struct register_map *rp = &data->registers;
uint8_t isw_mon_req = 0;
@ -449,7 +449,7 @@ static uint32_t decode_rtc(struct ds3231_data *data)
static int update_registers(struct device *dev)
{
struct ds3231_data *data = dev->driver_data;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
uint32_t syncclock;
int rc;
uint8_t addr = 0;
@ -472,7 +472,7 @@ int maxim_ds3231_get_alarm(struct device *dev,
struct maxim_ds3231_alarm *cp)
{
struct ds3231_data *data = dev->driver_data;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
int rv = 0;
uint8_t addr;
uint8_t len;
@ -529,7 +529,7 @@ static int ds3231_counter_cancel_alarm(struct device *dev,
uint8_t id)
{
struct ds3231_data *data = dev->driver_data;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
int rv = 0;
if (id >= cfg->generic.channels) {
@ -557,7 +557,7 @@ static int set_alarm(struct device *dev,
const struct maxim_ds3231_alarm *cp)
{
struct ds3231_data *data = dev->driver_data;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
uint8_t addr;
uint8_t len;
@ -672,7 +672,7 @@ static void alarm_worker(struct k_work *work)
struct ds3231_data *data = CONTAINER_OF(work, struct ds3231_data,
alarm_work);
struct device *ds3231 = data->ds3231;
const struct ds3231_config *cfg = ds3231->config_info;
const struct ds3231_config *cfg = ds3231->config;
k_sem_take(&data->lock, K_FOREVER);
@ -751,7 +751,7 @@ static int read_time(struct device *dev,
time_t *time)
{
struct ds3231_data *data = dev->driver_data;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
uint8_t addr = 0;
int rc = i2c_write_read(data->i2c, cfg->addr,
@ -886,7 +886,7 @@ static void sync_prep_write(struct device *dev)
static void sync_finish_write(struct device *dev)
{
struct ds3231_data *data = dev->driver_data;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
time_t when = data->new_sp.rtc.tv_sec;
struct tm tm;
uint8_t buf[8];
@ -1118,7 +1118,7 @@ out:
static int ds3231_init(struct device *dev)
{
struct ds3231_data *data = dev->driver_data;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
struct device *i2c = device_get_binding(cfg->bus_name);
int rc;
@ -1215,7 +1215,7 @@ int ds3231_counter_set_alarm(struct device *dev,
{
struct ds3231_data *data = dev->driver_data;
const struct register_map *rp = &data->registers;
const struct ds3231_config *cfg = dev->config_info;
const struct ds3231_config *cfg = dev->config;
time_t when;
int rc = 0;

View file

@ -37,8 +37,7 @@ struct dtmr_cmsdk_apb_dev_data {
static int dtmr_cmsdk_apb_start(struct device *dev)
{
const struct dtmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
const struct dtmr_cmsdk_apb_cfg * const cfg = dev->config;
struct dtmr_cmsdk_apb_dev_data *data = dev->driver_data;
/* Set the timer reload to count */
@ -52,8 +51,7 @@ static int dtmr_cmsdk_apb_start(struct device *dev)
static int dtmr_cmsdk_apb_stop(struct device *dev)
{
const struct dtmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
const struct dtmr_cmsdk_apb_cfg * const cfg = dev->config;
/* Disable the dualtimer */
cfg->dtimer->timer1ctrl = 0x0;
@ -63,8 +61,7 @@ static int dtmr_cmsdk_apb_stop(struct device *dev)
static int dtmr_cmsdk_apb_get_value(struct device *dev, uint32_t *ticks)
{
const struct dtmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
const struct dtmr_cmsdk_apb_cfg * const cfg = dev->config;
struct dtmr_cmsdk_apb_dev_data *data = dev->driver_data;
*ticks = data->load - cfg->dtimer->timer1value;
@ -74,8 +71,7 @@ static int dtmr_cmsdk_apb_get_value(struct device *dev, uint32_t *ticks)
static int dtmr_cmsdk_apb_set_top_value(struct device *dev,
const struct counter_top_cfg *top_cfg)
{
const struct dtmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
const struct dtmr_cmsdk_apb_cfg * const cfg = dev->config;
struct dtmr_cmsdk_apb_dev_data *data = dev->driver_data;
data->top_callback = top_cfg->callback;
@ -117,8 +113,7 @@ static uint32_t dtmr_cmsdk_apb_get_top_value(struct device *dev)
static uint32_t dtmr_cmsdk_apb_get_pending_int(struct device *dev)
{
const struct dtmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
const struct dtmr_cmsdk_apb_cfg * const cfg = dev->config;
return cfg->dtimer->timer1ris;
}
@ -136,8 +131,7 @@ static void dtmr_cmsdk_apb_isr(void *arg)
{
struct device *dev = (struct device *)arg;
struct dtmr_cmsdk_apb_dev_data *data = dev->driver_data;
const struct dtmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
const struct dtmr_cmsdk_apb_cfg * const cfg = dev->config;
cfg->dtimer->timer1intclr = DUALTIMER_INTCLR;
if (data->top_callback) {
@ -147,8 +141,7 @@ static void dtmr_cmsdk_apb_isr(void *arg)
static int dtmr_cmsdk_apb_init(struct device *dev)
{
const struct dtmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
const struct dtmr_cmsdk_apb_cfg * const cfg = dev->config;
#ifdef CONFIG_CLOCK_CONTROL
/* Enable clock for subsystem */

View file

@ -39,7 +39,7 @@ struct tmr_cmsdk_apb_dev_data {
static int tmr_cmsdk_apb_start(struct device *dev)
{
const struct tmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
dev->config;
struct tmr_cmsdk_apb_dev_data *data = dev->driver_data;
/* Set the timer reload to count */
@ -53,7 +53,7 @@ static int tmr_cmsdk_apb_start(struct device *dev)
static int tmr_cmsdk_apb_stop(struct device *dev)
{
const struct tmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
dev->config;
/* Disable the timer */
cfg->timer->ctrl = 0x0;
@ -63,7 +63,7 @@ static int tmr_cmsdk_apb_stop(struct device *dev)
static int tmr_cmsdk_apb_get_value(struct device *dev, uint32_t *ticks)
{
const struct tmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
dev->config;
struct tmr_cmsdk_apb_dev_data *data = dev->driver_data;
/* Get Counter Value */
@ -75,7 +75,7 @@ static int tmr_cmsdk_apb_set_top_value(struct device *dev,
const struct counter_top_cfg *top_cfg)
{
const struct tmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
dev->config;
struct tmr_cmsdk_apb_dev_data *data = dev->driver_data;
/* Counter is always reset when top value is updated. */
@ -113,7 +113,7 @@ static uint32_t tmr_cmsdk_apb_get_top_value(struct device *dev)
static uint32_t tmr_cmsdk_apb_get_pending_int(struct device *dev)
{
const struct tmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
dev->config;
return cfg->timer->intstatus;
}
@ -132,7 +132,7 @@ static void tmr_cmsdk_apb_isr(void *arg)
struct device *dev = (struct device *)arg;
struct tmr_cmsdk_apb_dev_data *data = dev->driver_data;
const struct tmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
dev->config;
cfg->timer->intclear = TIMER_CTRL_INT_CLEAR;
if (data->top_callback) {
@ -143,7 +143,7 @@ static void tmr_cmsdk_apb_isr(void *arg)
static int tmr_cmsdk_apb_init(struct device *dev)
{
const struct tmr_cmsdk_apb_cfg * const cfg =
dev->config_info;
dev->config;
#ifdef CONFIG_CLOCK_CONTROL
/* Enable clock for subsystem */

View file

@ -44,7 +44,7 @@ static int ataes132a_send_command(struct device *dev, uint8_t opcode,
{
int retry_count = 0;
struct ataes132a_device_data *data = dev->driver_data;
const struct ataes132a_device_config *cfg = dev->config_info;
const struct ataes132a_device_config *cfg = dev->config;
uint8_t count;
uint8_t status;
uint8_t crc[2];
@ -167,7 +167,7 @@ static int ataes132a_send_command(struct device *dev, uint8_t opcode,
int ataes132a_init(struct device *dev)
{
struct ataes132a_device_data *ataes132a = dev->driver_data;
const struct ataes132a_device_config *cfg = dev->config_info;
const struct ataes132a_device_config *cfg = dev->config;
uint32_t i2c_cfg;
LOG_DBG("ATAES132A INIT");
@ -798,7 +798,7 @@ static int ataes132a_session_setup(struct device *dev, struct cipher_ctx *ctx,
{
uint8_t key_id = *((uint8_t *)ctx->key.handle);
struct ataes132a_device_data *data = dev->driver_data;
const struct ataes132a_device_config *cfg = dev->config_info;
const struct ataes132a_device_config *cfg = dev->config;
uint8_t config;
if (ataes132a_state[key_id].in_use) {

View file

@ -28,7 +28,7 @@ struct crypto_stm32_session {
};
#define CRYPTO_STM32_CFG(dev) \
((const struct crypto_stm32_config *const)(dev)->config_info)
((const struct crypto_stm32_config *const)(dev)->config)
#define CRYPTO_STM32_DATA(dev) \
((struct crypto_stm32_data *const)(dev)->driver_data)

View file

@ -27,7 +27,7 @@ struct mcux_dac_data {
static int mcux_dac_channel_setup(struct device *dev,
const struct dac_channel_cfg *channel_cfg)
{
const struct mcux_dac_config *config = dev->config_info;
const struct mcux_dac_config *config = dev->config;
struct mcux_dac_data *data = dev->driver_data;
dac_config_t dac_config;
@ -54,7 +54,7 @@ static int mcux_dac_channel_setup(struct device *dev,
static int mcux_dac_write_value(struct device *dev, uint8_t channel, uint32_t value)
{
const struct mcux_dac_config *config = dev->config_info;
const struct mcux_dac_config *config = dev->config;
struct mcux_dac_data *data = dev->driver_data;
if (!data->configured) {

View file

@ -28,7 +28,7 @@ struct mcux_dac32_data {
static int mcux_dac32_channel_setup(struct device *dev,
const struct dac_channel_cfg *channel_cfg)
{
const struct mcux_dac32_config *config = dev->config_info;
const struct mcux_dac32_config *config = dev->config;
struct mcux_dac32_data *data = dev->driver_data;
dac32_config_t dac32_config;
@ -59,7 +59,7 @@ static int mcux_dac32_channel_setup(struct device *dev,
static int mcux_dac32_write_value(struct device *dev, uint8_t channel, uint32_t value)
{
const struct mcux_dac32_config *config = dev->config_info;
const struct mcux_dac32_config *config = dev->config;
struct mcux_dac32_data *data = dev->driver_data;
if (!data->configured) {

View file

@ -28,7 +28,7 @@ struct dac_sam0_cfg {
uint8_t refsel;
};
#define DEV_CFG(dev) ((const struct dac_sam0_cfg *const)(dev)->config_info)
#define DEV_CFG(dev) ((const struct dac_sam0_cfg *const)(dev)->config)
/* Write to the DAC. */
static int dac_sam0_write_value(struct device *dev, uint8_t channel,

View file

@ -54,7 +54,7 @@ static int dac_stm32_write_value(struct device *dev,
uint8_t channel, uint32_t value)
{
struct dac_stm32_data *data = dev->driver_data;
const struct dac_stm32_cfg *cfg = dev->config_info;
const struct dac_stm32_cfg *cfg = dev->config;
if (channel - STM32_FIRST_CHANNEL >= data->channel_count ||
channel < STM32_FIRST_CHANNEL) {
@ -77,7 +77,7 @@ static int dac_stm32_channel_setup(struct device *dev,
const struct dac_channel_cfg *channel_cfg)
{
struct dac_stm32_data *data = dev->driver_data;
const struct dac_stm32_cfg *cfg = dev->config_info;
const struct dac_stm32_cfg *cfg = dev->config;
if ((channel_cfg->channel_id - STM32_FIRST_CHANNEL >=
data->channel_count) ||
@ -109,7 +109,7 @@ static int dac_stm32_channel_setup(struct device *dev,
static int dac_stm32_init(struct device *dev)
{
const struct dac_stm32_cfg *cfg = dev->config_info;
const struct dac_stm32_cfg *cfg = dev->config;
/* enable clock for subsystem */
struct device *clk =

View file

@ -44,7 +44,7 @@ static int mcux_elcdif_write(const struct device *dev, const uint16_t x,
const struct display_buffer_descriptor *desc,
const void *buf)
{
const struct mcux_elcdif_config *config = dev->config_info;
const struct mcux_elcdif_config *config = dev->config;
struct mcux_elcdif_data *data = dev->driver_data;
uint8_t write_idx = data->write_idx;
@ -132,7 +132,7 @@ static int mcux_elcdif_set_pixel_format(const struct device *dev,
const enum display_pixel_format
pixel_format)
{
const struct mcux_elcdif_config *config = dev->config_info;
const struct mcux_elcdif_config *config = dev->config;
if (pixel_format == config->pixel_format) {
return 0;
@ -154,7 +154,7 @@ static int mcux_elcdif_set_orientation(const struct device *dev,
static void mcux_elcdif_get_capabilities(const struct device *dev,
struct display_capabilities *capabilities)
{
const struct mcux_elcdif_config *config = dev->config_info;
const struct mcux_elcdif_config *config = dev->config;
memset(capabilities, 0, sizeof(struct display_capabilities));
capabilities->x_resolution = config->rgb_mode.panelWidth;
@ -167,7 +167,7 @@ static void mcux_elcdif_get_capabilities(const struct device *dev,
static void mcux_elcdif_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct mcux_elcdif_config *config = dev->config_info;
const struct mcux_elcdif_config *config = dev->config;
struct mcux_elcdif_data *data = dev->driver_data;
uint32_t status;
@ -179,7 +179,7 @@ static void mcux_elcdif_isr(void *arg)
static int mcux_elcdif_init(struct device *dev)
{
const struct mcux_elcdif_config *config = dev->config_info;
const struct mcux_elcdif_config *config = dev->config;
struct mcux_elcdif_data *data = dev->driver_data;
int i;

View file

@ -105,7 +105,7 @@ static inline void sleep(uint32_t sleep_in_ms)
void glcd_print(struct device *port, char *data, uint32_t size)
{
const struct glcd_driver * const rom = (const struct glcd_driver *)
port->config_info;
port->config;
struct glcd_data *dev = port->driver_data;
uint8_t buf[] = { GLCD_CMD_SET_CGRAM_ADDR, 0 };
int i;
@ -120,7 +120,7 @@ void glcd_print(struct device *port, char *data, uint32_t size)
void glcd_cursor_pos_set(struct device *port, uint8_t col, uint8_t row)
{
const struct glcd_driver * const rom = (const struct glcd_driver *)
port->config_info;
port->config;
struct glcd_data *dev = port->driver_data;
unsigned char data[2];
@ -141,7 +141,7 @@ void glcd_cursor_pos_set(struct device *port, uint8_t col, uint8_t row)
void glcd_clear(struct device *port)
{
const struct glcd_driver * const rom = (const struct glcd_driver *)
port->config_info;
port->config;
struct glcd_data *dev = port->driver_data;
uint8_t clear[] = { 0, GLCD_CMD_SCREEN_CLEAR };
@ -154,7 +154,7 @@ void glcd_clear(struct device *port)
void glcd_display_state_set(struct device *port, uint8_t opt)
{
const struct glcd_driver * const rom = (const struct glcd_driver *)
port->config_info;
port->config;
struct glcd_data *dev = port->driver_data;
uint8_t data[] = { 0, 0 };
@ -178,7 +178,7 @@ uint8_t glcd_display_state_get(struct device *port)
void glcd_input_state_set(struct device *port, uint8_t opt)
{
const struct glcd_driver * const rom = port->config_info;
const struct glcd_driver * const rom = port->config;
struct glcd_data *dev = port->driver_data;
uint8_t data[] = { 0, 0 };
@ -223,7 +223,7 @@ void glcd_color_set(struct device *port, uint8_t r, uint8_t g, uint8_t b)
void glcd_function_set(struct device *port, uint8_t opt)
{
const struct glcd_driver * const rom = port->config_info;
const struct glcd_driver * const rom = port->config;
struct glcd_data *dev = port->driver_data;
uint8_t data[] = { 0, 0 };

View file

@ -37,7 +37,7 @@ LOG_MODULE_REGISTER(dma_dw);
#define DEV_NAME(dev) ((dev)->name)
#define DEV_DATA(dev) ((struct dw_dma_dev_data *const)(dev)->driver_data)
#define DEV_CFG(dev) \
((const struct dw_dma_dev_cfg *const)(dev)->config_info)
((const struct dw_dma_dev_cfg *const)(dev)->config)
/* number of tries to wait for reset */
#define DW_DMA_CFG_TRIES 10000

View file

@ -49,7 +49,7 @@ struct dma_mcux_edma_data {
};
#define DEV_CFG(dev) \
((const struct dma_mcux_edma_config *const)dev->config_info)
((const struct dma_mcux_edma_config *const)dev->config)
#define DEV_DATA(dev) ((struct dma_mcux_edma_data *)dev->driver_data)
#define DEV_BASE(dev) ((DMA_Type *)DEV_CFG(dev)->base)

View file

@ -31,7 +31,7 @@ struct nios2_msgdma_dev_cfg {
#define DEV_NAME(dev) ((dev)->name)
#define DEV_CFG(dev) \
((struct nios2_msgdma_dev_cfg *)(dev)->config_info)
((struct nios2_msgdma_dev_cfg *)(dev)->config)
static void nios2_msgdma_isr(void *arg)
{

View file

@ -19,7 +19,7 @@ LOG_MODULE_REGISTER(dma_pl330);
#define DEV_NAME(dev) ((dev)->name)
#define DEV_CFG(dev) \
((const struct dma_pl330_config *const)(dev)->config_info)
((const struct dma_pl330_config *const)(dev)->config)
#define DEV_DATA(dev) \
((struct dma_pl330_dev_data *const)(dev)->driver_data)

View file

@ -47,7 +47,7 @@ struct sam_xdmac_dev_data {
#define DEV_NAME(dev) ((dev)->name)
#define DEV_CFG(dev) \
((const struct sam_xdmac_dev_cfg *const)(dev)->config_info)
((const struct sam_xdmac_dev_cfg *const)(dev)->config)
#define DEV_DATA(dev) \
((struct sam_xdmac_dev_data *const)(dev)->driver_data)

View file

@ -38,7 +38,7 @@ static uint32_t table_p_size[] = {
static void dma_stm32_dump_stream_irq(struct device *dev, uint32_t id)
{
const struct dma_stm32_config *config = dev->config_info;
const struct dma_stm32_config *config = dev->config;
DMA_TypeDef *dma = (DMA_TypeDef *)(config->base);
stm32_dma_dump_stream_irq(dma, id);
@ -46,7 +46,7 @@ static void dma_stm32_dump_stream_irq(struct device *dev, uint32_t id)
static void dma_stm32_clear_stream_irq(struct device *dev, uint32_t id)
{
const struct dma_stm32_config *config = dev->config_info;
const struct dma_stm32_config *config = dev->config;
DMA_TypeDef *dma = (DMA_TypeDef *)(config->base);
func_ll_clear_tc[id](dma);
@ -58,7 +58,7 @@ static void dma_stm32_irq_handler(void *arg)
{
struct device *dev = arg;
struct dma_stm32_data *data = dev->driver_data;
const struct dma_stm32_config *config = dev->config_info;
const struct dma_stm32_config *config = dev->config;
DMA_TypeDef *dma = (DMA_TypeDef *)(config->base);
struct dma_stm32_stream *stream;
int id;
@ -243,7 +243,7 @@ static int dma_stm32_configure(struct device *dev, uint32_t id,
struct dma_stm32_data *data = dev->driver_data;
struct dma_stm32_stream *stream = &data->streams[id - STREAM_OFFSET];
const struct dma_stm32_config *dev_config =
dev->config_info;
dev->config;
DMA_TypeDef *dma = (DMA_TypeDef *)dev_config->base;
LL_DMA_InitTypeDef DMA_InitStruct;
uint32_t msize;
@ -477,7 +477,7 @@ static int dma_stm32_reload(struct device *dev, uint32_t id,
uint32_t src, uint32_t dst, size_t size)
#endif /* CONFIG_DMAMUX_STM32 */
{
const struct dma_stm32_config *config = dev->config_info;
const struct dma_stm32_config *config = dev->config;
DMA_TypeDef *dma = (DMA_TypeDef *)(config->base);
struct dma_stm32_data *data = dev->driver_data;
struct dma_stm32_stream *stream = &data->streams[id - STREAM_OFFSET];
@ -524,7 +524,7 @@ int dma_stm32_start(struct device *dev, uint32_t id)
static int dma_stm32_start(struct device *dev, uint32_t id)
#endif /* CONFIG_DMAMUX_STM32 */
{
const struct dma_stm32_config *config = dev->config_info;
const struct dma_stm32_config *config = dev->config;
DMA_TypeDef *dma = (DMA_TypeDef *)(config->base);
struct dma_stm32_data *data = dev->driver_data;
@ -552,7 +552,7 @@ static int dma_stm32_stop(struct device *dev, uint32_t id)
struct dma_stm32_data *data = dev->driver_data;
struct dma_stm32_stream *stream = &data->streams[id - STREAM_OFFSET];
const struct dma_stm32_config *config =
dev->config_info;
dev->config;
DMA_TypeDef *dma = (DMA_TypeDef *)(config->base);
/* give channel from index 0 */
@ -583,7 +583,7 @@ struct k_mem_block block;
static int dma_stm32_init(struct device *dev)
{
struct dma_stm32_data *data = dev->driver_data;
const struct dma_stm32_config *config = dev->config_info;
const struct dma_stm32_config *config = dev->config;
struct device *clk =
device_get_binding(STM32_CLOCK_CONTROL_NAME);
@ -623,7 +623,7 @@ static int dma_stm32_init(struct device *dev)
static int dma_stm32_get_status(struct device *dev, uint32_t id,
struct dma_status *stat)
{
const struct dma_stm32_config *config = dev->config_info;
const struct dma_stm32_config *config = dev->config;
DMA_TypeDef *dma = (DMA_TypeDef *)(config->base);
struct dma_stm32_data *data = dev->driver_data;
struct dma_stm32_stream *stream;

View file

@ -30,8 +30,7 @@ int dmamux_stm32_configure(struct device *dev, uint32_t id,
{
/* device is the dmamux, id is the dmamux channel from 0 */
struct dmamux_stm32_data *data = dev->driver_data;
const struct dmamux_stm32_config *dev_config =
dev->config_info;
const struct dmamux_stm32_config *dev_config = dev->config;
/*
* request line ID for this mux channel is stored
@ -78,8 +77,7 @@ int dmamux_stm32_configure(struct device *dev, uint32_t id,
int dmamux_stm32_start(struct device *dev, uint32_t id)
{
const struct dmamux_stm32_config *dev_config =
dev->config_info;
const struct dmamux_stm32_config *dev_config = dev->config;
struct dmamux_stm32_data *data = dev->driver_data;
/* check if this channel is valid */
@ -99,8 +97,7 @@ int dmamux_stm32_start(struct device *dev, uint32_t id)
int dmamux_stm32_stop(struct device *dev, uint32_t id)
{
const struct dmamux_stm32_config *dev_config =
dev->config_info;
const struct dmamux_stm32_config *dev_config = dev->config;
struct dmamux_stm32_data *data = dev->driver_data;
/* check if this channel is valid */
@ -121,8 +118,7 @@ int dmamux_stm32_stop(struct device *dev, uint32_t id)
int dmamux_stm32_reload(struct device *dev, uint32_t id,
uint32_t src, uint32_t dst, size_t size)
{
const struct dmamux_stm32_config *dev_config =
dev->config_info;
const struct dmamux_stm32_config *dev_config = dev->config;
struct dmamux_stm32_data *data = dev->driver_data;
/* check if this channel is valid */
@ -144,8 +140,7 @@ int dmamux_stm32_reload(struct device *dev, uint32_t id,
static int dmamux_stm32_init(struct device *dev)
{
struct dmamux_stm32_data *data = dev->driver_data;
const struct dmamux_stm32_config *config =
dev->config_info;
const struct dmamux_stm32_config *config = dev->config;
struct device *clk =
device_get_binding(STM32_CLOCK_CONTROL_NAME);

View file

@ -65,7 +65,7 @@ struct eeprom_at2x_data {
static inline int eeprom_at2x_write_protect(struct device *dev)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
struct eeprom_at2x_data *data = dev->driver_data;
if (!data->wp_gpio_dev) {
@ -77,7 +77,7 @@ static inline int eeprom_at2x_write_protect(struct device *dev)
static inline int eeprom_at2x_write_enable(struct device *dev)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
struct eeprom_at2x_data *data = dev->driver_data;
if (!data->wp_gpio_dev) {
@ -90,7 +90,7 @@ static inline int eeprom_at2x_write_enable(struct device *dev)
static int eeprom_at2x_read(struct device *dev, off_t offset, void *buf,
size_t len)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
struct eeprom_at2x_data *data = dev->driver_data;
int err;
@ -118,7 +118,7 @@ static int eeprom_at2x_read(struct device *dev, off_t offset, void *buf,
static size_t eeprom_at2x_limit_write_count(struct device *dev, off_t offset,
size_t len)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
size_t count = len;
off_t page_boundary;
@ -139,7 +139,7 @@ static size_t eeprom_at2x_limit_write_count(struct device *dev, off_t offset,
static int eeprom_at2x_write(struct device *dev, off_t offset, const void *buf,
size_t len)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
struct eeprom_at2x_data *data = dev->driver_data;
const uint8_t *pbuf = buf;
int ret;
@ -193,7 +193,7 @@ static int eeprom_at2x_write(struct device *dev, off_t offset, const void *buf,
static size_t eeprom_at2x_size(struct device *dev)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
return config->size;
}
@ -202,7 +202,7 @@ static size_t eeprom_at2x_size(struct device *dev)
static int eeprom_at24_read(struct device *dev, off_t offset, void *buf,
size_t len)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
struct eeprom_at2x_data *data = dev->driver_data;
int64_t timeout;
uint8_t addr[2];
@ -236,7 +236,7 @@ static int eeprom_at24_read(struct device *dev, off_t offset, void *buf,
static int eeprom_at24_write(struct device *dev, off_t offset,
const void *buf, size_t len)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
struct eeprom_at2x_data *data = dev->driver_data;
int count = eeprom_at2x_limit_write_count(dev, offset, len);
uint8_t block[config->addr_width / 8 + count];
@ -313,7 +313,7 @@ static int eeprom_at25_rdsr(struct device *dev, uint8_t *status)
static int eeprom_at25_wait_for_idle(struct device *dev)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
int64_t timeout;
uint8_t status;
int err;
@ -342,7 +342,7 @@ static int eeprom_at25_wait_for_idle(struct device *dev)
static int eeprom_at25_read(struct device *dev, off_t offset, void *buf,
size_t len)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
struct eeprom_at2x_data *data = dev->driver_data;
size_t cmd_len = 1 + config->addr_width / 8;
uint8_t cmd[4] = { EEPROM_AT25_READ, 0, 0, 0 };
@ -424,7 +424,7 @@ static int eeprom_at25_wren(struct device *dev)
static int eeprom_at25_write(struct device *dev, off_t offset,
const void *buf, size_t len)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
struct eeprom_at2x_data *data = dev->driver_data;
int count = eeprom_at2x_limit_write_count(dev, offset, len);
uint8_t cmd[4] = { EEPROM_AT25_WRITE, 0, 0, 0 };
@ -484,7 +484,7 @@ static int eeprom_at25_write(struct device *dev, off_t offset,
static int eeprom_at2x_init(struct device *dev)
{
const struct eeprom_at2x_config *config = dev->config_info;
const struct eeprom_at2x_config *config = dev->config;
struct eeprom_at2x_data *data = dev->driver_data;
int err;

View file

@ -30,7 +30,7 @@ struct eeprom_lpc11u6x_config {
static int eeprom_lpc11u6x_read(struct device *dev,
off_t offset, void *data, size_t len)
{
const struct eeprom_lpc11u6x_config *config = dev->config_info;
const struct eeprom_lpc11u6x_config *config = dev->config;
uint32_t cmd[5];
int ret;
@ -63,7 +63,7 @@ static int eeprom_lpc11u6x_read(struct device *dev,
static int eeprom_lpc11u6x_write(struct device *dev,
off_t offset, const void *data, size_t len)
{
const struct eeprom_lpc11u6x_config *config = dev->config_info;
const struct eeprom_lpc11u6x_config *config = dev->config;
uint32_t cmd[5];
int ret;
@ -95,7 +95,7 @@ static int eeprom_lpc11u6x_write(struct device *dev,
static size_t eeprom_lpc11u6x_size(struct device *dev)
{
const struct eeprom_lpc11u6x_config *config = dev->config_info;
const struct eeprom_lpc11u6x_config *config = dev->config;
return config->size;
}

View file

@ -36,7 +36,7 @@ struct eeprom_sim_config {
};
#define DEV_NAME(dev) ((dev)->name)
#define DEV_CONFIG(dev) ((dev)->config_info)
#define DEV_CONFIG(dev) ((dev)->config)
#define EEPROM(addr) (mock_eeprom + (addr))

View file

@ -23,7 +23,7 @@ struct eeprom_stm32_config {
static int eeprom_stm32_read(struct device *dev, off_t offset, void *buf,
size_t len)
{
const struct eeprom_stm32_config *config = dev->config_info;
const struct eeprom_stm32_config *config = dev->config;
uint8_t *pbuf = buf;
if (!len) {
@ -53,7 +53,7 @@ static int eeprom_stm32_read(struct device *dev, off_t offset, void *buf,
static int eeprom_stm32_write(struct device *dev, off_t offset,
const void *buf, size_t len)
{
const struct eeprom_stm32_config *config = dev->config_info;
const struct eeprom_stm32_config *config = dev->config;
const uint8_t *pbuf = buf;
HAL_StatusTypeDef ret = HAL_OK;
@ -100,7 +100,7 @@ static int eeprom_stm32_write(struct device *dev, off_t offset,
static size_t eeprom_stm32_size(struct device *dev)
{
const struct eeprom_stm32_config *config = dev->config_info;
const struct eeprom_stm32_config *config = dev->config;
return config->size;
}

View file

@ -20,7 +20,7 @@ struct mcux_entropy_config {
static int entropy_mcux_rng_get_entropy(struct device *dev, uint8_t *buffer,
uint16_t length)
{
const struct mcux_entropy_config *config = dev->config_info;
const struct mcux_entropy_config *config = dev->config;
status_t status;
ARG_UNUSED(dev);

View file

@ -20,7 +20,7 @@ struct mcux_entropy_config {
static int entropy_mcux_trng_get_entropy(struct device *dev, uint8_t *buffer,
uint16_t length)
{
const struct mcux_entropy_config *config = dev->config_info;
const struct mcux_entropy_config *config = dev->config;
status_t status;
ARG_UNUSED(dev);
@ -48,7 +48,7 @@ DEVICE_AND_API_INIT(entropy_mcux_trng, DT_INST_LABEL(0),
static int entropy_mcux_trng_init(struct device *dev)
{
const struct mcux_entropy_config *config = dev->config_info;
const struct mcux_entropy_config *config = dev->config;
trng_config_t conf;
status_t status;

View file

@ -20,7 +20,7 @@ struct rv32m1_entropy_config {
static int entropy_rv32m1_trng_get_entropy(struct device *dev, uint8_t *buffer,
uint16_t length)
{
const struct rv32m1_entropy_config *config = dev->config_info;
const struct rv32m1_entropy_config *config = dev->config;
status_t status;
ARG_UNUSED(dev);
@ -48,7 +48,7 @@ DEVICE_AND_API_INIT(entropy_rv32m1_trng, DT_INST_LABEL(0),
static int entropy_rv32m1_trng_init(struct device *dev)
{
const struct rv32m1_entropy_config *config = dev->config_info;
const struct rv32m1_entropy_config *config = dev->config;
trng_config_t conf;
status_t status;

View file

@ -18,7 +18,7 @@ struct trng_sam_dev_cfg {
};
#define DEV_CFG(dev) \
((const struct trng_sam_dev_cfg *const)(dev)->config_info)
((const struct trng_sam_dev_cfg *const)(dev)->config)
static inline bool _ready(Trng * const trng)
{

View file

@ -32,7 +32,7 @@ struct entropy_stm32_rng_dev_data {
((struct entropy_stm32_rng_dev_data *)(dev)->driver_data)
#define DEV_CFG(dev) \
((const struct entropy_stm32_rng_dev_cfg *)(dev)->config_info)
((const struct entropy_stm32_rng_dev_cfg *)(dev)->config)
static void entropy_stm32_rng_reset(RNG_TypeDef *rng)
{

View file

@ -360,7 +360,7 @@ static int espi_xec_write_lpc_request(struct device *dev,
uint32_t *data)
{
struct espi_xec_config *config =
(struct espi_xec_config *) (dev->config_info);
(struct espi_xec_config *) (dev->config);
volatile uint32_t __attribute__((unused)) dummy;
@ -678,7 +678,7 @@ static void send_slave_bootdone(struct device *dev)
static void espi_init_oob(struct device *dev)
{
struct espi_xec_config *config =
(struct espi_xec_config *) (dev->config_info);
(struct espi_xec_config *) (dev->config);
/* Enable OOB Tx/Rx interrupts */
MCHP_GIRQ_ENSET(config->bus_girq_id) = (MCHP_ESPI_OOB_UP_GIRQ_VAL |
@ -700,7 +700,7 @@ static void espi_init_oob(struct device *dev)
static void espi_init_flash(struct device *dev)
{
struct espi_xec_config *config =
(struct espi_xec_config *)(dev->config_info);
(struct espi_xec_config *)(dev->config);
LOG_DBG("%s", __func__);
@ -713,7 +713,7 @@ static void espi_init_flash(struct device *dev)
static void espi_bus_init(struct device *dev)
{
const struct espi_xec_config *config = dev->config_info;
const struct espi_xec_config *config = dev->config;
/* Enable bus interrupts */
MCHP_GIRQ_ENSET(config->bus_girq_id) = MCHP_ESPI_ESPI_RST_GIRQ_VAL |
@ -858,7 +858,7 @@ static void espi_pc_isr(struct device *dev)
static void espi_vwire_chanel_isr(struct device *dev)
{
struct espi_xec_data *data = (struct espi_xec_data *)(dev->driver_data);
const struct espi_xec_config *config = dev->config_info;
const struct espi_xec_config *config = dev->config;
struct espi_event evt = { .evt_type = ESPI_BUS_EVENT_CHANNEL_READY,
.evt_details = ESPI_CHANNEL_VWIRE,
.evt_data = 0 };
@ -1198,7 +1198,7 @@ static uint8_t periph_isr_cnt = sizeof(peripherals_isr) / sizeof(struct espi_isr
static void espi_xec_bus_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct espi_xec_config *config = dev->config_info;
const struct espi_xec_config *config = dev->config;
uint32_t girq_result;
girq_result = MCHP_GIRQ_RESULT(config->bus_girq_id);
@ -1219,7 +1219,7 @@ static void espi_xec_bus_isr(void *arg)
static void espi_xec_vw_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct espi_xec_config *config = dev->config_info;
const struct espi_xec_config *config = dev->config;
uint32_t girq_result;
girq_result = MCHP_GIRQ_RESULT(config->vw_girq_id);
@ -1240,7 +1240,7 @@ static void espi_xec_vw_isr(void *arg)
static void espi_xec_periph_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct espi_xec_config *config = dev->config_info;
const struct espi_xec_config *config = dev->config;
uint32_t girq_result;
girq_result = MCHP_GIRQ_RESULT(config->pc_girq_id);
@ -1290,7 +1290,7 @@ DEVICE_AND_API_INIT(espi_xec_0, DT_INST_LABEL(0),
static int espi_xec_init(struct device *dev)
{
const struct espi_xec_config *config = dev->config_info;
const struct espi_xec_config *config = dev->config;
struct espi_xec_data *data = (struct espi_xec_data *)(dev->driver_data);
data->plt_rst_asserted = 0;

View file

@ -349,7 +349,7 @@ static void eth_enc28j60_init_buffers(struct device *dev)
static void eth_enc28j60_init_mac(struct device *dev)
{
const struct eth_enc28j60_config *config = dev->config_info;
const struct eth_enc28j60_config *config = dev->config;
struct eth_enc28j60_runtime *context = dev->driver_data;
uint8_t data_macon;
@ -399,7 +399,7 @@ static void eth_enc28j60_init_mac(struct device *dev)
static void eth_enc28j60_init_phy(struct device *dev)
{
const struct eth_enc28j60_config *config = dev->config_info;
const struct eth_enc28j60_config *config = dev->config;
if (config->full_duplex) {
eth_enc28j60_write_phy(dev, ENC28J60_PHY_PHCON1,
@ -506,7 +506,7 @@ static int eth_enc28j60_tx(struct device *dev, struct net_pkt *pkt)
static int eth_enc28j60_rx(struct device *dev, uint16_t *vlan_tag)
{
const struct eth_enc28j60_config *config = dev->config_info;
const struct eth_enc28j60_config *config = dev->config;
struct eth_enc28j60_runtime *context = dev->driver_data;
uint16_t lengthfr;
uint8_t counter;
@ -717,7 +717,7 @@ static const struct ethernet_api api_funcs = {
static int eth_enc28j60_init(struct device *dev)
{
const struct eth_enc28j60_config *config = dev->config_info;
const struct eth_enc28j60_config *config = dev->config;
struct eth_enc28j60_runtime *context = dev->driver_data;
/* SPI config */

View file

@ -344,7 +344,7 @@ static int enc424j600_tx(struct device *dev, struct net_pkt *pkt)
static int enc424j600_rx(struct device *dev)
{
struct enc424j600_runtime *context = dev->driver_data;
const struct enc424j600_config *config = dev->config_info;
const struct enc424j600_config *config = dev->config;
uint8_t info[ENC424J600_RSV_SIZE + ENC424J600_PTR_NXP_PKT_SIZE];
struct net_buf *pkt_buf = NULL;
struct net_pkt *pkt;
@ -596,7 +596,7 @@ static const struct ethernet_api api_funcs = {
static int enc424j600_init(struct device *dev)
{
const struct enc424j600_config *config = dev->config_info;
const struct enc424j600_config *config = dev->config;
struct enc424j600_runtime *context = dev->driver_data;
uint8_t retries = ENC424J600_DEFAULT_NUMOF_RETRIES;
uint16_t tmp;

View file

@ -96,7 +96,7 @@ struct eth_gecko_dev_data {
#define DEV_NAME(dev) ((dev)->name)
#define DEV_CFG(dev) \
((const struct eth_gecko_dev_cfg *)(dev)->config_info)
((const struct eth_gecko_dev_cfg *)(dev)->config)
#define DEV_DATA(dev) \
((struct eth_gecko_dev_data *)(dev)->driver_data)

View file

@ -74,7 +74,7 @@ struct eth_liteeth_config {
static int eth_initialize(struct device *dev)
{
const struct eth_liteeth_config *config = dev->config_info;
const struct eth_liteeth_config *config = dev->config;
config->config_func();

View file

@ -281,7 +281,7 @@ struct eth_sam_dev_data {
};
#define DEV_CFG(dev) \
((const struct eth_sam_dev_cfg *const)(dev)->config_info)
((const struct eth_sam_dev_cfg *const)(dev)->config)
#define DEV_DATA(dev) \
((struct eth_sam_dev_data *const)(dev)->driver_data)

View file

@ -11,7 +11,7 @@
#define DEV_DATA(dev) \
((struct eth_stellaris_runtime *)(dev)->driver_data)
#define DEV_CFG(dev) \
((const struct eth_stellaris_config *const)(dev)->config_info)
((const struct eth_stellaris_config *const)(dev)->config)
/*
* Register mapping
*/

View file

@ -47,7 +47,7 @@ struct eth_stm32_hal_dev_data {
};
#define DEV_CFG(dev) \
((const struct eth_stm32_hal_dev_cfg *)(dev)->config_info)
((const struct eth_stm32_hal_dev_cfg *)(dev)->config)
#define DEV_DATA(dev) \
((struct eth_stm32_hal_dev_data *)(dev)->driver_data)

View file

@ -52,7 +52,7 @@ static const struct flash_parameters flash_sam_parameters = {
};
#define DEV_CFG(dev) \
((const struct flash_sam_dev_cfg *const)(dev)->config_info)
((const struct flash_sam_dev_cfg *const)(dev)->config)
#define DEV_DATA(dev) \
((struct flash_sam_dev_data *const)(dev)->driver_data)

View file

@ -330,7 +330,7 @@ static int qspi_erase(struct device *dev, uint32_t addr, uint32_t size)
}
int rv = 0;
const struct qspi_nor_config *params = dev->config_info;
const struct qspi_nor_config *params = dev->config;
qspi_lock(dev);
while ((rv == 0) && (size > 0)) {
@ -587,7 +587,7 @@ static int qspi_nor_read(struct device *dev, off_t addr, void *dest,
return 0;
}
const struct qspi_nor_config *params = dev->config_info;
const struct qspi_nor_config *params = dev->config;
/* affected region should be within device */
if (addr < 0 ||
@ -687,7 +687,7 @@ static int qspi_nor_write(struct device *dev, off_t addr, const void *src,
}
struct qspi_nor_data *const driver_data = dev->driver_data;
const struct qspi_nor_config *params = dev->config_info;
const struct qspi_nor_config *params = dev->config;
if (driver_data->write_protection) {
return -EACCES;
@ -723,7 +723,7 @@ static int qspi_nor_write(struct device *dev, off_t addr, const void *src,
static int qspi_nor_erase(struct device *dev, off_t addr, size_t size)
{
struct qspi_nor_data *const driver_data = dev->driver_data;
const struct qspi_nor_config *params = dev->config_info;
const struct qspi_nor_config *params = dev->config;
if (driver_data->write_protection) {
return -EACCES;
@ -771,7 +771,7 @@ static int qspi_nor_write_protection_set(struct device *dev,
*/
static int qspi_nor_configure(struct device *dev)
{
const struct qspi_nor_config *params = dev->config_info;
const struct qspi_nor_config *params = dev->config;
int ret = qspi_nrfx_configure(dev);

View file

@ -90,7 +90,7 @@ static struct spi_flash_at45_data *get_dev_data(struct device *dev)
static const struct spi_flash_at45_config *get_dev_config(struct device *dev)
{
return dev->config_info;
return dev->config;
}
static void acquire(struct device *dev)

View file

@ -321,7 +321,7 @@ static int spi_nor_wait_until_ready(struct device *dev)
static int spi_nor_read(struct device *dev, off_t addr, void *dest,
size_t size)
{
const struct spi_nor_config *params = dev->config_info;
const struct spi_nor_config *params = dev->config;
int ret;
/* should be between 0 and flash size */
@ -342,7 +342,7 @@ static int spi_nor_read(struct device *dev, off_t addr, void *dest,
static int spi_nor_write(struct device *dev, off_t addr, const void *src,
size_t size)
{
const struct spi_nor_config *params = dev->config_info;
const struct spi_nor_config *params = dev->config;
int ret = 0;
/* should be between 0 and flash size */
@ -387,7 +387,7 @@ out:
static int spi_nor_erase(struct device *dev, off_t addr, size_t size)
{
const struct spi_nor_config *params = dev->config_info;
const struct spi_nor_config *params = dev->config;
int ret = 0;
/* erase area must be subregion of device */
@ -486,7 +486,7 @@ static int spi_nor_write_protection_set(struct device *dev, bool write_protect)
static int spi_nor_configure(struct device *dev)
{
struct spi_nor_data *data = dev->driver_data;
const struct spi_nor_config *params = dev->config_info;
const struct spi_nor_config *params = dev->config;
data->spi = device_get_binding(DT_INST_BUS_LABEL(0));
if (!data->spi) {

View file

@ -60,7 +60,7 @@ struct gpio_cc32xx_data {
};
#define DEV_CFG(dev) \
((const struct gpio_cc32xx_config *)(dev)->config_info)
((const struct gpio_cc32xx_config *)(dev)->config)
#define DEV_DATA(dev) \
((struct gpio_cc32xx_data *)(dev)->driver_data)

View file

@ -46,7 +46,7 @@ struct gpio_cmsdk_ahb_dev_data {
static int gpio_cmsdk_ahb_port_get_raw(struct device *dev, uint32_t *value)
{
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config_info;
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config;
*value = cfg->port->data;
@ -56,7 +56,7 @@ static int gpio_cmsdk_ahb_port_get_raw(struct device *dev, uint32_t *value)
static int gpio_cmsdk_ahb_port_set_masked_raw(struct device *dev, uint32_t mask,
uint32_t value)
{
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config_info;
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config;
cfg->port->dataout = (cfg->port->dataout & ~mask) | (mask & value);
@ -65,7 +65,7 @@ static int gpio_cmsdk_ahb_port_set_masked_raw(struct device *dev, uint32_t mask,
static int gpio_cmsdk_ahb_port_set_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config_info;
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config;
cfg->port->dataout |= mask;
@ -74,7 +74,7 @@ static int gpio_cmsdk_ahb_port_set_bits_raw(struct device *dev, uint32_t mask)
static int gpio_cmsdk_ahb_port_clear_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config_info;
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config;
cfg->port->dataout &= ~mask;
@ -83,7 +83,7 @@ static int gpio_cmsdk_ahb_port_clear_bits_raw(struct device *dev, uint32_t mask)
static int gpio_cmsdk_ahb_port_toggle_bits(struct device *dev, uint32_t mask)
{
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config_info;
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config;
cfg->port->dataout ^= mask;
@ -92,7 +92,7 @@ static int gpio_cmsdk_ahb_port_toggle_bits(struct device *dev, uint32_t mask)
static int cmsdk_ahb_gpio_config(struct device *dev, uint32_t mask, gpio_flags_t flags)
{
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config_info;
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config;
if (((flags & GPIO_INPUT) == 0) && ((flags & GPIO_OUTPUT) == 0)) {
return -ENOTSUP;
@ -148,7 +148,7 @@ static int gpio_cmsdk_ahb_pin_interrupt_configure(struct device *dev,
gpio_pin_t pin, enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config_info;
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config;
if (trig == GPIO_INT_TRIG_BOTH) {
return -ENOTSUP;
@ -187,7 +187,7 @@ static int gpio_cmsdk_ahb_pin_interrupt_configure(struct device *dev,
static void gpio_cmsdk_ahb_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config_info;
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config;
struct gpio_cmsdk_ahb_dev_data *data = dev->driver_data;
uint32_t int_stat;
@ -228,7 +228,7 @@ static const struct gpio_driver_api gpio_cmsdk_ahb_drv_api_funcs = {
*/
static int gpio_cmsdk_ahb_init(struct device *dev)
{
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config_info;
const struct gpio_cmsdk_ahb_cfg * const cfg = dev->config;
#ifdef CONFIG_CLOCK_CONTROL
/* Enable clock for subsystem */

View file

@ -99,7 +99,7 @@ static inline void gpio_dw_clock_config(struct device *port)
static inline void gpio_dw_clock_on(struct device *port)
{
const struct gpio_dw_config *config = port->config_info;
const struct gpio_dw_config *config = port->config;
struct gpio_dw_runtime *context = port->driver_data;
clock_control_on(context->clock, config->clock_data);
@ -107,7 +107,7 @@ static inline void gpio_dw_clock_on(struct device *port)
static inline void gpio_dw_clock_off(struct device *port)
{
const struct gpio_dw_config *config = port->config_info;
const struct gpio_dw_config *config = port->config;
struct gpio_dw_runtime *context = port->driver_data;
clock_control_off(context->clock, config->clock_data);
@ -211,7 +211,7 @@ static int gpio_dw_pin_interrupt_configure(struct device *port,
enum gpio_int_trig trig)
{
struct gpio_dw_runtime *context = port->driver_data;
const struct gpio_dw_config *config = port->config_info;
const struct gpio_dw_config *config = port->config;
uint32_t base_addr = dw_base_to_block_base(context->base_addr);
uint32_t port_base_addr = context->base_addr;
uint32_t dir_port = dw_get_dir_port(port_base_addr);
@ -275,7 +275,7 @@ static inline void dw_pin_config(struct device *port,
uint32_t pin, int flags)
{
struct gpio_dw_runtime *context = port->driver_data;
const struct gpio_dw_config *config = port->config_info;
const struct gpio_dw_config *config = port->config;
uint32_t base_addr = dw_base_to_block_base(context->base_addr);
uint32_t port_base_addr = context->base_addr;
uint32_t dir_port = dw_get_dir_port(port_base_addr);
@ -307,7 +307,7 @@ static inline int gpio_dw_config(struct device *port,
gpio_pin_t pin,
gpio_flags_t flags)
{
const struct gpio_dw_config *config = port->config_info;
const struct gpio_dw_config *config = port->config;
uint32_t io_flags;
/* Check for invalid pin number */
@ -520,7 +520,7 @@ static const struct gpio_driver_api api_funcs = {
static int gpio_dw_initialize(struct device *port)
{
struct gpio_dw_runtime *context = port->driver_data;
const struct gpio_dw_config *config = port->config_info;
const struct gpio_dw_config *config = port->config;
uint32_t base_addr;
if (dw_interrupt_support(config)) {
@ -591,7 +591,7 @@ DEVICE_AND_API_INIT(gpio_dw_0, DT_INST_LABEL(0),
static void gpio_config_0_irq(struct device *port)
{
#if (DT_INST_IRQN(0) > 0)
const struct gpio_dw_config *config = port->config_info;
const struct gpio_dw_config *config = port->config;
#ifdef CONFIG_GPIO_DW_0_IRQ_DIRECT
IRQ_CONNECT(DT_INST_IRQN(0),
@ -661,7 +661,7 @@ DEVICE_AND_API_INIT(gpio_dw_1, DT_INST_LABEL(1),
static void gpio_config_1_irq(struct device *port)
{
#if (DT_INST_IRQN(1) > 0)
const struct gpio_dw_config *config = port->config_info;
const struct gpio_dw_config *config = port->config;
#ifdef CONFIG_GPIO_DW_1_IRQ_DIRECT
IRQ_CONNECT(DT_INST_IRQN(1),
@ -729,7 +729,7 @@ DEVICE_AND_API_INIT(gpio_dw_2, DT_INST_LABEL(2),
static void gpio_config_2_irq(struct device *port)
{
#if (DT_INST_IRQN(2) > 0)
const struct gpio_dw_config *config = port->config_info;
const struct gpio_dw_config *config = port->config;
#ifdef CONFIG_GPIO_DW_2_IRQ_DIRECT
IRQ_CONNECT(DT_INST_IRQN(2),
@ -797,7 +797,7 @@ DEVICE_AND_API_INIT(gpio_dw_3, DT_INST_LABEL(3),
static void gpio_config_3_irq(struct device *port)
{
#if (DT_INST_IRQN(3) > 0)
const struct gpio_dw_config *config = port->config_info;
const struct gpio_dw_config *config = port->config;
#ifdef CONFIG_GPIO_DW_3_IRQ_DIRECT
IRQ_CONNECT(DT_INST_IRQN(3),

View file

@ -75,7 +75,7 @@ static int gpio_gecko_configure(struct device *dev,
gpio_pin_t pin,
gpio_flags_t flags)
{
const struct gpio_gecko_config *config = dev->config_info;
const struct gpio_gecko_config *config = dev->config;
GPIO_Port_TypeDef gpio_index = config->gpio_index;
GPIO_Mode_TypeDef mode;
unsigned int out = 0U;
@ -126,7 +126,7 @@ static int gpio_gecko_configure(struct device *dev,
static int gpio_gecko_port_get_raw(struct device *dev, uint32_t *value)
{
const struct gpio_gecko_config *config = dev->config_info;
const struct gpio_gecko_config *config = dev->config;
GPIO_Port_TypeDef gpio_index = config->gpio_index;
*value = GPIO_PortInGet(gpio_index);
@ -137,7 +137,7 @@ static int gpio_gecko_port_get_raw(struct device *dev, uint32_t *value)
static int gpio_gecko_port_set_masked_raw(struct device *dev, uint32_t mask,
uint32_t value)
{
const struct gpio_gecko_config *config = dev->config_info;
const struct gpio_gecko_config *config = dev->config;
GPIO_Port_TypeDef gpio_index = config->gpio_index;
GPIO_PortOutSetVal(gpio_index, value, mask);
@ -147,7 +147,7 @@ static int gpio_gecko_port_set_masked_raw(struct device *dev, uint32_t mask,
static int gpio_gecko_port_set_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_gecko_config *config = dev->config_info;
const struct gpio_gecko_config *config = dev->config;
GPIO_Port_TypeDef gpio_index = config->gpio_index;
GPIO_PortOutSet(gpio_index, mask);
@ -157,7 +157,7 @@ static int gpio_gecko_port_set_bits_raw(struct device *dev, uint32_t mask)
static int gpio_gecko_port_clear_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_gecko_config *config = dev->config_info;
const struct gpio_gecko_config *config = dev->config;
GPIO_Port_TypeDef gpio_index = config->gpio_index;
GPIO_PortOutClear(gpio_index, mask);
@ -167,7 +167,7 @@ static int gpio_gecko_port_clear_bits_raw(struct device *dev, uint32_t mask)
static int gpio_gecko_port_toggle_bits(struct device *dev, uint32_t mask)
{
const struct gpio_gecko_config *config = dev->config_info;
const struct gpio_gecko_config *config = dev->config;
GPIO_Port_TypeDef gpio_index = config->gpio_index;
GPIO_PortOutToggle(gpio_index, mask);
@ -179,7 +179,7 @@ static int gpio_gecko_pin_interrupt_configure(struct device *dev,
gpio_pin_t pin, enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
const struct gpio_gecko_config *config = dev->config_info;
const struct gpio_gecko_config *config = dev->config;
struct gpio_gecko_data *data = dev->driver_data;
/* Interrupt on static level is not supported by the hardware */

View file

@ -147,7 +147,7 @@ static uint32_t gpio_ht16k33_get_pending_int(struct device *dev)
static int gpio_ht16k33_init(struct device *dev)
{
const struct gpio_ht16k33_cfg *config = dev->config_info;
const struct gpio_ht16k33_cfg *config = dev->config;
struct gpio_ht16k33_data *data = dev->driver_data;
if (config->keyscan_idx >= HT16K33_KEYSCAN_ROWS) {

View file

@ -31,7 +31,7 @@ struct imx_gpio_data {
static int imx_gpio_configure(struct device *port, gpio_pin_t pin,
gpio_flags_t flags)
{
const struct imx_gpio_config *config = port->config_info;
const struct imx_gpio_config *config = port->config;
GPIO_Type *base = config->base;
if (((flags & GPIO_INPUT) != 0U) && ((flags & GPIO_OUTPUT) != 0U)) {
@ -68,7 +68,7 @@ static int imx_gpio_configure(struct device *port, gpio_pin_t pin,
static int imx_gpio_port_get_raw(struct device *port, uint32_t *value)
{
const struct imx_gpio_config *config = port->config_info;
const struct imx_gpio_config *config = port->config;
GPIO_Type *base = config->base;
*value = GPIO_ReadPortInput(base);
@ -80,7 +80,7 @@ static int imx_gpio_port_set_masked_raw(struct device *port,
gpio_port_pins_t mask,
gpio_port_value_t value)
{
const struct imx_gpio_config *config = port->config_info;
const struct imx_gpio_config *config = port->config;
GPIO_Type *base = config->base;
GPIO_WritePortOutput(base,
@ -92,7 +92,7 @@ static int imx_gpio_port_set_masked_raw(struct device *port,
static int imx_gpio_port_set_bits_raw(struct device *port,
gpio_port_pins_t pins)
{
const struct imx_gpio_config *config = port->config_info;
const struct imx_gpio_config *config = port->config;
GPIO_Type *base = config->base;
GPIO_WritePortOutput(base, GPIO_ReadPortInput(base) | pins);
@ -103,7 +103,7 @@ static int imx_gpio_port_set_bits_raw(struct device *port,
static int imx_gpio_port_clear_bits_raw(struct device *port,
gpio_port_pins_t pins)
{
const struct imx_gpio_config *config = port->config_info;
const struct imx_gpio_config *config = port->config;
GPIO_Type *base = config->base;
GPIO_WritePortOutput(base, GPIO_ReadPortInput(base) & ~pins);
@ -113,7 +113,7 @@ static int imx_gpio_port_clear_bits_raw(struct device *port,
static int imx_gpio_port_toggle_bits(struct device *port, gpio_port_pins_t pins)
{
const struct imx_gpio_config *config = port->config_info;
const struct imx_gpio_config *config = port->config;
GPIO_Type *base = config->base;
GPIO_WritePortOutput(base, GPIO_ReadPortInput(base) ^ pins);
@ -126,7 +126,7 @@ static int imx_gpio_pin_interrupt_configure(struct device *port,
enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
const struct imx_gpio_config *config = port->config_info;
const struct imx_gpio_config *config = port->config;
GPIO_Type *base = config->base;
volatile uint32_t *icr_reg;
unsigned int key;
@ -185,7 +185,7 @@ static int imx_gpio_manage_callback(struct device *port,
static void imx_gpio_port_isr(void *arg)
{
struct device *port = (struct device *)arg;
const struct imx_gpio_config *config = port->config_info;
const struct imx_gpio_config *config = port->config;
struct imx_gpio_data *data = port->driver_data;
uint32_t int_status;

View file

@ -105,7 +105,7 @@ BUILD_ASSERT(DT_INST_IRQN(0) == 14);
/* Required by DEVICE_MMIO_NAMED_* macros */
#define DEV_CFG(_dev) \
((const struct gpio_intel_apl_config *)(_dev)->config_info)
((const struct gpio_intel_apl_config *)(_dev)->config)
#define DEV_DATA(_dev) ((struct gpio_intel_apl_data *)(_dev)->driver_data)
struct gpio_intel_apl_config {
@ -195,7 +195,7 @@ static void gpio_intel_apl_isr(void *arg)
for (isr_dev = 0; isr_dev < nr_isr_devs; ++isr_dev) {
dev = isr_devs[isr_dev];
cfg = dev->config_info;
cfg = dev->config;
data = dev->driver_data;
reg = regs(dev) + REG_GPI_INT_STS_BASE
@ -220,7 +220,7 @@ static void gpio_intel_apl_isr(void *arg)
static int gpio_intel_apl_config(struct device *dev,
gpio_pin_t pin, gpio_flags_t flags)
{
const struct gpio_intel_apl_config *cfg = dev->config_info;
const struct gpio_intel_apl_config *cfg = dev->config;
struct gpio_intel_apl_data *data = dev->driver_data;
uint32_t raw_pin, reg, cfg0, cfg1;
@ -295,7 +295,7 @@ static int gpio_intel_apl_pin_interrupt_configure(struct device *dev,
gpio_pin_t pin, enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
const struct gpio_intel_apl_config *cfg = dev->config_info;
const struct gpio_intel_apl_config *cfg = dev->config;
struct gpio_intel_apl_data *data = dev->driver_data;
uint32_t raw_pin, cfg0, cfg1;
uint32_t reg, reg_en, reg_sts;
@ -394,7 +394,7 @@ static int gpio_intel_apl_manage_callback(struct device *dev,
static int port_get_raw(struct device *dev, uint32_t mask, uint32_t *value,
bool read_tx)
{
const struct gpio_intel_apl_config *cfg = dev->config_info;
const struct gpio_intel_apl_config *cfg = dev->config;
struct gpio_intel_apl_data *data = dev->driver_data;
uint32_t pin, raw_pin, reg_addr, reg_val, cmp;
@ -433,7 +433,7 @@ static int port_get_raw(struct device *dev, uint32_t mask, uint32_t *value,
static int port_set_raw(struct device *dev, uint32_t mask, uint32_t value)
{
const struct gpio_intel_apl_config *cfg = dev->config_info;
const struct gpio_intel_apl_config *cfg = dev->config;
struct gpio_intel_apl_data *data = dev->driver_data;
uint32_t pin, raw_pin, reg_addr, reg_val;

View file

@ -43,7 +43,7 @@ struct gpio_litex_data {
/* Helper macros for GPIO */
#define DEV_GPIO_CFG(dev) \
((const struct gpio_litex_cfg *)(dev)->config_info)
((const struct gpio_litex_cfg *)(dev)->config)
/* Helper functions for bit / port access */

View file

@ -138,7 +138,7 @@ static int gpio_lmp90xxx_pin_interrupt_configure(struct device *dev,
static int gpio_lmp90xxx_init(struct device *dev)
{
const struct gpio_lmp90xxx_config *config = dev->config_info;
const struct gpio_lmp90xxx_config *config = dev->config;
struct gpio_lmp90xxx_data *data = dev->driver_data;
data->parent = device_get_binding(config->parent_dev_name);

View file

@ -24,7 +24,7 @@
#include "gpio_utils.h"
#define DEV_CFG(dev) ((const struct gpio_lpc11u6x_config *) \
((dev)->config_info))
((dev)->config))
#define DEV_DATA(dev) ((struct gpio_lpc11u6x_data *) \
((dev)->driver_data))

View file

@ -47,7 +47,7 @@ struct gpio_xec_config {
static int gpio_xec_configure(struct device *dev,
gpio_pin_t pin, gpio_flags_t flags)
{
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
__IO uint32_t *current_pcr1;
uint32_t pcr1 = 0U;
uint32_t mask = 0U;
@ -130,7 +130,7 @@ static int gpio_xec_pin_interrupt_configure(struct device *dev,
gpio_pin_t pin, enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
__IO uint32_t *current_pcr1;
uint32_t pcr1 = 0U;
uint32_t mask = 0U;
@ -206,7 +206,7 @@ static int gpio_xec_pin_interrupt_configure(struct device *dev,
static int gpio_xec_port_set_masked_raw(struct device *dev, uint32_t mask,
uint32_t value)
{
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* GPIO output registers are used for writing */
__IO uint32_t *gpio_base = GPIO_OUT_BASE(config);
@ -218,7 +218,7 @@ static int gpio_xec_port_set_masked_raw(struct device *dev, uint32_t mask,
static int gpio_xec_port_set_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* GPIO output registers are used for writing */
__IO uint32_t *gpio_base = GPIO_OUT_BASE(config);
@ -230,7 +230,7 @@ static int gpio_xec_port_set_bits_raw(struct device *dev, uint32_t mask)
static int gpio_xec_port_clear_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* GPIO output registers are used for writing */
__IO uint32_t *gpio_base = GPIO_OUT_BASE(config);
@ -242,7 +242,7 @@ static int gpio_xec_port_clear_bits_raw(struct device *dev, uint32_t mask)
static int gpio_xec_port_toggle_bits(struct device *dev, uint32_t mask)
{
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* GPIO output registers are used for writing */
__IO uint32_t *gpio_base = GPIO_OUT_BASE(config);
@ -254,7 +254,7 @@ static int gpio_xec_port_toggle_bits(struct device *dev, uint32_t mask)
static int gpio_xec_port_get_raw(struct device *dev, uint32_t *value)
{
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* GPIO input registers are used for reading */
__IO uint32_t *gpio_base = GPIO_IN_BASE(config);
@ -277,7 +277,7 @@ static int gpio_xec_manage_callback(struct device *dev,
static void gpio_gpio_xec_port_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
struct gpio_xec_data *data = dev->driver_data;
uint32_t girq_result;
@ -333,7 +333,7 @@ DEVICE_AND_API_INIT(gpio_xec_port000_036,
static int gpio_xec_port000_036_init(struct device *dev)
{
#if DT_IRQ_HAS_CELL(DT_NODELABEL(gpio_000_036), irq)
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* Turn on the block enable in the EC aggregator */
MCHP_GIRQ_BLK_SETEN(config->girq_id);
@ -378,7 +378,7 @@ DEVICE_AND_API_INIT(gpio_xec_port040_076,
static int gpio_xec_port040_076_init(struct device *dev)
{
#if DT_IRQ_HAS_CELL(DT_NODELABEL(gpio_040_076), irq)
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* Turn on the block enable in the EC aggregator */
MCHP_GIRQ_BLK_SETEN(config->girq_id);
@ -423,7 +423,7 @@ DEVICE_AND_API_INIT(gpio_xec_port100_136,
static int gpio_xec_port100_136_init(struct device *dev)
{
#if DT_IRQ_HAS_CELL(DT_NODELABEL(gpio_100_136), irq)
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* Turn on the block enable in the EC aggregator */
MCHP_GIRQ_BLK_SETEN(config->girq_id);
@ -468,7 +468,7 @@ DEVICE_AND_API_INIT(gpio_xec_port140_176,
static int gpio_xec_port140_176_init(struct device *dev)
{
#if DT_IRQ_HAS_CELL(DT_NODELABEL(gpio_140_176), irq)
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* Turn on the block enable in the EC aggregator */
MCHP_GIRQ_BLK_SETEN(config->girq_id);
@ -513,7 +513,7 @@ DEVICE_AND_API_INIT(gpio_xec_port200_236,
static int gpio_xec_port200_236_init(struct device *dev)
{
#if DT_IRQ_HAS_CELL(DT_NODELABEL(gpio_200_236), irq)
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* Turn on the block enable in the EC aggregator */
MCHP_GIRQ_BLK_SETEN(config->girq_id);
@ -558,7 +558,7 @@ DEVICE_AND_API_INIT(gpio_xec_port240_276,
static int gpio_xec_port240_276_init(struct device *dev)
{
#if DT_IRQ_HAS_CELL(DT_NODELABEL(gpio_240_276), irq)
const struct gpio_xec_config *config = dev->config_info;
const struct gpio_xec_config *config = dev->config;
/* Turn on the block enable in the EC aggregator */
MCHP_GIRQ_BLK_SETEN(config->girq_id);

View file

@ -360,7 +360,7 @@ static const struct gpio_driver_api api_table = {
static int mcp23s17_init(struct device *dev)
{
const struct mcp23s17_config *const config =
dev->config_info;
dev->config;
struct mcp23s17_drv_data *const drv_data =
(struct mcp23s17_drv_data *const)dev->driver_data;

View file

@ -34,7 +34,7 @@ struct gpio_mcux_data {
static int gpio_mcux_configure(struct device *dev,
gpio_pin_t pin, gpio_flags_t flags)
{
const struct gpio_mcux_config *config = dev->config_info;
const struct gpio_mcux_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
PORT_Type *port_base = config->port_base;
uint32_t mask = 0U;
@ -100,7 +100,7 @@ static int gpio_mcux_configure(struct device *dev,
static int gpio_mcux_port_get_raw(struct device *dev, uint32_t *value)
{
const struct gpio_mcux_config *config = dev->config_info;
const struct gpio_mcux_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
*value = gpio_base->PDIR;
@ -111,7 +111,7 @@ static int gpio_mcux_port_get_raw(struct device *dev, uint32_t *value)
static int gpio_mcux_port_set_masked_raw(struct device *dev, uint32_t mask,
uint32_t value)
{
const struct gpio_mcux_config *config = dev->config_info;
const struct gpio_mcux_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->PDOR = (gpio_base->PDOR & ~mask) | (mask & value);
@ -121,7 +121,7 @@ static int gpio_mcux_port_set_masked_raw(struct device *dev, uint32_t mask,
static int gpio_mcux_port_set_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_mcux_config *config = dev->config_info;
const struct gpio_mcux_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->PSOR = mask;
@ -131,7 +131,7 @@ static int gpio_mcux_port_set_bits_raw(struct device *dev, uint32_t mask)
static int gpio_mcux_port_clear_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_mcux_config *config = dev->config_info;
const struct gpio_mcux_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->PCOR = mask;
@ -141,7 +141,7 @@ static int gpio_mcux_port_clear_bits_raw(struct device *dev, uint32_t mask)
static int gpio_mcux_port_toggle_bits(struct device *dev, uint32_t mask)
{
const struct gpio_mcux_config *config = dev->config_info;
const struct gpio_mcux_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->PTOR = mask;
@ -186,7 +186,7 @@ static int gpio_mcux_pin_interrupt_configure(struct device *dev,
gpio_pin_t pin, enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
const struct gpio_mcux_config *config = dev->config_info;
const struct gpio_mcux_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
PORT_Type *port_base = config->port_base;
@ -225,7 +225,7 @@ static int gpio_mcux_manage_callback(struct device *dev,
static void gpio_mcux_port_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct gpio_mcux_config *config = dev->config_info;
const struct gpio_mcux_config *config = dev->config;
struct gpio_mcux_data *data = dev->driver_data;
uint32_t int_status;

View file

@ -31,7 +31,7 @@ struct mcux_igpio_data {
static int mcux_igpio_configure(struct device *dev,
gpio_pin_t pin, gpio_flags_t flags)
{
const struct mcux_igpio_config *config = dev->config_info;
const struct mcux_igpio_config *config = dev->config;
GPIO_Type *base = config->base;
if (((flags & GPIO_INPUT) != 0) && ((flags & GPIO_OUTPUT) != 0)) {
@ -61,7 +61,7 @@ static int mcux_igpio_configure(struct device *dev,
static int mcux_igpio_port_get_raw(struct device *dev, uint32_t *value)
{
const struct mcux_igpio_config *config = dev->config_info;
const struct mcux_igpio_config *config = dev->config;
GPIO_Type *base = config->base;
*value = base->DR;
@ -72,7 +72,7 @@ static int mcux_igpio_port_get_raw(struct device *dev, uint32_t *value)
static int mcux_igpio_port_set_masked_raw(struct device *dev, uint32_t mask,
uint32_t value)
{
const struct mcux_igpio_config *config = dev->config_info;
const struct mcux_igpio_config *config = dev->config;
GPIO_Type *base = config->base;
base->DR = (base->DR & ~mask) | (mask & value);
@ -82,7 +82,7 @@ static int mcux_igpio_port_set_masked_raw(struct device *dev, uint32_t mask,
static int mcux_igpio_port_set_bits_raw(struct device *dev, uint32_t mask)
{
const struct mcux_igpio_config *config = dev->config_info;
const struct mcux_igpio_config *config = dev->config;
GPIO_Type *base = config->base;
base->DR_SET = mask;
@ -92,7 +92,7 @@ static int mcux_igpio_port_set_bits_raw(struct device *dev, uint32_t mask)
static int mcux_igpio_port_clear_bits_raw(struct device *dev, uint32_t mask)
{
const struct mcux_igpio_config *config = dev->config_info;
const struct mcux_igpio_config *config = dev->config;
GPIO_Type *base = config->base;
base->DR_CLEAR = mask;
@ -102,7 +102,7 @@ static int mcux_igpio_port_clear_bits_raw(struct device *dev, uint32_t mask)
static int mcux_igpio_port_toggle_bits(struct device *dev, uint32_t mask)
{
const struct mcux_igpio_config *config = dev->config_info;
const struct mcux_igpio_config *config = dev->config;
GPIO_Type *base = config->base;
base->DR_TOGGLE = mask;
@ -114,7 +114,7 @@ static int mcux_igpio_pin_interrupt_configure(struct device *dev,
gpio_pin_t pin, enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
const struct mcux_igpio_config *config = dev->config_info;
const struct mcux_igpio_config *config = dev->config;
GPIO_Type *base = config->base;
unsigned int key;
uint8_t icr;
@ -174,7 +174,7 @@ static int mcux_igpio_manage_callback(struct device *dev,
static void mcux_igpio_port_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct mcux_igpio_config *config = dev->config_info;
const struct mcux_igpio_config *config = dev->config;
struct mcux_igpio_data *data = dev->driver_data;
GPIO_Type *base = config->base;
uint32_t int_flags;

View file

@ -63,7 +63,7 @@ struct gpio_mcux_lpc_data {
static int gpio_mcux_lpc_configure(struct device *dev, gpio_pin_t pin,
gpio_flags_t flags)
{
const struct gpio_mcux_lpc_config *config = dev->config_info;
const struct gpio_mcux_lpc_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
uint32_t port = config->port_no;
@ -116,7 +116,7 @@ static int gpio_mcux_lpc_configure(struct device *dev, gpio_pin_t pin,
static int gpio_mcux_lpc_port_get_raw(struct device *dev, uint32_t *value)
{
const struct gpio_mcux_lpc_config *config = dev->config_info;
const struct gpio_mcux_lpc_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
*value = gpio_base->PIN[config->port_no];
@ -127,7 +127,7 @@ static int gpio_mcux_lpc_port_get_raw(struct device *dev, uint32_t *value)
static int gpio_mcux_lpc_port_set_masked_raw(struct device *dev, uint32_t mask,
uint32_t value)
{
const struct gpio_mcux_lpc_config *config = dev->config_info;
const struct gpio_mcux_lpc_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
uint32_t port = config->port_no;
@ -142,7 +142,7 @@ static int gpio_mcux_lpc_port_set_masked_raw(struct device *dev, uint32_t mask,
static int gpio_mcux_lpc_port_set_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_mcux_lpc_config *config = dev->config_info;
const struct gpio_mcux_lpc_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->SET[config->port_no] = mask;
@ -152,7 +152,7 @@ static int gpio_mcux_lpc_port_set_bits_raw(struct device *dev, uint32_t mask)
static int gpio_mcux_lpc_port_clear_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_mcux_lpc_config *config = dev->config_info;
const struct gpio_mcux_lpc_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->CLR[config->port_no] = mask;
@ -162,7 +162,7 @@ static int gpio_mcux_lpc_port_clear_bits_raw(struct device *dev, uint32_t mask)
static int gpio_mcux_lpc_port_toggle_bits(struct device *dev, uint32_t mask)
{
const struct gpio_mcux_lpc_config *config = dev->config_info;
const struct gpio_mcux_lpc_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->NOT[config->port_no] = mask;
@ -173,7 +173,7 @@ static int gpio_mcux_lpc_port_toggle_bits(struct device *dev, uint32_t mask)
static void gpio_mcux_lpc_port_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct gpio_mcux_lpc_config *config = dev->config_info;
const struct gpio_mcux_lpc_config *config = dev->config;
struct gpio_mcux_lpc_data *data = dev->driver_data;
uint32_t enabled_int;
uint32_t int_flags;
@ -245,7 +245,7 @@ static int gpio_mcux_lpc_pin_interrupt_configure(struct device *dev,
gpio_pin_t pin, enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
const struct gpio_mcux_lpc_config *config = dev->config_info;
const struct gpio_mcux_lpc_config *config = dev->config;
struct gpio_mcux_lpc_data *data = dev->driver_data;
pint_pin_enable_t interruptMode = kPINT_PinIntEnableNone;
GPIO_Type *gpio_base = config->gpio_base;
@ -318,7 +318,7 @@ static int gpio_mcux_lpc_manage_cb(struct device *port,
static int gpio_mcux_lpc_init(struct device *dev)
{
const struct gpio_mcux_lpc_config *config = dev->config_info;
const struct gpio_mcux_lpc_config *config = dev->config;
struct gpio_mcux_lpc_data *data = dev->driver_data;
int i;

View file

@ -166,7 +166,7 @@ static const struct gpio_driver_api gpio_mmio32_api = {
int gpio_mmio32_init(struct device *dev)
{
struct gpio_mmio32_context *context = dev->driver_data;
const struct gpio_mmio32_config *config = dev->config_info;
const struct gpio_mmio32_config *config = dev->config;
context->config = config;
dev->driver_api = &gpio_mmio32_api;

View file

@ -42,7 +42,7 @@ static inline struct gpio_nrfx_data *get_port_data(struct device *port)
static inline const struct gpio_nrfx_cfg *get_port_cfg(struct device *port)
{
return port->config_info;
return port->config;
}
static int gpiote_channel_alloc(atomic_t *mask, uint32_t abs_pin,

View file

@ -99,8 +99,7 @@ struct gpio_pca95xx_drv_data {
*/
static int read_port_regs(struct device *dev, uint8_t reg, uint16_t *buf)
{
const struct gpio_pca95xx_config * const config =
dev->config_info;
const struct gpio_pca95xx_config * const config = dev->config;
struct gpio_pca95xx_drv_data * const drv_data =
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
struct device * const i2c_master = drv_data->i2c_master;
@ -139,8 +138,7 @@ static int read_port_regs(struct device *dev, uint8_t reg, uint16_t *buf)
static int write_port_regs(struct device *dev, uint8_t reg,
uint16_t *cache, uint16_t value)
{
const struct gpio_pca95xx_config * const config =
dev->config_info;
const struct gpio_pca95xx_config * const config = dev->config;
struct gpio_pca95xx_drv_data * const drv_data =
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
struct device * const i2c_master = drv_data->i2c_master;
@ -252,8 +250,7 @@ static int setup_pin_dir(struct device *dev, uint32_t pin, int flags)
*/
static int setup_pin_pullupdown(struct device *dev, uint32_t pin, int flags)
{
const struct gpio_pca95xx_config * const config =
dev->config_info;
const struct gpio_pca95xx_config * const config = dev->config;
struct gpio_pca95xx_drv_data * const drv_data =
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
uint16_t reg_pud;
@ -316,8 +313,7 @@ static int gpio_pca95xx_config(struct device *dev,
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
#if (CONFIG_GPIO_LOG_LEVEL >= LOG_LEVEL_DEBUG)
const struct gpio_pca95xx_config * const config =
dev->config_info;
const struct gpio_pca95xx_config * const config = dev->config;
uint16_t i2c_addr = config->i2c_slave_addr;
#endif
@ -470,8 +466,7 @@ static const struct gpio_driver_api gpio_pca95xx_drv_api_funcs = {
*/
static int gpio_pca95xx_init(struct device *dev)
{
const struct gpio_pca95xx_config * const config =
dev->config_info;
const struct gpio_pca95xx_config * const config = dev->config;
struct gpio_pca95xx_drv_data * const drv_data =
(struct gpio_pca95xx_drv_data * const)dev->driver_data;
struct device *i2c_master;

View file

@ -72,7 +72,7 @@ static uint32_t get_port_pcr_irqc_value_from_flags(struct device *dev,
static int gpio_rv32m1_configure(struct device *dev,
gpio_pin_t pin, gpio_flags_t flags)
{
const struct gpio_rv32m1_config *config = dev->config_info;
const struct gpio_rv32m1_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
PORT_Type *port_base = config->port_base;
uint32_t mask = 0U;
@ -154,7 +154,7 @@ static int gpio_rv32m1_configure(struct device *dev,
static int gpio_rv32m1_port_get_raw(struct device *dev, uint32_t *value)
{
const struct gpio_rv32m1_config *config = dev->config_info;
const struct gpio_rv32m1_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
*value = gpio_base->PDIR;
@ -165,7 +165,7 @@ static int gpio_rv32m1_port_get_raw(struct device *dev, uint32_t *value)
static int gpio_rv32m1_port_set_masked_raw(struct device *dev, uint32_t mask,
uint32_t value)
{
const struct gpio_rv32m1_config *config = dev->config_info;
const struct gpio_rv32m1_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->PDOR = (gpio_base->PDOR & ~mask) | (mask & value);
@ -175,7 +175,7 @@ static int gpio_rv32m1_port_set_masked_raw(struct device *dev, uint32_t mask,
static int gpio_rv32m1_port_set_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_rv32m1_config *config = dev->config_info;
const struct gpio_rv32m1_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->PSOR = mask;
@ -185,7 +185,7 @@ static int gpio_rv32m1_port_set_bits_raw(struct device *dev, uint32_t mask)
static int gpio_rv32m1_port_clear_bits_raw(struct device *dev, uint32_t mask)
{
const struct gpio_rv32m1_config *config = dev->config_info;
const struct gpio_rv32m1_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->PCOR = mask;
@ -195,7 +195,7 @@ static int gpio_rv32m1_port_clear_bits_raw(struct device *dev, uint32_t mask)
static int gpio_rv32m1_port_toggle_bits(struct device *dev, uint32_t mask)
{
const struct gpio_rv32m1_config *config = dev->config_info;
const struct gpio_rv32m1_config *config = dev->config;
GPIO_Type *gpio_base = config->gpio_base;
gpio_base->PTOR = mask;
@ -207,7 +207,7 @@ static int gpio_rv32m1_pin_interrupt_configure(struct device *dev,
gpio_pin_t pin, enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
const struct gpio_rv32m1_config *config = dev->config_info;
const struct gpio_rv32m1_config *config = dev->config;
PORT_Type *port_base = config->port_base;
/* Check for an invalid pin number */
@ -242,7 +242,7 @@ static int gpio_rv32m1_manage_callback(struct device *dev,
static void gpio_rv32m1_port_isr(void *arg)
{
struct device *dev = (struct device *)arg;
const struct gpio_rv32m1_config *config = dev->config_info;
const struct gpio_rv32m1_config *config = dev->config;
struct gpio_rv32m1_data *data = dev->driver_data;
uint32_t int_status;
@ -256,7 +256,7 @@ static void gpio_rv32m1_port_isr(void *arg)
static int gpio_rv32m1_init(struct device *dev)
{
const struct gpio_rv32m1_config *config = dev->config_info;
const struct gpio_rv32m1_config *config = dev->config;
struct device *clk;
int ret;

View file

@ -32,7 +32,7 @@ struct gpio_sam_runtime {
};
#define DEV_CFG(dev) \
((const struct gpio_sam_config * const)(dev)->config_info)
((const struct gpio_sam_config * const)(dev)->config)
#define DEV_DATA(dev) \
((struct gpio_sam_runtime * const)(dev)->driver_data)

View file

@ -38,7 +38,7 @@ struct gpio_sam0_data {
};
#define DEV_CFG(dev) \
((const struct gpio_sam0_config *const)(dev)->config_info)
((const struct gpio_sam0_config *const)(dev)->config)
#define DEV_DATA(dev) \
((struct gpio_sam0_data *const)(dev)->driver_data)

View file

@ -60,7 +60,7 @@ struct gpio_sifive_data {
/* Helper Macros for GPIO */
#define DEV_GPIO_CFG(dev) \
((const struct gpio_sifive_config * const)(dev)->config_info)
((const struct gpio_sifive_config * const)(dev)->config)
#define DEV_GPIO(dev) \
((volatile struct gpio_sifive_t *)(DEV_GPIO_CFG(dev))->gpio_base_addr)
#define DEV_GPIO_DATA(dev) \

View file

@ -31,7 +31,7 @@ struct gpio_stellaris_runtime {
#define DEV_CFG(dev) \
((const struct gpio_stellaris_config *const) \
(dev)->config_info)
(dev)->config)
#define DEV_DATA(dev) \
((struct gpio_stellaris_runtime *const) \

View file

@ -315,7 +315,7 @@ static int gpio_stm32_enable_int(int port, int pin)
static int gpio_stm32_port_get_raw(struct device *dev, uint32_t *value)
{
const struct gpio_stm32_config *cfg = dev->config_info;
const struct gpio_stm32_config *cfg = dev->config;
GPIO_TypeDef *gpio = (GPIO_TypeDef *)cfg->base;
*value = LL_GPIO_ReadInputPort(gpio);
@ -327,7 +327,7 @@ static int gpio_stm32_port_set_masked_raw(struct device *dev,
gpio_port_pins_t mask,
gpio_port_value_t value)
{
const struct gpio_stm32_config *cfg = dev->config_info;
const struct gpio_stm32_config *cfg = dev->config;
GPIO_TypeDef *gpio = (GPIO_TypeDef *)cfg->base;
uint32_t port_value;
@ -344,7 +344,7 @@ static int gpio_stm32_port_set_masked_raw(struct device *dev,
static int gpio_stm32_port_set_bits_raw(struct device *dev,
gpio_port_pins_t pins)
{
const struct gpio_stm32_config *cfg = dev->config_info;
const struct gpio_stm32_config *cfg = dev->config;
GPIO_TypeDef *gpio = (GPIO_TypeDef *)cfg->base;
/*
@ -359,7 +359,7 @@ static int gpio_stm32_port_set_bits_raw(struct device *dev,
static int gpio_stm32_port_clear_bits_raw(struct device *dev,
gpio_port_pins_t pins)
{
const struct gpio_stm32_config *cfg = dev->config_info;
const struct gpio_stm32_config *cfg = dev->config;
GPIO_TypeDef *gpio = (GPIO_TypeDef *)cfg->base;
#ifdef CONFIG_SOC_SERIES_STM32F1X
@ -379,7 +379,7 @@ static int gpio_stm32_port_clear_bits_raw(struct device *dev,
static int gpio_stm32_port_toggle_bits(struct device *dev,
gpio_port_pins_t pins)
{
const struct gpio_stm32_config *cfg = dev->config_info;
const struct gpio_stm32_config *cfg = dev->config;
GPIO_TypeDef *gpio = (GPIO_TypeDef *)cfg->base;
/*
@ -399,7 +399,7 @@ static int gpio_stm32_port_toggle_bits(struct device *dev,
static int gpio_stm32_config(struct device *dev,
gpio_pin_t pin, gpio_flags_t flags)
{
const struct gpio_stm32_config *cfg = dev->config_info;
const struct gpio_stm32_config *cfg = dev->config;
int err = 0;
int pincfg;
@ -429,7 +429,7 @@ static int gpio_stm32_pin_interrupt_configure(struct device *dev,
gpio_pin_t pin, enum gpio_int_mode mode,
enum gpio_int_trig trig)
{
const struct gpio_stm32_config *cfg = dev->config_info;
const struct gpio_stm32_config *cfg = dev->config;
int edge = 0;
int err = 0;
@ -508,7 +508,7 @@ static const struct gpio_driver_api gpio_stm32_driver = {
*/
static int gpio_stm32_init(struct device *device)
{
const struct gpio_stm32_config *cfg = device->config_info;
const struct gpio_stm32_config *cfg = device->config;
/* enable clock for subsystem */
struct device *clk =

View file

@ -177,7 +177,7 @@ static inline int i2c_reg_write_byte_be(struct device *dev, uint16_t dev_addr,
static int sx1509b_handle_interrupt(void *arg)
{
struct device *dev = (struct device *) arg;
const struct sx1509b_config *cfg = dev->config_info;
const struct sx1509b_config *cfg = dev->config;
struct sx1509b_drv_data *drv_data = dev->driver_data;
int ret = 0;
uint16_t int_source;
@ -232,7 +232,7 @@ static int sx1509b_config(struct device *dev,
gpio_pin_t pin,
gpio_flags_t flags)
{
const struct sx1509b_config *cfg = dev->config_info;
const struct sx1509b_config *cfg = dev->config;
struct sx1509b_drv_data *drv_data = dev->driver_data;
struct sx1509b_pin_state *pins = &drv_data->pin_state;
struct {
@ -370,7 +370,7 @@ out:
static int port_get(struct device *dev,
gpio_port_value_t *value)
{
const struct sx1509b_config *cfg = dev->config_info;
const struct sx1509b_config *cfg = dev->config;
struct sx1509b_drv_data *drv_data = dev->driver_data;
uint16_t pin_data;
int rc = 0;
@ -409,7 +409,7 @@ static int port_write(struct device *dev,
return -EWOULDBLOCK;
}
const struct sx1509b_config *cfg = dev->config_info;
const struct sx1509b_config *cfg = dev->config;
struct sx1509b_drv_data *drv_data = dev->driver_data;
uint16_t *outp = &drv_data->pin_state.data;
@ -473,7 +473,7 @@ static int pin_interrupt_configure(struct device *dev,
return -ENOTSUP;
}
const struct sx1509b_config *cfg = dev->config_info;
const struct sx1509b_config *cfg = dev->config;
struct sx1509b_drv_data *drv_data = dev->driver_data;
struct sx1509b_irq_state *irq = &drv_data->irq_state;
struct {
@ -532,7 +532,7 @@ static int pin_interrupt_configure(struct device *dev,
*/
static int sx1509b_init(struct device *dev)
{
const struct sx1509b_config *cfg = dev->config_info;
const struct sx1509b_config *cfg = dev->config;
struct sx1509b_drv_data *drv_data = dev->driver_data;
int rc;

View file

@ -52,7 +52,7 @@ static inline struct i2c_cc13xx_cc26xx_data *get_dev_data(struct device *dev)
static inline const struct i2c_cc13xx_cc26xx_config *
get_dev_config(struct device *dev)
{
return dev->config_info;
return dev->config;
}
static int i2c_cc13xx_cc26xx_transmit(struct device *dev, const uint8_t *buf,

View file

@ -39,7 +39,7 @@ LOG_MODULE_REGISTER(i2c_cc32xx);
#define IS_I2C_MSG_WRITE(flags) ((flags & I2C_MSG_RW_MASK) == I2C_MSG_WRITE)
#define DEV_CFG(dev) \
((const struct i2c_cc32xx_config *const)(dev)->config_info)
((const struct i2c_cc32xx_config *const)(dev)->config)
#define DEV_DATA(dev) \
((struct i2c_cc32xx_data *const)(dev)->driver_data)
#define DEV_BASE(dev) \

Some files were not shown because too many files have changed in this diff Show more