Lines Matching refs:jz4740
125 struct jz4740_pwm_chip *jz4740 = to_jz4740(pwm->chip); in jz4740_pwm_apply() local
177 regmap_write(jz4740->map, TCU_REG_TCNTc(pwm->hwpwm), 0); in jz4740_pwm_apply()
180 regmap_write(jz4740->map, TCU_REG_TDHRc(pwm->hwpwm), duty); in jz4740_pwm_apply()
183 regmap_write(jz4740->map, TCU_REG_TDFRc(pwm->hwpwm), period); in jz4740_pwm_apply()
186 regmap_set_bits(jz4740->map, TCU_REG_TCSRc(pwm->hwpwm), in jz4740_pwm_apply()
203 regmap_update_bits(jz4740->map, TCU_REG_TCSRc(pwm->hwpwm), in jz4740_pwm_apply()
206 regmap_update_bits(jz4740->map, TCU_REG_TCSRc(pwm->hwpwm), in jz4740_pwm_apply()
226 struct jz4740_pwm_chip *jz4740; in jz4740_pwm_probe() local
233 jz4740 = devm_kzalloc(dev, sizeof(*jz4740), GFP_KERNEL); in jz4740_pwm_probe()
234 if (!jz4740) in jz4740_pwm_probe()
237 jz4740->map = device_node_to_regmap(dev->parent->of_node); in jz4740_pwm_probe()
238 if (IS_ERR(jz4740->map)) { in jz4740_pwm_probe()
239 dev_err(dev, "regmap not found: %ld\n", PTR_ERR(jz4740->map)); in jz4740_pwm_probe()
240 return PTR_ERR(jz4740->map); in jz4740_pwm_probe()
243 jz4740->chip.dev = dev; in jz4740_pwm_probe()
244 jz4740->chip.ops = &jz4740_pwm_ops; in jz4740_pwm_probe()
245 jz4740->chip.npwm = info->num_pwms; in jz4740_pwm_probe()
247 return devm_pwmchip_add(dev, &jz4740->chip); in jz4740_pwm_probe()