Lines Matching +full:function +full:- +full:enumerator

2 # SPDX-License-Identifier: GPL-2.0
4 led_common_defs_path="include/dt-bindings/leds/common.h"
7 if [ $num_args -eq 1 ]; then
8 linux_top=$(dirname `realpath $0` | awk -F/ \
11 while (i <= NF - 2) { \
17 elif [ $num_args -eq 2 ]; then
24 if [ ! -f $led_defs_path ]; then
32 if [ $? -ne 0 ]; then
38 usb_subdev=`readlink $led_cdev_path | grep usb | sed s'/\(.*usb[0-9]*\/[0-9]*-[0-9]*\)\/.*/\1/'`
44 if [ ! -z "$usb_subdev" ]; then
50 usb_interface=`readlink $led_cdev_path | sed s'/.*\(usb[0-9]*\)/\1/' | cut -d\/ -f3`
53 if [ -d "$usb_interface/ieee80211" ]; then
54 wifi_phy=`ls -l $usb_interface/ieee80211 | grep phy | awk '{print $9}'`
64 elif [ $of_node_missing -eq 0 ]; then
67 if [ "$compatible" = "gpio-leds" ]; then
68 driver="leds-gpio"
69 elif [ "$compatible" = "pwm-leds" ]; then
70 driver="leds-pwm"
72 manufacturer=`echo $compatible | awk -F, '{print $1}'`
73 product=`echo $compatible | awk -F, '{print $2}'`
86 if [ ! -z "$idVendor" ]; then
90 if [ ! -z "$idProduct" ]; then
94 if [ ! -z "$manufacturer" ]; then
98 if [ ! -z "$product" ]; then
102 if [ ! -z "$driver" ]; then
106 if [ ! -z "$input_node" ]; then
116 num_sections=`echo $led_name | awk -F: '{print NF}'`
118 if [ $num_sections -eq 1 ]; then
121 elif [ $num_sections -eq 2 ]; then
122 color=`echo $led_name | cut -d: -f1`
123 function=`echo $led_name | cut -d: -f2`
124 elif [ $num_sections -eq 3 ]; then
125 devicename=`echo $led_name | cut -d: -f1`
126 color=`echo $led_name | cut -d: -f2`
127 function=`echo $led_name | cut -d: -f3`
129 …printf "Detected %d sections in the LED class device name - should the script be updated?\n" $num_…
135 S_FUN="function "
143 printf "$section_name :\t%-${status_tab}.${status_tab}s %s %s\n" "$section_val" "[ OK ] " "$msg"
151 printf "$section_name :\t%-${status_tab}.${status_tab}s %s %s\n" "$section_val" "[ FAILED ]" "$msg"
154 if [ ! -z "$input_node" ]; then
156 elif [ ! -z "$wifi_phy" ]; then
160 if [ ! -z "$devicename" ]; then
161 if [ ! -z "$expected_devname" ]; then
173 print_msg_failed "$S_DEV" "$devicename" "Unknown devicename - should the script be updated?"
176 elif [ ! -z "$expected_devname" ]; then
180 if [ ! -z "$color" ]; then
183 if [ ! -z "$color_id_definition" ]; then
191 if [ ! -z "$function" ]; then
192 # strip optional enumerator
193 function=`echo $function | sed s'/\(.*\)-[0-9]*$/\1/'`
194 fun_definition=$(cat $led_defs_path | grep "\"$function\"" | awk '{print $2}')
195 if [ ! -z "$fun_definition" ]; then
196 print_msg_ok "$S_FUN" "$function" "Matching definition: $fun_definition"
198 print_msg_failed "$S_FUN" "$function" "Definition not found in $led_defs_path"