Lines Matching refs:meson

122 	struct meson_pwm *meson = to_meson_pwm(chip);  in meson_pwm_request()  local
123 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm]; in meson_pwm_request()
139 struct meson_pwm *meson = to_meson_pwm(chip); in meson_pwm_free() local
140 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm]; in meson_pwm_free()
148 struct meson_pwm *meson = to_meson_pwm(chip); in meson_pwm_calc() local
149 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm]; in meson_pwm_calc()
209 struct meson_pwm *meson = to_meson_pwm(chip); in meson_pwm_enable() local
210 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm]; in meson_pwm_enable()
222 spin_lock_irqsave(&meson->lock, flags); in meson_pwm_enable()
226 writel(value, meson->base + channel_data->reg_offset); in meson_pwm_enable()
228 value = readl(meson->base + REG_MISC_AB); in meson_pwm_enable()
230 writel(value, meson->base + REG_MISC_AB); in meson_pwm_enable()
232 spin_unlock_irqrestore(&meson->lock, flags); in meson_pwm_enable()
237 struct meson_pwm *meson = to_meson_pwm(chip); in meson_pwm_disable() local
241 spin_lock_irqsave(&meson->lock, flags); in meson_pwm_disable()
243 value = readl(meson->base + REG_MISC_AB); in meson_pwm_disable()
245 writel(value, meson->base + REG_MISC_AB); in meson_pwm_disable()
247 spin_unlock_irqrestore(&meson->lock, flags); in meson_pwm_disable()
253 struct meson_pwm *meson = to_meson_pwm(chip); in meson_pwm_apply() local
254 struct meson_pwm_channel *channel = &meson->channels[pwm->hwpwm]; in meson_pwm_apply()
293 struct meson_pwm *meson = to_meson_pwm(chip); in meson_pwm_cnt_to_ns() local
298 channel = &meson->channels[pwm->hwpwm]; in meson_pwm_cnt_to_ns()
310 struct meson_pwm *meson = to_meson_pwm(chip); in meson_pwm_get_state() local
315 channel = &meson->channels[pwm->hwpwm]; in meson_pwm_get_state()
318 value = readl(meson->base + REG_MISC_AB); in meson_pwm_get_state()
321 value = readl(meson->base + channel_data->reg_offset); in meson_pwm_get_state()
343 struct meson_pwm *meson = to_meson_pwm(chip); in meson_pwm_init_clocks_meson8b() local
350 struct meson_pwm_channel *channel = &meson->channels[i]; in meson_pwm_init_clocks_meson8b()
362 channel->mux.reg = meson->base + REG_MISC_AB; in meson_pwm_init_clocks_meson8b()
367 channel->mux.lock = &meson->lock; in meson_pwm_init_clocks_meson8b()
386 channel->div.reg = meson->base + REG_MISC_AB; in meson_pwm_init_clocks_meson8b()
391 channel->div.lock = &meson->lock; in meson_pwm_init_clocks_meson8b()
408 channel->gate.reg = meson->base + REG_MISC_AB; in meson_pwm_init_clocks_meson8b()
412 channel->gate.lock = &meson->lock; in meson_pwm_init_clocks_meson8b()
430 struct meson_pwm *meson = to_meson_pwm(chip); in meson_pwm_init_channels_meson8b_legacy() local
438 mux_parent_data[i].name = meson->data->parent_names[i]; in meson_pwm_init_channels_meson8b_legacy()
474 struct meson_pwm *meson = to_meson_pwm(chip); in meson_pwm_init_channels_s4() local
478 meson->channels[i].clk = of_clk_get(np, i); in meson_pwm_init_channels_s4()
479 if (IS_ERR(meson->channels[i].clk)) in meson_pwm_init_channels_s4()
481 PTR_ERR(meson->channels[i].clk), in meson_pwm_init_channels_s4()
485 meson->channels[i].clk); in meson_pwm_init_channels_s4()
585 struct meson_pwm *meson; in meson_pwm_probe() local
588 chip = devm_pwmchip_alloc(&pdev->dev, MESON_NUM_PWMS, sizeof(*meson)); in meson_pwm_probe()
591 meson = to_meson_pwm(chip); in meson_pwm_probe()
593 meson->base = devm_platform_ioremap_resource(pdev, 0); in meson_pwm_probe()
594 if (IS_ERR(meson->base)) in meson_pwm_probe()
595 return PTR_ERR(meson->base); in meson_pwm_probe()
597 spin_lock_init(&meson->lock); in meson_pwm_probe()
600 meson->data = of_device_get_match_data(&pdev->dev); in meson_pwm_probe()
602 err = meson->data->channels_init(chip); in meson_pwm_probe()