The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/Bindings/input/pwm-vibrator.txt

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 * PWM vibrator device tree bindings
    2 
    3 Registers a PWM device as vibrator. It is expected, that the vibrator's
    4 strength increases based on the duty cycle of the enable PWM channel
    5 (100% duty cycle meaning strongest vibration, 0% meaning no vibration).
    6 
    7 The binding supports an optional direction PWM channel, that can be
    8 driven at fixed duty cycle. If available this is can be used to increase
    9 the vibration effect of some devices.
   10 
   11 Required properties:
   12 - compatible: should contain "pwm-vibrator"
   13 - pwm-names: Should contain "enable" and optionally "direction"
   14 - pwms: Should contain a PWM handle for each entry in pwm-names
   15 
   16 Optional properties:
   17 - vcc-supply: Phandle for the regulator supplying power
   18 - direction-duty-cycle-ns: Duty cycle of the direction PWM channel in
   19                            nanoseconds, defaults to 50% of the channel's
   20                            period.
   21 
   22 Example from Motorola Droid 4:
   23 
   24 &omap4_pmx_core {
   25         vibrator_direction_pin: pinmux_vibrator_direction_pin {
   26                 pinctrl-single,pins = <
   27                 OMAP4_IOPAD(0x1ce, PIN_OUTPUT | MUX_MODE1) /* dmtimer8_pwm_evt (gpio_27) */
   28                 >;
   29         };
   30 
   31         vibrator_enable_pin: pinmux_vibrator_enable_pin {
   32                 pinctrl-single,pins = <
   33                 OMAP4_IOPAD(0X1d0, PIN_OUTPUT | MUX_MODE1) /* dmtimer9_pwm_evt (gpio_28) */
   34                 >;
   35         };
   36 };
   37 
   38 / {
   39         pwm8: dmtimer-pwm {
   40                 pinctrl-names = "default";
   41                 pinctrl-0 = <&vibrator_direction_pin>;
   42 
   43                 compatible = "ti,omap-dmtimer-pwm";
   44                 #pwm-cells = <3>;
   45                 ti,timers = <&timer8>;
   46                 ti,clock-source = <0x01>;
   47         };
   48 
   49         pwm9: dmtimer-pwm {
   50                 pinctrl-names = "default";
   51                 pinctrl-0 = <&vibrator_enable_pin>;
   52 
   53                 compatible = "ti,omap-dmtimer-pwm";
   54                 #pwm-cells = <3>;
   55                 ti,timers = <&timer9>;
   56                 ti,clock-source = <0x01>;
   57         };
   58 
   59         vibrator {
   60                 compatible = "pwm-vibrator";
   61                 pwms = <&pwm9 0 1000000000 0>,
   62                        <&pwm8 0 1000000000 0>;
   63                 pwm-names = "enable", "direction";
   64                 direction-duty-cycle-ns = <1000000000>;
   65         };
   66 };

Cache object: 9339c2f0977911bad39804dde9fa813a


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.