Home
last modified time | relevance | path

Searched refs:zldev (Results 1 – 10 of 10) sorted by relevance

/linux/drivers/dpll/zl3073x/
H A Dcore.c133 zl3073x_check_reg(struct zl3073x_dev *zldev, unsigned int reg, size_t size) in zl3073x_check_reg() argument
140 lockdep_assert_held(&zldev->multiop_lock); in zl3073x_check_reg()
144 dev_err(zldev->dev, "Index out of range for reg 0x%04lx\n", in zl3073x_check_reg()
150 dev_err(zldev->dev, "Invalid size %zu for reg 0x%04lx\n", in zl3073x_check_reg()
159 zl3073x_read_reg(struct zl3073x_dev *zldev, unsigned int reg, void *val, in zl3073x_read_reg() argument
164 if (!zl3073x_check_reg(zldev, reg, size)) in zl3073x_read_reg()
170 rc = regmap_bulk_read(zldev->regmap, reg, val, size); in zl3073x_read_reg()
172 dev_err(zldev->dev, "Failed to read reg 0x%04x: %pe\n", reg, in zl3073x_read_reg()
181 zl3073x_write_reg(struct zl3073x_dev *zldev, unsigned int reg, const void *val, in zl3073x_write_reg() argument
186 if (!zl3073x_check_reg(zldev, reg, size)) in zl3073x_write_reg()
[all …]
H A Dcore.h85 int zl3073x_dev_probe(struct zl3073x_dev *zldev,
88 int zl3073x_dev_start(struct zl3073x_dev *zldev, bool full);
89 void zl3073x_dev_stop(struct zl3073x_dev *zldev);
91 static inline u8 zl3073x_dev_phase_avg_factor_get(struct zl3073x_dev *zldev) in zl3073x_dev_phase_avg_factor_get() argument
93 return zldev->phase_avg_factor; in zl3073x_dev_phase_avg_factor_get()
96 int zl3073x_dev_phase_avg_factor_set(struct zl3073x_dev *zldev, u8 factor);
124 int zl3073x_mb_op(struct zl3073x_dev *zldev, unsigned int op_reg, u8 op_val,
126 int zl3073x_poll_zero_u8(struct zl3073x_dev *zldev, unsigned int reg, u8 mask);
127 int zl3073x_read_u8(struct zl3073x_dev *zldev, unsigned int reg, u8 *val);
128 int zl3073x_read_u16(struct zl3073x_dev *zldev, unsigned int reg, u16 *val);
[all …]
H A Dref.c64 int zl3073x_ref_state_fetch(struct zl3073x_dev *zldev, u8 index) in zl3073x_ref_state_fetch() argument
66 struct zl3073x_ref *ref = &zldev->ref[index]; in zl3073x_ref_state_fetch()
88 guard(mutex)(&zldev->multiop_lock); in zl3073x_ref_state_fetch()
91 rc = zl3073x_mb_op(zldev, ZL_REG_REF_MB_SEM, ZL_REF_MB_SEM_RD, in zl3073x_ref_state_fetch()
97 rc = zl3073x_read_u8(zldev, ZL_REG_REF_CONFIG, &ref->config); in zl3073x_ref_state_fetch()
102 rc = zl3073x_read_u16(zldev, ZL_REG_REF_FREQ_BASE, &ref->freq_base); in zl3073x_ref_state_fetch()
105 rc = zl3073x_read_u16(zldev, ZL_REG_REF_FREQ_MULT, &ref->freq_mult); in zl3073x_ref_state_fetch()
108 rc = zl3073x_read_u16(zldev, ZL_REG_REF_RATIO_M, &ref->freq_ratio_m); in zl3073x_ref_state_fetch()
111 rc = zl3073x_read_u16(zldev, ZL_REG_REF_RATIO_N, &ref->freq_ratio_n); in zl3073x_ref_state_fetch()
116 rc = zl3073x_read_u32(zldev, ZL_REG_REF_ESYNC_DIV, &ref->esync_n_div); in zl3073x_ref_state_fetch()
[all …]
H A Dprop.c30 zl3073x_pin_check_freq(struct zl3073x_dev *zldev, enum dpll_pin_direction dir, in zl3073x_pin_check_freq() argument
49 synth = zl3073x_dev_out_synth_get(zldev, out); in zl3073x_pin_check_freq()
52 synth_freq = zl3073x_dev_synth_freq_get(zldev, synth); in zl3073x_pin_check_freq()
62 dev_warn(zldev->dev, in zl3073x_pin_check_freq()
84 zl3073x_prop_pin_package_label_set(struct zl3073x_dev *zldev, in zl3073x_prop_pin_package_label_set() argument
96 is_diff = zl3073x_dev_ref_is_diff(zldev, ref); in zl3073x_prop_pin_package_label_set()
102 is_diff = zl3073x_dev_out_is_diff(zldev, out); in zl3073x_prop_pin_package_label_set()
129 zl3073x_prop_pin_fwnode_get(struct zl3073x_dev *zldev, in zl3073x_prop_pin_fwnode_get() argument
142 pins_node = device_get_named_child_node(zldev->dev, node_name); in zl3073x_prop_pin_fwnode_get()
144 dev_dbg(zldev->dev, "'%s' sub-node is missing\n", node_name); in zl3073x_prop_pin_fwnode_get()
[all …]
H A Ddpll.c128 struct zl3073x_dev *zldev = zldpll->dev; in zl3073x_dpll_input_pin_esync_get() local
134 ref = zl3073x_ref_state_get(zldev, ref_id); in zl3073x_dpll_input_pin_esync_get()
169 struct zl3073x_dev *zldev = zldpll->dev; in zl3073x_dpll_input_pin_esync_set() local
175 ref = *zl3073x_ref_state_get(zldev, ref_id); in zl3073x_dpll_input_pin_esync_set()
192 return zl3073x_ref_state_set(zldev, ref_id, &ref); in zl3073x_dpll_input_pin_esync_set()
232 struct zl3073x_dev *zldev = zldpll->dev; in zl3073x_dpll_input_pin_frequency_set() local
239 ref = *zl3073x_ref_state_get(zldev, ref_id); in zl3073x_dpll_input_pin_frequency_set()
245 return zl3073x_ref_state_set(zldev, ref_id, &ref); in zl3073x_dpll_input_pin_frequency_set()
261 struct zl3073x_dev *zldev = zldpll->dev; in zl3073x_dpll_selected_ref_get() local
268 rc = zl3073x_read_u8(zldev, in zl3073x_dpll_selected_ref_get()
[all …]
H A Dspi.c14 struct zl3073x_dev *zldev; in zl3073x_spi_probe() local
16 zldev = zl3073x_devm_alloc(dev); in zl3073x_spi_probe()
17 if (IS_ERR(zldev)) in zl3073x_spi_probe()
18 return PTR_ERR(zldev); in zl3073x_spi_probe()
20 zldev->regmap = devm_regmap_init_spi(spi, &zl3073x_regmap_config); in zl3073x_spi_probe()
21 if (IS_ERR(zldev->regmap)) in zl3073x_spi_probe()
22 return dev_err_probe(dev, PTR_ERR(zldev->regmap), in zl3073x_spi_probe()
25 return zl3073x_dev_probe(zldev, spi_get_device_match_data(spi)); in zl3073x_spi_probe()
H A Di2c.c14 struct zl3073x_dev *zldev; in zl3073x_i2c_probe() local
16 zldev = zl3073x_devm_alloc(dev); in zl3073x_i2c_probe()
17 if (IS_ERR(zldev)) in zl3073x_i2c_probe()
18 return PTR_ERR(zldev); in zl3073x_i2c_probe()
20 zldev->regmap = devm_regmap_init_i2c(client, &zl3073x_regmap_config); in zl3073x_i2c_probe()
21 if (IS_ERR(zldev->regmap)) in zl3073x_i2c_probe()
22 return dev_err_probe(dev, PTR_ERR(zldev->regmap), in zl3073x_i2c_probe()
25 return zl3073x_dev_probe(zldev, i2c_get_match_data(client)); in zl3073x_i2c_probe()
H A Dfw.c198 zl3073x_fw_component_load(struct zl3073x_dev *zldev, in zl3073x_fw_component_load() argument
205 struct device *dev = zldev->dev; in zl3073x_fw_component_load()
307 struct zl3073x_fw *zl3073x_fw_load(struct zl3073x_dev *zldev, const char *data, in zl3073x_fw_load() argument
322 rc = zl3073x_fw_component_load(zldev, &comp, &data, &size, in zl3073x_fw_load()
363 zl3073x_fw_component_flash(struct zl3073x_dev *zldev, in zl3073x_fw_component_flash() argument
377 rc = zl3073x_flash_sectors(zldev, info->name, info->dest_page, in zl3073x_fw_component_flash()
382 rc = zl3073x_flash_page(zldev, info->name, info->dest_page, in zl3073x_fw_component_flash()
387 rc = zl3073x_flash_page(zldev, info->name, info->dest_page, in zl3073x_fw_component_flash()
391 rc = zl3073x_flash_page_copy(zldev, info->name, in zl3073x_fw_component_flash()
403 int zl3073x_fw_flash(struct zl3073x_dev *zldev, struct zl3073x_fw *zlfw, in zl3073x_fw_flash() argument
[all …]
H A Dref.h40 int zl3073x_ref_state_fetch(struct zl3073x_dev *zldev, u8 index);
42 const struct zl3073x_ref *zl3073x_ref_state_get(struct zl3073x_dev *zldev,
45 int zl3073x_ref_state_set(struct zl3073x_dev *zldev, u8 index,
H A Dprop.h26 enum dpll_type zl3073x_prop_dpll_type_get(struct zl3073x_dev *zldev, u8 index);
28 struct zl3073x_pin_props *zl3073x_pin_props_get(struct zl3073x_dev *zldev,