Lines Matching full:atmel

4  * Copyright (C) 2014 Atmel
11 #include <linux/mfd/atmel-hlcdc.h>
44 struct atmel_hlcdc_pwm *atmel = to_atmel_hlcdc_pwm(chip); in atmel_hlcdc_pwm_apply() local
45 struct atmel_hlcdc *hlcdc = atmel->hlcdc; in atmel_hlcdc_pwm_apply()
57 if (!atmel->errata || !atmel->errata->slow_clk_erratum) { in atmel_hlcdc_pwm_apply()
67 if ((atmel->errata && atmel->errata->slow_clk_erratum) || in atmel_hlcdc_pwm_apply()
80 if (!pres && atmel->errata && in atmel_hlcdc_pwm_apply()
81 atmel->errata->div1_clk_erratum) in atmel_hlcdc_pwm_apply()
93 if (new_clk != atmel->cur_clk) { in atmel_hlcdc_pwm_apply()
101 clk_disable_unprepare(atmel->cur_clk); in atmel_hlcdc_pwm_apply()
102 atmel->cur_clk = new_clk; in atmel_hlcdc_pwm_apply()
163 clk_disable_unprepare(atmel->cur_clk); in atmel_hlcdc_pwm_apply()
164 atmel->cur_clk = NULL; in atmel_hlcdc_pwm_apply()
185 struct atmel_hlcdc_pwm *atmel = to_atmel_hlcdc_pwm(chip); in atmel_hlcdc_pwm_suspend() local
190 clk_disable_unprepare(atmel->hlcdc->periph_clk); in atmel_hlcdc_pwm_suspend()
198 struct atmel_hlcdc_pwm *atmel = to_atmel_hlcdc_pwm(chip); in atmel_hlcdc_pwm_resume() local
204 ret = clk_prepare_enable(atmel->hlcdc->periph_clk); in atmel_hlcdc_pwm_resume()
217 .compatible = "atmel,at91sam9n12-hlcdc",
222 .compatible = "atmel,at91sam9x5-hlcdc",
226 .compatible = "atmel,sama5d2-hlcdc",
229 .compatible = "atmel,sama5d3-hlcdc",
233 .compatible = "atmel,sama5d4-hlcdc",
246 struct atmel_hlcdc_pwm *atmel; in atmel_hlcdc_pwm_probe() local
252 chip = devm_pwmchip_alloc(dev, 1, sizeof(*atmel)); in atmel_hlcdc_pwm_probe()
255 atmel = to_atmel_hlcdc_pwm(chip); in atmel_hlcdc_pwm_probe()
263 atmel->errata = match->data; in atmel_hlcdc_pwm_probe()
265 atmel->hlcdc = hlcdc; in atmel_hlcdc_pwm_probe()
282 struct atmel_hlcdc_pwm *atmel = to_atmel_hlcdc_pwm(chip); in atmel_hlcdc_pwm_remove() local
286 clk_disable_unprepare(atmel->hlcdc->periph_clk); in atmel_hlcdc_pwm_remove()
290 { .compatible = "atmel,hlcdc-pwm" },
297 .name = "atmel-hlcdc-pwm",
306 MODULE_ALIAS("platform:atmel-hlcdc-pwm");
308 MODULE_DESCRIPTION("Atmel HLCDC PWM driver");