on property:vendor.all.modules.ready=1
    wait /sys/bus/i2c/devices/15-0043/calibration/redc_cal_time_ms

    mkdir /mnt/vendor/persist/haptics 0770 system system
    chmod 770 /mnt/vendor/persist/haptics
    chmod 440 /mnt/vendor/persist/haptics/cs40l26.cal
    chmod 440 /mnt/vendor/persist/haptics/cs40l26_dual.cal
    chown system system /mnt/vendor/persist/haptics
    chown system system /mnt/vendor/persist/haptics/cs40l26.cal
    chown system system /mnt/vendor/persist/haptics/cs40l26_dual.cal

    chown system system /sys/bus/i2c/devices/15-0043/calibration/f0_stored
    chown system system /sys/bus/i2c/devices/15-0043/calibration/q_stored
    chown system system /sys/bus/i2c/devices/15-0043/calibration/redc_stored
    chown system system /sys/bus/i2c/devices/15-0043/default/vibe_state
    chown system system /sys/bus/i2c/devices/15-0043/default/num_waves
    chown system system /sys/bus/i2c/devices/15-0043/default/braking_time_bank
    chown system system /sys/bus/i2c/devices/15-0043/default/braking_time_index
    chown system system /sys/bus/i2c/devices/15-0043/default/braking_time_ms
    chown system system /sys/bus/i2c/devices/15-0043/default/f0_offset
    chown system system /sys/bus/i2c/devices/15-0043/default/owt_free_space
    chown system system /sys/bus/i2c/devices/15-0043/default/f0_comp_enable
    chown system system /sys/bus/i2c/devices/15-0043/default/redc_comp_enable
    chown system system /sys/bus/i2c/devices/15-0043/default/delay_before_stop_playback_us

    chown system system /sys/bus/i2c/devices/15-0042/calibration/f0_stored
    chown system system /sys/bus/i2c/devices/15-0042/calibration/q_stored
    chown system system /sys/bus/i2c/devices/15-0042/calibration/redc_stored
    chown system system /sys/bus/i2c/devices/15-0042/default/vibe_state
    chown system system /sys/bus/i2c/devices/15-0042/default/num_waves
    chown system system /sys/bus/i2c/devices/15-0042/default/braking_time_bank
    chown system system /sys/bus/i2c/devices/15-0042/default/braking_time_index
    chown system system /sys/bus/i2c/devices/15-0042/default/braking_time_ms
    chown system system /sys/bus/i2c/devices/15-0042/default/f0_offset
    chown system system /sys/bus/i2c/devices/15-0042/default/owt_free_space
    chown system system /sys/bus/i2c/devices/15-0042/default/f0_comp_enable
    chown system system /sys/bus/i2c/devices/15-0042/default/redc_comp_enable
    chown system system /sys/bus/i2c/devices/15-0042/default/delay_before_stop_playback_us

    chown system system /dev/gpiochip44

    enable vendor.vibrator.cs40l26

service vendor.vibrator.cs40l26 /vendor/bin/hw/android.hardware.vibrator-service.cs40l26-private
    class hal
    user system
    group system input

    setenv HAPTIC_NAME Haptics
    setenv INPUT_EVENT_NAME cs40l26_input
    setenv INPUT_EVENT_NAME_DUAL cs40l26_dual_input
    setenv INPUT_EVENT_PATH /dev/input/event*
    setenv PROPERTY_PREFIX ro.vendor.vibrator.hal.
    setenv CALIBRATION_FILEPATH /mnt/vendor/persist/haptics/cs40l26.cal
    setenv CALIBRATION_FILEPATH_DUAL /mnt/vendor/persist/haptics/cs40l26_dual.cal

    setenv HWAPI_PATH_PREFIX /sys/bus/i2c/devices/15-0043/
    setenv HWAPI_PATH_PREFIX_DUAL /sys/bus/i2c/devices/15-0042/
    setenv HWAPI_DEBUG_PATHS "
        calibration/f0_stored
        calibration/redc_stored
        calibration/q_stored
        default/vibe_state
        default/num_waves
        default/braking_time_bank
        default/braking_time_index
        default/braking_time_ms
        default/f0_offset
        default/owt_free_space
        default/f0_comp_enable
        default/redc_comp_enable
        default/delay_before_stop_playback_us
        "

    disabled

