Lines Matching +full:clock +full:- +full:bus

2  * Copyright (c) 2023-2024 Analog Devices, Inc.
4 * SPDX-License-Identifier: Apache-2.0
22 const struct device *clock; member
37 const struct max32_w1_config *const cfg = dev->config; in api_reset_bus()
38 mxc_owm_regs_t *regs = cfg->regs; in api_reset_bus()
40 /* 0 if no 1-wire devices responded during the presence pulse, 1 otherwise */ in api_reset_bus()
44 if (regs->ctrl_stat & MXC_F_OWM_CTRL_STAT_OW_INPUT) { in api_reset_bus()
61 /* if no slave connected to the bus, read bits shall be logical ones */ in api_read_bit()
64 return -EIO; in api_read_bit()
78 /* if no slave connected to the bus, write shall success */ in api_write_bit()
81 return -EIO; in api_write_bit()
95 /* if no slave connected to the bus, read bits shall be logical ones */ in api_read_byte()
98 return -EIO; in api_read_byte()
112 /* if no slave connected to the bus, write shall success */ in api_write_byte()
115 return -EIO; in api_write_byte()
131 const struct max32_w1_config *const dev_config = dev->config; in api_configure()
132 mxc_owm_regs_t *regs = dev_config->regs; in api_configure()
135 regs->cfg |= MXC_F_OWM_CFG_EXT_PULLUP_MODE; in api_configure()
137 regs->cfg &= ~MXC_F_OWM_CFG_EXT_PULLUP_MODE; in api_configure()
141 return -EINVAL; in api_configure()
150 const struct max32_w1_config *const cfg = dev->config; in w1_max32_init()
153 if (!device_is_ready(cfg->clock)) { in w1_max32_init()
154 LOG_ERR("clock control device not ready"); in w1_max32_init()
155 return -ENODEV; in w1_max32_init()
160 ret = clock_control_on(cfg->clock, (clock_control_subsys_t)&cfg->perclk); in w1_max32_init()
162 LOG_ERR("cannot enable OWM clock"); in w1_max32_init()
166 ret = pinctrl_apply_state(cfg->pctrl, PINCTRL_STATE_DEFAULT); in w1_max32_init()
171 mxc_owm_cfg.int_pu_en = cfg->internal_pullup; in w1_max32_init()
172 mxc_owm_cfg.ext_pu_mode = cfg->external_pullup; in w1_max32_init()
173 mxc_owm_cfg.long_line_mode = cfg->long_line_mode; in w1_max32_init()
195 .clock = DEVICE_DT_GET(DT_INST_CLOCKS_CTLR(_num)), \
196 .perclk.bus = DT_INST_CLOCKS_CELL(_num, offset), \