4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: DongGi Jang <dg0402.jang@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
27 #include "device_engine.h"
29 API int device_get_property(devtype_t devtype, int property, int *value)
31 struct device *dev = NULL;
41 dev = find_device(dev, devtype);
43 DBG("devtype cannot find");
47 if (dev->get_int == NULL) {
48 DBG("get_int of %s is null", dev->devname);
52 if (dev->get_int(property, value) == -1) {
53 DBG("get_int of %s return fails", dev->devname);
61 API int device_set_property(devtype_t devtype, int property, int value)
63 struct device *dev = NULL;
72 dev = find_device(dev, devtype);
74 DBG("devtype cannot find");
78 if (dev->set_int == NULL) {
83 if (dev->set_int(property, value) == -1) {