1// Copyright 2020 Huawei Device Co., Ltd. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14// 15// Author: liangkz @ https://ost.51cto.com/column/46 16// Date : 2022.04.01 17// 18 19root { 20 device_info { 21 platform :: host { // led设备节点归类于platform这个host 22 hostName = "platform_host"; 23 priority = 50; 24 device_led :: device { // led类设备 25 device0 :: deviceNode { // led类设备下的具体某个设备节点的配置 26 policy = 2; // 驱动服务发布策略 27 priority = 100; // 驱动启动优先级 28 preload = 0; // 驱动按需加载字段 29 permission = 0666; // 驱动创建设备节点权限 30 moduleName = "led_driver"; // 驱动名称,必须和驱动入口结构的moduleName值一致 31 serviceName = "led_service"; // 驱动对外发布服务的名称,必须唯一 32 deviceMatchAttr = "led_config"; // 驱动私有数据匹配关键字,必须和驱动私有数据配置节点的match_attr匹配 33 } 34 } 35 } 36 } 37} 38