Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: "http://devicetree.org/schemas/input/pwm-vibrator.yaml#"
0005 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
0006 
0007 title: PWM vibrator
0008 
0009 maintainers:
0010   - Sebastian Reichel <sre@kernel.org>
0011 
0012 description: >
0013   Registers a PWM device as vibrator. It is expected, that the vibrator's
0014   strength increases based on the duty cycle of the enable PWM channel
0015   (100% duty cycle meaning strongest vibration, 0% meaning no vibration).
0016 
0017   The binding supports an optional direction PWM channel, that can be
0018   driven at fixed duty cycle. If available this is can be used to increase
0019   the vibration effect of some devices.
0020 
0021 properties:
0022   compatible:
0023     const: pwm-vibrator
0024 
0025   pwm-names:
0026     items:
0027       - const: enable
0028       - const: direction
0029     minItems: 1
0030 
0031   pwms:
0032     minItems: 1
0033     maxItems: 2
0034 
0035   vcc-supply: true
0036 
0037   direction-duty-cycle-ns:
0038     description: >
0039       Duty cycle of the direction PWM channel in nanoseconds,
0040       defaults to 50% of the channel's period.
0041 
0042 required:
0043   - compatible
0044   - pwm-names
0045   - pwms
0046 
0047 additionalProperties: false
0048 
0049 examples:
0050   - |
0051     vibrator {
0052         compatible = "pwm-vibrator";
0053         pwms = <&pwm9 0 1000000000 0>,
0054                <&pwm8 0 1000000000 0>;
0055         pwm-names = "enable", "direction";
0056         direction-duty-cycle-ns = <1000000000>;
0057     };