Lines Matching refs:the
3 This provides an overview about the Linux PWM interface
7 the Linux PWM API (although they could). However, PWMs are often
9 up to the board designer to connect them to LEDs or fans. To provide
10 this kind of flexibility the generic PWM API exists.
15 Users of the legacy PWM API use unique IDs to refer to PWM devices.
19 consumers to providers, as given in the following example:
39 New users should use the pwm_get() function and pass to it the consumer
40 device or a consumer name. pwm_put() is used to free the PWM device. Managed
47 To start/stop toggling the PWM output use pwm_enable()/pwm_disable().
49 Using PWMs with the sysfs interface
53 interface is provided to use the PWMs from userspace. It is exposed at
55 pwmchipN, where N is the base of the PWM chip. Inside the directory you
66 When a PWM channel is exported a pwmX directory will be created in the
67 pwmchipN directory it is associated with, where X is the number of the
70 period - The total period of the PWM signal (read/write).
71 Value is in nanoseconds and is the sum of the active and inactive
72 time of the PWM.
74 duty_cycle - The active time of the PWM signal (read/write).
75 Value is in nanoseconds and must be less than the period.
77 polarity - Changes the polarity of the PWM signal (read/write).
78 Writes to this property only work if the PWM chip supports changing
79 the polarity. The polarity can only be changed if the PWM is not
80 enabled. Value is the string "normal" or "inversed".
82 enable - Enable/disable the PWM signal (read/write).
90 there only has been the barebone API meaning that each driver has
91 to implement the pwm_*() functions itself. This means that it's impossible
92 to have multiple PWM drivers in the system. For this reason it's mandatory
93 for new drivers to use the generic PWM framework.
97 pwm_chip as argument which provides a description of the PWM chip, the
98 number of PWM devices provided by the chip and the chip-specific
99 implementation of the supported PWM operations to the framework.
101 When implementing polarity support in a PWM driver, make sure to respect the
102 signal conventions in the PWM framework. By definition, normal polarity
103 characterizes a signal starts high for the duration of the duty cycle and
104 goes low for the remainder of the period. Conversely, a signal with inversed
105 polarity starts low for the duration of the duty cycle and goes high for the
106 remainder of the period.
112 and pwm_free() may not be called from an atomic context. Currently the
114 pwm_config(), so the calling context is currently driver specific. This
115 is an issue derived from the former barebone API and should be fixed soon.
122 this in your driver please consider adding appropriate helpers to the framework.