is_consistent() { val= active_low_sysfs=`cat $GPIO_SYSFS/gpio$nr/active_low` val_sysfs=`cat $GPIO_SYSFS/gpio$nr/value` dir_sysfs=`cat $GPIO_SYSFS/gpio$nr/direction` gpio_this_debugfs=`cat $GPIO_DEBUGFS |grep "gpio-$nr" | sed "s/(.*)//g"` dir_debugfs=`echo $gpio_this_debugfs | awk '{print $2}'` val_debugfs=`echo $gpio_this_debugfs | awk '{print $3}'` if [ $val_debugfs = "lo" ]; then val=0 elif [ $val_debugfs = "hi" ]; then val=1 fi if [ $active_low_sysfs = "1" ]; then if [ $val = "0" ]; then val="1" else val="0" fi fi if [ $val_sysfs = $val ] && [ $dir_sysfs = $dir_debugfs ]; then echo -n "." else echo "test fail, exit" die fi } test_pin_logic() { nr=$1 direction=$2 active_low=$3 value=$4 echo $direction > $GPIO_SYSFS/gpio$nr/direction echo $active_low > $GPIO_SYSFS/gpio$nr/active_low if [ $direction = "out" ]; then echo $value > $GPIO_SYSFS/gpio$nr/value fi is_consistent $nr } test_one_pin() { nr=$1 echo -n "test pin<$nr>" echo $nr > $GPIO_SYSFS/export 2>/dev/null if [ X$? != X0 ]; then echo "test GPIO pin $nr failed" die fi #"Checking if the sysfs is consistent with debugfs: " is_consistent $nr #"Checking the logic of active_low: " test_pin_logic $nr out 1 1 test_pin_logic $nr out 1 0 test_pin_logic $nr out 0 1 test_pin_logic $nr out 0 0 #"Checking the logic of direction: " test_pin_logic $nr in 1 1 test_pin_logic $nr out 1 0 test_pin_logic $nr low 0 1 test_pin_logic $nr high 0 0 echo $nr > $GPIO_SYSFS/unexport echo "successful" } test_one_pin_fail() { nr=$1 echo $nr > $GPIO_SYSFS/export 2>/dev/null if [ X$? != X0 ]; then echo "test invalid pin $nr successful" else echo "test invalid pin $nr failed" echo $nr > $GPIO_SYSFS/unexport 2>/dev/null die fi } list_chip() { echo `ls -d $GPIO_DRV_SYSFS/gpiochip* 2>/dev/null` } test_chip() { chip=$1 name=`basename $chip` base=`cat $chip/base` ngpio=`cat $chip/ngpio` printf "%-10s %-5s %-5s\n" $name $base $ngpio if [ $ngpio = "0" ]; then echo "number of gpio is zero is not allowed". fi test_one_pin $base test_one_pin $(($base + $ngpio - 1)) test_one_pin $((( RANDOM % $ngpio ) + $base )) } test_chips_sysfs() { gpiochip=`list_chip $module` if [ X"$gpiochip" = X ]; then if [ X"$valid" = Xfalse ]; then echo "successful" else echo "fail" die fi else for chip in $gpiochip; do test_chip $chip done fi } 1b41ee74f9712c355d66dc105bbea663ae0afd'/>
path: root/drivers/usb/phy/phy-mxs-usb.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 19:36:04 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2017-02-06 19:36:04 -0800
commit8b1b41ee74f9712c355d66dc105bbea663ae0afd (patch)
tree4c3f410f3cb01c7b00b474e376a60f27a7ff99a8 /drivers/usb/phy/phy-mxs-usb.c
parentf7d6040aa45df6ffd9e891114125dc919f18b96b (diff)
parentbfb34527a32a1a576d9bfb7026d3ab0369a6cd60 (diff)
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm fixes from Dan Williams: "None of these are showstoppers for 4.10 and could wait for 4.11 merge window, but they are low enough risk for this late in the cycle and the fixes have waiting users . They have received a build success notification from the 0day robot, pass the latest ndctl unit tests, and appeared in next: - Fix a crash that can result when SIGINT is sent to a process that is awaiting completion of an address range scrub command. We were not properly cleaning up the workqueue after wait_event_interruptible(). - Fix a memory hotplug failure condition that results from not reserving enough space out of persistent memory for the memmap. By default we align to 2M allocations that the memory hotplug code assumes, but if the administrator specifies a non-default 4K-alignment then we can fail to correctly size the reservation. - A one line fix to improve the predictability of libnvdimm block device names. A common operation is to reconfigure /dev/pmem0 into a different mode. For example, a reconfiguration might set a new mode that reserves some of the capacity for a struct page memmap array. It surprises users if the device name changes to "/dev/pmem0.1" after the mode change and then back to /dev/pmem0 after a reboot. - Add 'const' to some function pointer tables" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: libnvdimm, pfn: fix memmap reservation size versus 4K alignment acpi, nfit: fix acpi_nfit_flush_probe() crash libnvdimm, namespace: do not delete namespace-id 0 nvdimm: constify device_type structures
Diffstat (limited to 'drivers/usb/phy/phy-mxs-usb.c')