[go: nahoru, domu]

Searched refs:pwm (Results 1 - 25 of 116) sorted by relevance

12345

/drivers/pwm/
H A DMakefile3 obj-$(CONFIG_PWM_AB8500) += pwm-ab8500.o
4 obj-$(CONFIG_PWM_ATMEL) += pwm-atmel.o
5 obj-$(CONFIG_PWM_ATMEL_TCB) += pwm-atmel-tcb.o
6 obj-$(CONFIG_PWM_BCM_KONA) += pwm-bcm-kona.o
7 obj-$(CONFIG_PWM_BFIN) += pwm-bfin.o
8 obj-$(CONFIG_PWM_CLPS711X) += pwm-clps711x.o
9 obj-$(CONFIG_PWM_EP93XX) += pwm-ep93xx.o
10 obj-$(CONFIG_PWM_FSL_FTM) += pwm-fsl-ftm.o
11 obj-$(CONFIG_PWM_IMX) += pwm-imx.o
12 obj-$(CONFIG_PWM_JZ4740) += pwm
[all...]
H A Dcore.c23 #include <linux/pwm.h>
33 #include <dt-bindings/pwm/pwm.h>
44 static struct pwm_device *pwm_to_device(unsigned int pwm) argument
46 return radix_tree_lookup(&pwm_tree, pwm);
49 static int alloc_pwms(int pwm, unsigned int count) argument
54 if (pwm >= MAX_PWMS)
57 if (pwm >= 0)
58 from = pwm;
63 if (pwm >
77 struct pwm_device *pwm = &chip->pwms[i]; local
110 pwm_device_request(struct pwm_device *pwm, const char *label) argument
137 struct pwm_device *pwm; local
163 struct pwm_device *pwm; local
204 pwm_set_chip_data(struct pwm_device *pwm, void *data) argument
219 pwm_get_chip_data(struct pwm_device *pwm) argument
234 struct pwm_device *pwm; local
299 struct pwm_device *pwm = &chip->pwms[i]; local
329 pwm_request(int pwm, const char *label) argument
370 struct pwm_device *pwm; local
394 pwm_free(struct pwm_device *pwm) argument
406 pwm_config(struct pwm_device *pwm, int duty_ns, int period_ns) argument
431 pwm_set_polarity(struct pwm_device *pwm, enum pwm_polarity polarity) argument
458 pwm_enable(struct pwm_device *pwm) argument
471 pwm_disable(struct pwm_device *pwm) argument
513 struct pwm_device *pwm = NULL; local
602 struct pwm_device *pwm = ERR_PTR(-EPROBE_DEFER); local
686 pwm_put(struct pwm_device *pwm) argument
724 struct pwm_device **ptr, *pwm; local
754 struct pwm_device **ptr, *pwm; local
791 devm_pwm_put(struct device *dev, struct pwm_device *pwm) argument
803 pwm_can_sleep(struct pwm_device *pwm) argument
815 struct pwm_device *pwm = &chip->pwms[i]; local
[all...]
H A Dpwm-renesas-tpu.c26 #include <linux/pwm.h>
100 static void tpu_pwm_write(struct tpu_pwm_device *pwm, int reg_nr, u16 value) argument
102 void __iomem *base = pwm->tpu->base + TPU_CHANNEL_OFFSET
103 + pwm->channel * TPU_CHANNEL_SIZE;
108 static void tpu_pwm_set_pin(struct tpu_pwm_device *pwm, argument
113 dev_dbg(&pwm->tpu->pdev->dev, "%u: configuring pin as %s\n",
114 pwm->channel, states[state]);
118 tpu_pwm_write(pwm, TPU_TIORn,
119 pwm->polarity == PWM_POLARITY_INVERSED ?
123 tpu_pwm_write(pwm, TPU_TIOR
135 tpu_pwm_start_stop(struct tpu_pwm_device *pwm, int start) argument
152 tpu_pwm_timer_start(struct tpu_pwm_device *pwm) argument
199 tpu_pwm_timer_stop(struct tpu_pwm_device *pwm) argument
221 struct tpu_pwm_device *pwm; local
246 struct tpu_pwm_device *pwm = pwm_get_chip_data(_pwm); local
256 struct tpu_pwm_device *pwm = pwm_get_chip_data(_pwm); local
338 struct tpu_pwm_device *pwm = pwm_get_chip_data(_pwm); local
347 struct tpu_pwm_device *pwm = pwm_get_chip_data(_pwm); local
369 struct tpu_pwm_device *pwm = pwm_get_chip_data(_pwm); local
[all...]
H A Dpwm-jz4740.c22 #include <linux/pwm.h>
50 static int jz4740_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) argument
52 unsigned int gpio = jz4740_pwm_gpio_list[pwm->hwpwm];
59 if (pwm->hwpwm < 2)
62 ret = gpio_request(gpio, pwm->label);
71 jz4740_timer_start(pwm->hwpwm);
76 static void jz4740_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) argument
78 unsigned int gpio = jz4740_pwm_gpio_list[pwm->hwpwm];
80 jz4740_timer_set_ctrl(pwm->hwpwm, 0);
85 jz4740_timer_stop(pwm
88 jz4740_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
99 jz4740_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
108 jz4740_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, int duty_ns, int period_ns) argument
[all...]
H A Dpwm-bfin.c11 #include <linux/pwm.h>
30 static int bfin_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) argument
35 if (pwm->hwpwm >= ARRAY_SIZE(pwm_to_gptimer_per))
42 priv->pin = pwm_to_gptimer_per[pwm->hwpwm];
50 pwm_set_chip_data(pwm, priv);
55 static void bfin_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) argument
57 struct bfin_pwm *priv = pwm_get_chip_data(pwm);
65 static int bfin_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
68 struct bfin_pwm *priv = pwm_get_chip_data(pwm);
90 static int bfin_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
99 bfin_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
117 struct bfin_pwm_chip *pwm; local
144 struct bfin_pwm_chip *pwm = platform_get_drvdata(pdev); local
[all...]
H A Dsysfs.c24 #include <linux/pwm.h>
28 struct pwm_device *pwm; member in struct:pwm_export
40 return export->pwm;
47 const struct pwm_device *pwm = child_to_pwm_device(child); local
49 return sprintf(buf, "%u\n", pwm->period);
56 struct pwm_device *pwm = child_to_pwm_device(child); local
64 ret = pwm_config(pwm, pwm->duty_cycle, val);
73 const struct pwm_device *pwm = child_to_pwm_device(child); local
75 return sprintf(buf, "%u\n", pwm
82 struct pwm_device *pwm = child_to_pwm_device(child); local
99 const struct pwm_device *pwm = child_to_pwm_device(child); local
109 struct pwm_device *pwm = child_to_pwm_device(child); local
135 const struct pwm_device *pwm = child_to_pwm_device(child); local
144 struct pwm_device *pwm = child_to_pwm_device(child); local
172 ATTRIBUTE_GROUPS(pwm); variable
181 pwm_export_child(struct device *parent, struct pwm_device *pwm) argument
218 pwm_unexport_child(struct device *parent, struct pwm_device *pwm) argument
242 struct pwm_device *pwm; local
[all...]
H A Dpwm-tegra.c2 * drivers/pwm/pwm-tegra.c
7 * Based on arch/arm/plat-mxc/pwm.c by Sascha Hauer <s.hauer@pengutronix.de>
29 #include <linux/pwm.h>
66 static int tegra_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
115 if (!test_bit(PWMF_ENABLED, &pwm->flags)) {
122 pwm_writel(pc, pwm->hwpwm, val);
127 if (!test_bit(PWMF_ENABLED, &pwm->flags))
133 static int tegra_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
143 val = pwm_readl(pc, pwm
150 tegra_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
171 struct tegra_pwm_chip *pwm; local
215 struct pwm_device *pwm = &pc->chip.pwms[i]; local
[all...]
H A Dpwm-pxa.c2 * drivers/pwm/pwm-pxa.c
21 #include <linux/pwm.h>
30 { "pxa25x-pwm", 0 },
31 { "pxa27x-pwm", HAS_SECONDARY_PWM },
32 { "pxa168-pwm", 0 },
33 { "pxa910-pwm", 0 },
63 static int pxa_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
72 offset = pwm->hwpwm ? 0x10 : 0;
107 static int pxa_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
114 pxa_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
157 struct pwm_device *pwm; local
171 struct pxa_pwm_chip *pwm; local
[all...]
H A Dpwm-twl.c23 #include <linux/pwm.h>
43 #define TWL4030_PWM_TOGGLE(pwm, x) ((x) << (pwm))
57 #define TWL6030_PWM_TOGGLE(pwm, x) ((x) << (pwm * 3))
71 static int twl_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
94 base = pwm->hwpwm * 3;
100 dev_err(chip->dev, "%s: Failed to configure PWM\n", pwm->label);
105 static int twl4030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
114 dev_err(chip->dev, "%s: Failed to read GPBR1\n", pwm
135 twl4030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
164 twl4030_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) argument
202 twl4030_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) argument
232 twl6030_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
255 twl6030_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
[all...]
H A Dpwm-pca9685.c6 * based on the pwm-twl-led.c driver
24 #include <linux/pwm.h>
69 static int pca9685_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
77 if (pwm->hwpwm >= PCA9685_MAXCHAN)
80 reg = LED_N_OFF_H(pwm->hwpwm);
88 if (pwm->hwpwm >= PCA9685_MAXCHAN)
91 reg = LED_N_ON_H(pwm->hwpwm);
101 if (pwm->hwpwm >= PCA9685_MAXCHAN)
104 reg = LED_N_OFF_L(pwm->hwpwm);
108 if (pwm
118 pca9685_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
155 pca9685_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
176 pca9685_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) argument
187 pca9685_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) argument
[all...]
H A Dpwm-vt8500.c2 * drivers/pwm/pwm-vt8500.c
23 #include <linux/pwm.h>
39 #define REG_CTRL(pwm) (((pwm) << 4) + 0x00)
40 #define REG_SCALAR(pwm) (((pwm) << 4) + 0x04)
41 #define REG_PERIOD(pwm) (((pwm) << 4) + 0x08)
42 #define REG_DUTY(pwm) (((pw
80 vt8500_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, int duty_ns, int period_ns) argument
134 vt8500_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
154 vt8500_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
167 vt8500_pwm_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm, enum pwm_polarity polarity) argument
[all...]
H A Dpwm-clps711x.c17 #include <linux/pwm.h>
48 static unsigned int clps711x_get_duty(struct pwm_device *pwm, unsigned int v) argument
51 return DIV_ROUND_CLOSEST(v * 0xf, pwm_get_period(pwm));
54 static int clps711x_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) argument
63 pwm_set_period(pwm, DIV_ROUND_CLOSEST(NSEC_PER_SEC, freq));
68 static int clps711x_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
74 if (period_ns != pwm_get_period(pwm))
77 duty = clps711x_get_duty(pwm, duty_ns);
78 clps711x_pwm_update_val(priv, pwm->hwpwm, duty);
83 static int clps711x_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
94 clps711x_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
[all...]
H A Dpwm-atmel.c17 #include <linux/pwm.h>
63 void (*config)(struct pwm_chip *chip, struct pwm_device *pwm,
101 static int atmel_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
111 if (test_bit(PWMF_ENABLED, &pwm->flags) && (period_ns != pwm->period)) {
143 val = atmel_pwm_ch_readl(atmel_pwm, pwm->hwpwm, PWM_CMR);
145 atmel_pwm_ch_writel(atmel_pwm, pwm->hwpwm, PWM_CMR, val);
146 atmel_pwm->config(chip, pwm, dty, prd);
152 static void atmel_pwm_config_v1(struct pwm_chip *chip, struct pwm_device *pwm, argument
158 if (test_bit(PWMF_ENABLED, &pwm
178 atmel_pwm_config_v2(struct pwm_chip *chip, struct pwm_device *pwm, unsigned long dty, unsigned long prd) argument
199 atmel_pwm_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm, enum pwm_polarity polarity) argument
226 atmel_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
242 atmel_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
[all...]
H A Dpwm-twl-led.c7 * This driver is a complete rewrite of the former pwm-twl6030.c authorded by:
26 #include <linux/pwm.h>
69 static int twl4030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
92 base = pwm->hwpwm * 2 + TWL4030_PWMA_REG;
98 dev_err(chip->dev, "%s: Failed to configure PWM\n", pwm->label);
103 static int twl4030_pwmled_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
112 dev_err(chip->dev, "%s: Failed to read LEDEN\n", pwm->label);
116 val |= TWL4030_LED_TOGGLE(pwm->hwpwm, TWL4030_LED_PINS);
120 dev_err(chip->dev, "%s: Failed to enable PWM\n", pwm->label);
128 struct pwm_device *pwm)
127 twl4030_pwmled_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
151 twl6030_pwmled_config(struct pwm_chip *chip, struct pwm_device *pwm, int duty_ns, int period_ns) argument
168 twl6030_pwmled_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
194 twl6030_pwmled_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
220 twl6030_pwmled_request(struct pwm_chip *chip, struct pwm_device *pwm) argument
246 twl6030_pwmled_free(struct pwm_chip *chip, struct pwm_device *pwm) argument
[all...]
H A Dpwm-lpss.h6 * Derived from the original pwm-lpss.c
17 #include <linux/pwm.h>
H A Dpwm-atmel-tcb.c21 #include <linux/pwm.h>
53 struct pwm_device *pwm,
56 struct atmel_tcb_pwm_device *tcbpwm = pwm_get_chip_data(pwm);
64 struct pwm_device *pwm)
70 unsigned group = pwm->hwpwm / 2;
71 unsigned index = pwm->hwpwm % 2;
85 pwm_set_chip_data(pwm, tcbpwm);
116 tcbpwmc->pwms[pwm->hwpwm] = tcbpwm;
121 static void atmel_tcb_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) argument
124 struct atmel_tcb_pwm_device *tcbpwm = pwm_get_chip_data(pwm);
52 atmel_tcb_pwm_set_polarity(struct pwm_chip *chip, struct pwm_device *pwm, enum pwm_polarity polarity) argument
63 atmel_tcb_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) argument
132 atmel_tcb_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
188 atmel_tcb_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
270 atmel_tcb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, int duty_ns, int period_ns) argument
[all...]
H A Dpwm-lpc32xx.c18 #include <linux/pwm.h>
34 static int lpc32xx_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
72 val = readl(lpc32xx->base + (pwm->hwpwm << 2));
75 writel(val, lpc32xx->base + (pwm->hwpwm << 2));
80 static int lpc32xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
90 val = readl(lpc32xx->base + (pwm->hwpwm << 2));
92 writel(val, lpc32xx->base + (pwm->hwpwm << 2));
97 static void lpc32xx_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
102 val = readl(lpc32xx->base + (pwm->hwpwm << 2));
104 writel(val, lpc32xx->base + (pwm
[all...]
H A Dpwm-ab8500.c10 #include <linux/pwm.h>
27 static int ab8500_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
57 static int ab8500_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
66 pwm->label, ret);
70 static void ab8500_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
79 pwm->label, ret);
111 dev_dbg(&pdev->dev, "pwm probe successful\n");
126 dev_dbg(&pdev->dev, "pwm driver removed\n");
133 .name = "ab8500-pwm",
143 MODULE_ALIAS("platform:ab8500-pwm");
[all...]
H A Dpwm-lp3943.c18 #include <linux/pwm.h>
64 static int lp3943_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) argument
69 pwm_map = lp3943_pwm_request_map(lp3943_pwm, pwm->hwpwm);
73 return pwm_set_chip_data(pwm, pwm_map);
90 static void lp3943_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) argument
93 struct lp3943_pwm_map *pwm_map = pwm_get_chip_data(pwm);
98 static int lp3943_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, argument
116 if (pwm->hwpwm == 0) {
156 static int lp3943_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) argument
159 struct lp3943_pwm_map *pwm_map = pwm_get_chip_data(pwm);
175 lp3943_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) argument
[all...]
/drivers/clocksource/
H A Dsamsung_pwm_timer.c83 static struct samsung_pwm_clocksource pwm; variable in typeref:struct:samsung_pwm_clocksource
96 reg = readl(pwm.base + REG_TCFG0);
99 writel(reg, pwm.base + REG_TCFG0);
111 bits = (fls(divisor) - 1) - pwm.variant.div_base;
115 reg = readl(pwm.base + REG_TCFG1);
118 writel(reg, pwm.base + REG_TCFG1);
133 tcon = __raw_readl(pwm.base + REG_TCON);
135 __raw_writel(tcon, pwm.base + REG_TCON);
151 tcon = __raw_readl(pwm.base + REG_TCON);
156 __raw_writel(tcnt, pwm
[all...]
/drivers/hwmon/
H A Dpwm-fan.c2 * pwm-fan.c - Hwmon driver for fans connected to PWM lines.
25 #include <linux/pwm.h>
32 struct pwm_device *pwm; member in struct:pwm_fan_ctx
40 unsigned long pwm, duty; local
43 if (kstrtoul(buf, 10, &pwm) || pwm > MAX_PWM)
48 if (ctx->pwm_value == pwm)
51 if (pwm == 0) {
52 pwm_disable(ctx->pwm);
56 duty = DIV_ROUND_UP(pwm * (ct
[all...]
/drivers/input/misc/
H A Dpwm-beeper.c21 #include <linux/pwm.h>
26 struct pwm_device *pwm; member in struct:pwm_beeper
53 pwm_config(beeper->pwm, 0, 0);
54 pwm_disable(beeper->pwm);
57 ret = pwm_config(beeper->pwm, period / 2, period);
60 ret = pwm_enable(beeper->pwm);
79 beeper->pwm = pwm_get(&pdev->dev, NULL);
80 if (IS_ERR(beeper->pwm)) {
82 beeper->pwm = pwm_request(pwm_id, "pwm beepe
[all...]
/drivers/media/dvb-frontends/
H A Dtda1002x.h62 struct i2c_adapter* i2c, u8 pwm);
65 struct i2c_adapter* i2c, u8 pwm)
75 struct i2c_adapter *i2c, u8 pwm);
79 struct i2c_adapter *i2c, u8 pwm)
64 tda10021_attach(const struct tda1002x_config* config, struct i2c_adapter* i2c, u8 pwm) argument
77 tda10023_attach( const struct tda10023_config *config, struct i2c_adapter *i2c, u8 pwm) argument
H A Dves1820.h46 struct i2c_adapter* i2c, u8 pwm);
49 struct i2c_adapter* i2c, u8 pwm)
48 ves1820_attach(const struct ves1820_config* config, struct i2c_adapter* i2c, u8 pwm) argument
/drivers/input/keyboard/
H A Dlm8323.c138 /* pwm lock */
159 struct lm8323_pwm pwm[LM8323_NUM_PWMS]; member in struct:lm8323_chip
363 static void pwm_done(struct lm8323_pwm *pwm) argument
365 mutex_lock(&pwm->lock);
366 pwm->running = false;
367 if (pwm->desired_brightness != pwm->brightness)
368 schedule_work(&pwm->work);
369 mutex_unlock(&pwm->lock);
403 "pwm
428 lm8323_write_pwm_one(struct lm8323_pwm *pwm, int pos, u16 cmd) argument
440 lm8323_write_pwm(struct lm8323_pwm *pwm, int kill, int len, const u16 *cmds) argument
455 struct lm8323_pwm *pwm = work_to_pwm(work); local
512 struct lm8323_pwm *pwm = cdev_to_pwm(led_cdev); local
538 struct lm8323_pwm *pwm = cdev_to_pwm(led_cdev); local
547 struct lm8323_pwm *pwm = cdev_to_pwm(led_cdev); local
570 struct lm8323_pwm *pwm; local
634 int pwm; local
[all...]

Completed in 365 milliseconds

12345