PWM vibrator
Schema identifier ($id): "http://devicetree.org/schemas/input/pwm-vibrator.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Sebastian Reichel <sre@kernel.org>"
Registers a PWM device as vibrator. It is expected, that the vibrator's strength increases based on the duty cycle of the enable PWM channel (100% duty cycle meaning strongest vibration, 0% meaning no vibration). The binding supports an optional direction PWM channel, that can be driven at fixed duty cycle. If available this is can be used to increase the vibration effect of some devices.
Properties and child nodes (properties) #
compatible — required here #
Exact value (const): "pwm-vibrator"
pwm-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"enable"
Item 2
Exact value (
const):"direction"
Minimum number of items (minItems): 1
pwms — required here #
Minimum number of items (minItems): 1
Maximum number of items (maxItems): 2
enable-gpios — not listed as required here #
true — No constraints added by this property rule.
vcc-supply — not listed as required here #
true — No constraints added by this property rule.
direction-duty-cycle-ns — not listed as required here #
Duty cycle of the direction PWM channel in nanoseconds, defaults to 50% of the channel's period.
Required in this object (required): "compatible", "pwm-names", "pwms"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
vibrator {
compatible = "pwm-vibrator";
pwms = <&pwm9 0 1000000000 0>,
<&pwm8 0 1000000000 0>;
pwm-names = "enable", "direction";
direction-duty-cycle-ns = <1000000000>;
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)