####################################################################
# Script : /etc/rc.d/rc.platform/aarch64/sc8280xp
# Purpose: Perform boot time configuration activities for Hardware
#          Models using the sc8280xp SoC.  This includes:
#          * Lenovo ThinkPad X13s (Snapdragon)
# Caller : This script is executed from /etc/rc.d/rc.platform
#          (which is loaded from /etc/rc.d/rc.M prior to rc.local) 
# Author : Brenton Earl <el0226@slackware.com>
#	   Based on rk3399 "platform script" by Stuart Winter 
# Date...: 25-May-2024
####################################################################
# Note: This configuration file is managed by the Slackware packages
#       and is NOT user serviceable.  Any changes made here will be
#       removed when the 'a/sysvinit-scripts' package is upgraded.
#
#       To adjust the settings used for the actions applied here,
#       edit /etc/rc.d/rc.platform.conf and the settings will become
#       operative at the next boot.
####################################################################

# Lenovo ThinkPad X13s utilites:
# Utility for power monitoring, sound output and touchscreen.
case "$HWM" in
	"Lenovo ThinkPad X13s"*)
	echo "Running Lenovo ThinkPad X13s Tweaks..."
	pid_pd=$(pidof pd-mapper)
	if [ ! -z "$pid_pd" ] ; then
		for p in $pid_pd ;
		do
			kill -s SIGHUP "$p"
		done
	fi
	/usr/bin/pd-mapper &
	;;
esac
