vibrator: move diags to factory repo
Test: N/A
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
Change-Id: I7028f2129a85c0ce353d96387d2662e9158ce943
diff --git a/vibrator/cs40l25/device.mk b/vibrator/cs40l25/device.mk
index 8dbf019..61b95d5 100644
--- a/vibrator/cs40l25/device.mk
+++ b/vibrator/cs40l25/device.mk
@@ -1,9 +1,6 @@
PRODUCT_PACKAGES += \
android.hardware.vibrator-service.cs40l25 \
-PRODUCT_PACKAGES_DEBUG += \
- diag-vibrator \
-
BOARD_SEPOLICY_DIRS += \
hardware/google/pixel-sepolicy/vibrator/common \
hardware/google/pixel-sepolicy/vibrator/cs40l25 \
diff --git a/vibrator/cs40l25/diag/Android.bp b/vibrator/cs40l25/diag/Android.bp
deleted file mode 100644
index acd8632..0000000
--- a/vibrator/cs40l25/diag/Android.bp
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-sh_binary {
- name: "diag-vibrator",
- src: "diag-vibrator.sh",
- vendor: true,
-}
diff --git a/vibrator/cs40l25/diag/diag-vibrator.sh b/vibrator/cs40l25/diag/diag-vibrator.sh
deleted file mode 100644
index 30dca9d..0000000
--- a/vibrator/cs40l25/diag/diag-vibrator.sh
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/vendor/bin/sh
-
-set -e
-
-do_id()
-{
- cat /sys/class/leds/vibrator/device/modalias | sed 's/^i2c://g'
-}
-
-do_ping()
-{
- test "$(do_id)" == "cs40l25a"
-}
-
-do_enable()
-{
- /system/bin/idlcli vibrator on "${@}"
-}
-
-do_disable()
-{
- /system/bin/idlcli vibrator off
-}
-
-do_state()
-{
- local state="$(cat /sys/class/leds/vibrator/device/vibe_state)"
- if [[ "${state}" == "0" ]]
- then
- echo "stopped"
- else
- echo "running"
- fi
-}
-
-do_dump()
-{
- local loc="$(basename /sys/class/leds/vibrator/device/driver/*-0043)"
- cat /sys/kernel/debug/regmap/${loc}/registers
-}
-
-do_help()
-{
- local name="$(basename "${0}")"
- echo "Usage:"
- echo " ${name} id - Prints controller ID"
- echo " ${name} ping - Verifies probe succedded"
- echo " ${name} enable <ms> - Enables vibrator for <ms> milliseconds"
- echo " ${name} disable - Disables vibrator."
- echo " ${name} state - Returns 'stopped' or 'running' state."
- echo " ${name} dump - Dumps memory mapped registers."
-}
-
-if [[ "${#}" -gt "0" ]]
-then
- cmd="do_${1}" && shift
-fi
-
-if ! typeset -f "${cmd}" >/dev/null
-then
- cmd="do_help"
-fi
-
-exec "${cmd}" "${@}"