2 * Copyright (c) 2012 Intel Corporation. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License version
6 * 2 as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 #include <linux/errno.h>
20 #include <linux/kernel.h>
21 #include <linux/types.h>
22 #include <media/v4l2-device.h>
23 #include "../../include/linux/atomisp_platform.h"
25 int vcm_power_up(struct v4l2_subdev *sd)
27 const struct camera_af_platform_data *vcm_platform_data;
29 vcm_platform_data = camera_get_af_platform_data();
30 if (NULL == vcm_platform_data)
33 return vcm_platform_data->power_ctrl(sd, 1);
36 int vcm_power_down(struct v4l2_subdev *sd)
38 const struct camera_af_platform_data *vcm_platform_data;
40 vcm_platform_data = camera_get_af_platform_data();
41 if (NULL == vcm_platform_data)
43 return vcm_platform_data->power_ctrl(sd, 0);