Home
last modified time | relevance | path

Searched +full:- +full:pwm (Results 1 – 25 of 1047) sorted by relevance

12345678910>>...42

/kernel/linux/linux-4.19/drivers/pwm/
DKconfig1 menuconfig PWM config
2 bool "Pulse-Width Modulation (PWM) Support"
4 Generic Pulse-Width Modulation (PWM) support.
6 In Pulse-Width Modulation, a variation of the width of pulses
13 This framework provides a generic interface to PWM devices
15 to register and unregister a PWM chip, an abstraction of a PWM
16 controller, that supports one or more PWM devices. Client
17 drivers can request PWM devices and use the generic framework
20 This generic framework replaces the legacy PWM framework which
29 if PWM
[all …]
Dcore.c5 * Copyright (C) 2011-2012 Avionic Design GmbH
23 #include <linux/pwm.h>
24 #include <linux/radix-tree.h>
33 #include <dt-bindings/pwm/pwm.h>
44 static struct pwm_device *pwm_to_device(unsigned int pwm) in pwm_to_device() argument
46 return radix_tree_lookup(&pwm_tree, pwm); in pwm_to_device()
49 static int alloc_pwms(int pwm, unsigned int count) in alloc_pwms() argument
54 if (pwm >= MAX_PWMS) in alloc_pwms()
55 return -EINVAL; in alloc_pwms()
57 if (pwm >= 0) in alloc_pwms()
[all …]
DMakefile1 # SPDX-License-Identifier: GPL-2.0
2 obj-$(CONFIG_PWM) += core.o
3 obj-$(CONFIG_PWM_SYSFS) += sysfs.o
4 obj-$(CONFIG_PWM_AB8500) += pwm-ab8500.o
5 obj-$(CONFIG_PWM_ATMEL) += pwm-atmel.o
6 obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM) += pwm-atmel-hlcdc.o
7 obj-$(CONFIG_PWM_ATMEL_TCB) += pwm-atmel-tcb.o
8 obj-$(CONFIG_PWM_BCM_IPROC) += pwm-bcm-iproc.o
9 obj-$(CONFIG_PWM_BCM_KONA) += pwm-bcm-kona.o
10 obj-$(CONFIG_PWM_BCM2835) += pwm-bcm2835.o
[all …]
Dpwm-renesas-tpu.c2 * R-Mobile TPU PWM driver
26 #include <linux/pwm.h>
71 TPU_PIN_PWM, /* Pin is driven by PWM */
100 static void tpu_pwm_write(struct tpu_pwm_device *pwm, int reg_nr, u16 value) in tpu_pwm_write() argument
102 void __iomem *base = pwm->tpu->base + TPU_CHANNEL_OFFSET in tpu_pwm_write()
103 + pwm->channel * TPU_CHANNEL_SIZE; in tpu_pwm_write()
108 static void tpu_pwm_set_pin(struct tpu_pwm_device *pwm, in tpu_pwm_set_pin() argument
111 static const char * const states[] = { "inactive", "PWM", "active" }; in tpu_pwm_set_pin()
113 dev_dbg(&pwm->tpu->pdev->dev, "%u: configuring pin as %s\n", in tpu_pwm_set_pin()
114 pwm->channel, states[state]); in tpu_pwm_set_pin()
[all …]
Dpwm-berlin.c2 * Marvell Berlin PWM driver
6 * Author: Antoine Tenart <antoine.tenart@free-electrons.com>
18 #include <linux/pwm.h>
62 return readl_relaxed(chip->base + channel * 0x10 + offset); in berlin_pwm_readl()
69 writel_relaxed(value, chip->base + channel * 0x10 + offset); in berlin_pwm_writel()
72 static int berlin_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) in berlin_pwm_request() argument
78 return -ENOMEM; in berlin_pwm_request()
80 return pwm_set_chip_data(pwm, channel); in berlin_pwm_request()
83 static void berlin_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) in berlin_pwm_free() argument
85 struct berlin_pwm_channel *channel = pwm_get_chip_data(pwm); in berlin_pwm_free()
[all …]
Dpwm-pxa.c2 * drivers/pwm/pwm-pxa.c
4 * simple driver for PWM (Pulse Width Modulator) controller
10 * 2008-02-13 initial version
21 #include <linux/pwm.h>
29 /* PWM has_secondary_pwm? */
30 { "pxa25x-pwm", 0 },
31 { "pxa27x-pwm", HAS_SECONDARY_PWM },
32 { "pxa168-pwm", 0 },
33 { "pxa910-pwm", 0 },
38 /* PWM registers and bits definitions */
[all …]
/kernel/linux/linux-5.10/drivers/pwm/
DKconfig1 # SPDX-License-Identifier: GPL-2.0-only
2 menuconfig PWM config
3 bool "Pulse-Width Modulation (PWM) Support"
5 Generic Pulse-Width Modulation (PWM) support.
7 In Pulse-Width Modulation, a variation of the width of pulses
14 This framework provides a generic interface to PWM devices
16 to register and unregister a PWM chip, an abstraction of a PWM
17 controller, that supports one or more PWM devices. Client
18 drivers can request PWM devices and use the generic framework
21 This generic framework replaces the legacy PWM framework which
[all …]
Dcore.c1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * Copyright (C) 2011-2012 Avionic Design GmbH
11 #include <linux/pwm.h>
12 #include <linux/radix-tree.h>
21 #include <dt-bindings/pwm/pwm.h>
24 #include <trace/events/pwm.h>
35 static struct pwm_device *pwm_to_device(unsigned int pwm) in pwm_to_device() argument
37 return radix_tree_lookup(&pwm_tree, pwm); in pwm_to_device()
40 static int alloc_pwms(int pwm, unsigned int count) in alloc_pwms() argument
45 if (pwm >= MAX_PWMS) in alloc_pwms()
[all …]
DMakefile1 # SPDX-License-Identifier: GPL-2.0
2 obj-$(CONFIG_PWM) += core.o
3 obj-$(CONFIG_PWM_SYSFS) += sysfs.o
4 obj-$(CONFIG_PWM_AB8500) += pwm-ab8500.o
5 obj-$(CONFIG_PWM_ATMEL) += pwm-atmel.o
6 obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM) += pwm-atmel-hlcdc.o
7 obj-$(CONFIG_PWM_ATMEL_TCB) += pwm-atmel-tcb.o
8 obj-$(CONFIG_PWM_BCM_IPROC) += pwm-bcm-iproc.o
9 obj-$(CONFIG_PWM_BCM_KONA) += pwm-bcm-kona.o
10 obj-$(CONFIG_PWM_BCM2835) += pwm-bcm2835.o
[all …]
Dpwm-renesas-tpu.c1 // SPDX-License-Identifier: GPL-2.0
3 * R-Mobile TPU PWM driver
18 #include <linux/pwm.h>
63 TPU_PIN_PWM, /* Pin is driven by PWM */
92 static void tpu_pwm_write(struct tpu_pwm_device *pwm, int reg_nr, u16 value) in tpu_pwm_write() argument
94 void __iomem *base = pwm->tpu->base + TPU_CHANNEL_OFFSET in tpu_pwm_write()
95 + pwm->channel * TPU_CHANNEL_SIZE; in tpu_pwm_write()
100 static void tpu_pwm_set_pin(struct tpu_pwm_device *pwm, in tpu_pwm_set_pin() argument
103 static const char * const states[] = { "inactive", "PWM", "active" }; in tpu_pwm_set_pin()
105 dev_dbg(&pwm->tpu->pdev->dev, "%u: configuring pin as %s\n", in tpu_pwm_set_pin()
[all …]
Dpwm-berlin.c2 * Marvell Berlin PWM driver
6 * Author: Antoine Tenart <antoine.tenart@free-electrons.com>
18 #include <linux/pwm.h>
62 return readl_relaxed(chip->base + channel * 0x10 + offset); in berlin_pwm_readl()
69 writel_relaxed(value, chip->base + channel * 0x10 + offset); in berlin_pwm_writel()
72 static int berlin_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) in berlin_pwm_request() argument
78 return -ENOMEM; in berlin_pwm_request()
80 return pwm_set_chip_data(pwm, channel); in berlin_pwm_request()
83 static void berlin_pwm_free(struct pwm_chip *chip, struct pwm_device *pwm) in berlin_pwm_free() argument
85 struct berlin_pwm_channel *channel = pwm_get_chip_data(pwm); in berlin_pwm_free()
[all …]
Dpwm-pxa.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * drivers/pwm/pwm-pxa.c
5 * simple driver for PWM (Pulse Width Modulator) controller
7 * 2008-02-13 initial version
18 #include <linux/pwm.h>
26 /* PWM has_secondary_pwm? */
27 { "pxa25x-pwm", 0 },
28 { "pxa27x-pwm", HAS_SECONDARY_PWM },
29 { "pxa168-pwm", 0 },
30 { "pxa910-pwm", 0 },
[all …]
Dpwm-sun4i.c1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (C) 2014 Alexandre Belloni <alexandre.belloni@free-electrons.com>
8 * - When outputing the source clock directly, the PWM logic will be bypassed
22 #include <linux/pwm.h>
48 #define PWM_PRD(prd) (((prd) - 1) << 16)
103 return readl(chip->base + offset); in sun4i_pwm_readl()
109 writel(val, chip->base + offset); in sun4i_pwm_writel()
113 struct pwm_device *pwm, in sun4i_pwm_get_state() argument
121 clk_rate = clk_get_rate(sun4i_pwm->clk); in sun4i_pwm_get_state()
126 * PWM chapter in H6 manual has a diagram which explains that if bypass in sun4i_pwm_get_state()
[all …]
Dpwm-tegra.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * drivers/pwm/pwm-tegra.c
5 * Tegra pulse-width-modulation controller driver
7 * Copyright (c) 2010-2020, NVIDIA Corporation.
8 * Based on arch/arm/plat-mxc/pwm.c by Sascha Hauer <s.hauer@pengutronix.de>
11 * 1. 13-bit: Frequency division (SCALE)
12 * 2. 8-bit : Pulse division (DUTY)
13 * 3. 1-bit : Enable bit
15 * The PWM clock frequency is divided by 256 before subdividing it based
17 * frequency for PWM output. The maximum output frequency that can be
[all …]
/kernel/linux/linux-4.19/Documentation/devicetree/bindings/pwm/
Dpwm.txt1 Specifying PWM information for devices
4 1) PWM user nodes
5 -----------------
7 PWM users should specify a list of PWM devices that they want to use
8 with a property containing a 'pwm-list':
10 pwm-list ::= <single-pwm> [pwm-list]
11 single-pwm ::= <pwm-phandle> <pwm-specifier>
12 pwm-phandle : phandle to PWM controller node
13 pwm-specifier : array of #pwm-cells specifying the given PWM
16 PWM properties should be named "pwms". The exact meaning of each pwms
[all …]
/kernel/linux/linux-4.19/include/linux/
Dpwm.h1 /* SPDX-License-Identifier: GPL-2.0 */
15 * enum pwm_polarity - polarity of a PWM signal
16 * @PWM_POLARITY_NORMAL: a high signal for the duration of the duty-
19 * @PWM_POLARITY_INVERSED: a low signal for the duration of the duty-
29 * struct pwm_args - board-dependent PWM arguments
33 * This structure describes board-dependent arguments attached to a PWM
34 * device. These arguments are usually retrieved from the PWM lookup table or
37 * Do not confuse this with the PWM state: PWM arguments represent the initial
38 * configuration that users want to use on this PWM device rather than the
39 * current PWM hardware state.
[all …]
/kernel/linux/linux-5.10/include/linux/
Dpwm.h1 /* SPDX-License-Identifier: GPL-2.0 */
15 * enum pwm_polarity - polarity of a PWM signal
16 * @PWM_POLARITY_NORMAL: a high signal for the duration of the duty-
19 * @PWM_POLARITY_INVERSED: a low signal for the duration of the duty-
29 * struct pwm_args - board-dependent PWM arguments
33 * This structure describes board-dependent arguments attached to a PWM
34 * device. These arguments are usually retrieved from the PWM lookup table or
37 * Do not confuse this with the PWM state: PWM arguments represent the initial
38 * configuration that users want to use on this PWM device rather than the
39 * current PWM hardware state.
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/pwm/
Dpwm.txt1 Specifying PWM information for devices
4 1) PWM user nodes
5 -----------------
7 PWM users should specify a list of PWM devices that they want to use
8 with a property containing a 'pwm-list':
10 pwm-list ::= <single-pwm> [pwm-list]
11 single-pwm ::= <pwm-phandle> <pwm-specifier>
12 pwm-phandle : phandle to PWM controller node
13 pwm-specifier : array of #pwm-cells specifying the given PWM
16 PWM properties should be named "pwms". The exact meaning of each pwms
[all …]
Dpwm-samsung.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/pwm/pwm-samsung.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Samsung SoC PWM timers
10 - Thierry Reding <thierry.reding@gmail.com>
11 - Krzysztof Kozlowski <krzk@kernel.org>
14 Samsung SoCs contain PWM timer blocks which can be used for system clock source
15 and clock event timers, as well as to drive SoC outputs with PWM signal. Each
16 PWM timer block provides 5 PWM channels (not all of them can drive physical
[all …]
Drenesas,pwm-rcar.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/pwm/renesas,pwm-rcar.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Renesas R-Car PWM Timer Controller
10 - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
15 - enum:
16 - renesas,pwm-r8a7742 # RZ/G1H
17 - renesas,pwm-r8a7743 # RZ/G1M
18 - renesas,pwm-r8a7744 # RZ/G1N
[all …]
Dimx-pwm.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
4 $id: http://devicetree.org/schemas/pwm/imx-pwm.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
7 title: Freescale i.MX PWM controller
10 - Philipp Zabel <p.zabel@pengutronix.de>
13 "#pwm-cells":
15 Should be 2 for i.MX1 and 3 for i.MX27 and newer SoCs. See pwm.yaml
18 - 2
19 - 3
[all …]
/kernel/linux/linux-5.10/drivers/clocksource/
Dsamsung_pwm_timer.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * samsung - Common hr-timer support (s3c and s5p)
80 static struct samsung_pwm_clocksource pwm; variable
93 reg = readl(pwm.base + REG_TCFG0); in samsung_timer_set_prescale()
95 reg |= (prescale - 1) << shift; in samsung_timer_set_prescale()
96 writel(reg, pwm.base + REG_TCFG0); in samsung_timer_set_prescale()
108 bits = (fls(divisor) - 1) - pwm.variant.div_base; in samsung_timer_set_divisor()
112 reg = readl(pwm.base + REG_TCFG1); in samsung_timer_set_divisor()
115 writel(reg, pwm.base + REG_TCFG1); in samsung_timer_set_divisor()
130 tcon = readl_relaxed(pwm.base + REG_TCON); in samsung_time_stop()
[all …]
/kernel/linux/linux-4.19/drivers/clocksource/
Dsamsung_pwm_timer.c5 * samsung - Common hr-timer support (s3c and s5p)
83 static struct samsung_pwm_clocksource pwm; variable
96 reg = readl(pwm.base + REG_TCFG0); in samsung_timer_set_prescale()
98 reg |= (prescale - 1) << shift; in samsung_timer_set_prescale()
99 writel(reg, pwm.base + REG_TCFG0); in samsung_timer_set_prescale()
111 bits = (fls(divisor) - 1) - pwm.variant.div_base; in samsung_timer_set_divisor()
115 reg = readl(pwm.base + REG_TCFG1); in samsung_timer_set_divisor()
118 writel(reg, pwm.base + REG_TCFG1); in samsung_timer_set_divisor()
133 tcon = readl_relaxed(pwm.base + REG_TCON); in samsung_time_stop()
135 writel_relaxed(tcon, pwm.base + REG_TCON); in samsung_time_stop()
[all …]
/kernel/linux/linux-4.19/Documentation/
Dpwm.txt2 Pulse Width Modulation (PWM) interface
5 This provides an overview about the Linux PWM interface
9 the Linux PWM API (although they could). However, PWMs are often
12 this kind of flexibility the generic PWM API exists.
15 ----------------
17 Users of the legacy PWM API use unique IDs to refer to PWM devices.
19 Instead of referring to a PWM device via its unique ID, board setup code
20 should instead register a static mapping that can be used to match PWM
24 PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL,
36 ----------
[all …]
/kernel/linux/linux-5.10/Documentation/driver-api/
Dpwm.rst2 Pulse Width Modulation (PWM) interface
5 This provides an overview about the Linux PWM interface
9 the Linux PWM API (although they could). However, PWMs are often
12 this kind of flexibility the generic PWM API exists.
15 ----------------
17 Users of the legacy PWM API use unique IDs to refer to PWM devices.
19 Instead of referring to a PWM device via its unique ID, board setup code
20 should instead register a static mapping that can be used to match PWM
24 PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL,
36 ----------
[all …]

12345678910>>...42