ARM: tegra12: set CPU rate to 2.2GHz for sku 0x87
[linux-3.10.git] / arch / arm / mach-tegra / board-pismo-sensors.c
1 /*
2  * arch/arm/mach-tegra/board-pismo-sensors.c
3  *
4  * Copyright (c) 2012-2013 NVIDIA CORPORATION, All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met:
9  *
10  * Redistributions of source code must retain the above copyright notice,
11  * this list of conditions and the following disclaimer.
12  *
13  * Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in the
15  * documentation and/or other materials provided with the distribution.
16  *
17  * Neither the name of NVIDIA CORPORATION nor the names of its contributors
18  * may be used to endorse or promote products derived from this software
19  * without specific prior written permission.
20  *
21  * This software is licensed under the terms of the GNU General Public
22  * License version 2, as published by the Free Software Foundation, and
23  * may be copied, distributed, and modified under those terms.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28  * GNU General Public License for more details.
29  */
30
31 #include <linux/i2c.h>
32 #include <linux/delay.h>
33 #include <linux/mpu.h>
34 #include <linux/regulator/consumer.h>
35 #include <linux/gpio.h>
36 #include <linux/therm_est.h>
37 #include <linux/nct1008.h>
38 #include <mach/edp.h>
39
40 #include <mach/gpio-tegra.h>
41 #include <mach/pinmux-t11.h>
42 #include <mach/pinmux.h>
43 #include <media/imx091.h>
44 #include <media/ov9772.h>
45 #include <media/as364x.h>
46 #include <media/ad5816.h>
47 #include <generated/mach-types.h>
48 #include <linux/power/sbs-battery.h>
49
50 #include "gpio-names.h"
51 #include "board.h"
52 #include "board-common.h"
53 #include "board-pismo.h"
54 #include "cpu-tegra.h"
55 #include "devices.h"
56 #include "tegra-board-id.h"
57 #include "dvfs.h"
58
59 static struct nvc_gpio_pdata imx091_gpio_pdata[] = {
60         {IMX091_GPIO_RESET, CAM_RSTN, true, false},
61         {IMX091_GPIO_PWDN, CAM1_POWER_DWN_GPIO, true, false},
62         {IMX091_GPIO_GP1, CAM_GPIO1, true, false}
63 };
64
65 static struct throttle_table tj_throttle_table[] = {
66         { {      0, 1000 } },
67         { {  51000, 1000 } },
68         { { 102000, 1000 } },
69         { { 204000, 1000 } },
70         { { 252000, 1000 } },
71         { { 288000, 1000 } },
72         { { 372000, 1000 } },
73         { { 468000, 1000 } },
74         { { 510000, 1000 } },
75         { { 612000, 1000 } },
76         { { 714000, 1050 } },
77         { { 816000, 1050 } },
78         { { 918000, 1050 } },
79         { {1020000, 1100 } },
80         { {1122000, 1100 } },
81         { {1224000, 1100 } },
82         { {1326000, 1100 } },
83         { {1428000, 1100 } },
84         { {1530000, 1100 } },
85 };
86
87 static struct balanced_throttle tj_throttle = {
88         .throt_tab_size = ARRAY_SIZE(tj_throttle_table),
89         .throt_tab = tj_throttle_table,
90 };
91
92 static int __init pismo_throttle_init(void)
93 {
94         if (machine_is_pismo())
95                 balanced_throttle_register(&tj_throttle, "pismo-nct");
96         return 0;
97 }
98 module_init(pismo_throttle_init);
99
100 static struct nct1008_platform_data pismo_nct1008_pdata = {
101         .supported_hwrev = true,
102         .ext_range = true,
103         .conv_rate = 0x08,
104         .offset = 0,
105         .shutdown_ext_limit = 105, /* C */
106         .shutdown_local_limit = 120, /* C */
107
108         .num_trips = 1,
109         .trips = {
110                 {
111                         .cdev_type = "suspend_soctherm",
112                         .trip_temp = 50000,
113                         .trip_type = THERMAL_TRIP_ACTIVE,
114                         .upper = 1,
115                         .lower = 1,
116                         .hysteresis = 5000,
117                 },
118         },
119 };
120
121 static struct i2c_board_info pismo_i2c4_nct1008_board_info[] = {
122         {
123                 I2C_BOARD_INFO("nct1008", 0x4C),
124                 .platform_data = &pismo_nct1008_pdata,
125                 .irq = -1,
126         }
127 };
128
129 #define VI_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _ioreset) \
130         {                                                       \
131                 .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
132                 .func           = TEGRA_MUX_##_mux,             \
133                 .pupd           = TEGRA_PUPD_##_pupd,           \
134                 .tristate       = TEGRA_TRI_##_tri,             \
135                 .io             = TEGRA_PIN_##_io,              \
136                 .lock           = TEGRA_PIN_LOCK_##_lock,       \
137                 .od             = TEGRA_PIN_OD_DEFAULT,         \
138                 .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
139 }
140
141 static int pismo_focuser_power_on(struct ad5816_power_rail *pw)
142 {
143         int err;
144
145         if (unlikely(WARN_ON(!pw || !pw->vdd || !pw->vdd_i2c)))
146                 return -EFAULT;
147
148         err = regulator_enable(pw->vdd_i2c);
149         if (unlikely(err))
150                 goto ad5816_vdd_i2c_fail;
151
152         err = regulator_enable(pw->vdd);
153         if (unlikely(err))
154                 goto ad5816_vdd_fail;
155
156         return 0;
157
158 ad5816_vdd_fail:
159         regulator_disable(pw->vdd_i2c);
160
161 ad5816_vdd_i2c_fail:
162         pr_err("%s FAILED\n", __func__);
163
164         return -ENODEV;
165 }
166
167 static int pismo_focuser_power_off(struct ad5816_power_rail *pw)
168 {
169         if (unlikely(WARN_ON(!pw || !pw->vdd || !pw->vdd_i2c)))
170                 return -EFAULT;
171
172         regulator_disable(pw->vdd);
173         regulator_disable(pw->vdd_i2c);
174
175         return 0;
176 }
177
178 static struct tegra_pingroup_config mclk_disable =
179         VI_PINMUX(CAM_MCLK, VI, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
180
181 static struct tegra_pingroup_config mclk_enable =
182         VI_PINMUX(CAM_MCLK, VI_ALT3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
183
184 static struct tegra_pingroup_config pbb0_disable =
185         VI_PINMUX(GPIO_PBB0, VI, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
186
187 static struct tegra_pingroup_config pbb0_enable =
188         VI_PINMUX(GPIO_PBB0, VI_ALT3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
189
190 /*
191  * As a workaround, pismo_vcmvdd need to be allocated to activate the
192  * sensor devices. This is due to the focuser device(AD5816) will hook up
193  * the i2c bus if it is not powered up.
194 */
195 static struct regulator *pismo_vcmvdd;
196
197 static int pismo_get_vcmvdd(void)
198 {
199         if (!pismo_vcmvdd) {
200                 pismo_vcmvdd = regulator_get(NULL, "vdd_af_cam1");
201                 if (unlikely(WARN_ON(IS_ERR(pismo_vcmvdd)))) {
202                         pr_err("%s: can't get regulator vcmvdd: %ld\n",
203                                 __func__, PTR_ERR(pismo_vcmvdd));
204                         pismo_vcmvdd = NULL;
205                         return -ENODEV;
206                 }
207         }
208         return 0;
209 }
210
211 static int pismo_imx091_power_on(struct nvc_regulator *vreg)
212 {
213         int err;
214
215         if (unlikely(WARN_ON(!vreg)))
216                 return -EFAULT;
217
218         if (pismo_get_vcmvdd())
219                 goto imx091_poweron_fail;
220
221         gpio_set_value(CAM1_POWER_DWN_GPIO, 0);
222         usleep_range(10, 20);
223
224         err = regulator_enable(vreg[IMX091_VREG_AVDD].vreg);
225         if (err)
226                 goto imx091_avdd_fail;
227
228         err = regulator_enable(vreg[IMX091_VREG_IOVDD].vreg);
229         if (err)
230                 goto imx091_iovdd_fail;
231
232         usleep_range(1, 2);
233         gpio_set_value(CAM1_POWER_DWN_GPIO, 1);
234
235         err = regulator_enable(pismo_vcmvdd);
236         if (unlikely(err))
237                 goto imx091_vcmvdd_fail;
238
239         tegra_pinmux_config_table(&mclk_enable, 1);
240         usleep_range(300, 310);
241
242         return 1;
243
244 imx091_vcmvdd_fail:
245         regulator_disable(vreg[IMX091_VREG_IOVDD].vreg);
246
247 imx091_iovdd_fail:
248         regulator_disable(vreg[IMX091_VREG_AVDD].vreg);
249
250 imx091_avdd_fail:
251         gpio_set_value(CAM1_POWER_DWN_GPIO, 0);
252
253 imx091_poweron_fail:
254         pr_err("%s FAILED\n", __func__);
255         return -ENODEV;
256 }
257
258 static int pismo_imx091_power_off(struct nvc_regulator *vreg)
259 {
260         if (unlikely(WARN_ON(!vreg)))
261                 return -EFAULT;
262
263         usleep_range(1, 2);
264         tegra_pinmux_config_table(&mclk_disable, 1);
265         gpio_set_value(CAM1_POWER_DWN_GPIO, 0);
266         usleep_range(1, 2);
267
268         regulator_disable(pismo_vcmvdd);
269         regulator_disable(vreg[IMX091_VREG_IOVDD].vreg);
270         regulator_disable(vreg[IMX091_VREG_AVDD].vreg);
271
272         return 1;
273 }
274
275 static struct nvc_imager_cap imx091_cap = {
276         .identifier             = "IMX091",
277         .sensor_nvc_interface   = 3,
278         .pixel_types[0]         = 0x100,
279         .orientation            = 0,
280         .direction              = 0,
281         .initial_clock_rate_khz = 6000,
282         .clock_profiles[0] = {
283                 .external_clock_khz     = 24000,
284                 .clock_multiplier       = 10416667, /* value / 1,000,000 */
285         },
286         .clock_profiles[1] = {
287                 .external_clock_khz     = 0,
288                 .clock_multiplier       = 0,
289         },
290         .h_sync_edge            = 0,
291         .v_sync_edge            = 0,
292         .mclk_on_vgp0           = 0,
293         .csi_port               = 0,
294         .data_lanes             = 4,
295         .virtual_channel_id     = 0,
296         .discontinuous_clk_mode = 1,
297         .cil_threshold_settle   = 0x0,
298         .min_blank_time_width   = 16,
299         .min_blank_time_height  = 16,
300         .preferred_mode_index   = 0,
301         .focuser_guid           = NVC_FOCUS_GUID(0),
302         .torch_guid             = NVC_TORCH_GUID(0),
303         .cap_version            = NVC_IMAGER_CAPABILITIES_VERSION2,
304 };
305
306 static struct imx091_platform_data imx091_pdata = {
307         .num                    = 0,
308         .sync                   = 0,
309         .dev_name               = "camera",
310         .gpio_count             = ARRAY_SIZE(imx091_gpio_pdata),
311         .gpio                   = imx091_gpio_pdata,
312         .flash_cap              = {
313                 .sdo_trigger_enabled = 1,
314                 .adjustable_flash_timing = 1,
315         },
316         .cap                    = &imx091_cap,
317         .power_on               = pismo_imx091_power_on,
318         .power_off              = pismo_imx091_power_off,
319 };
320
321 static struct sbs_platform_data sbs_pdata = {
322         .poll_retry_count = 100,
323         .i2c_retry_count = 2,
324 };
325
326 static int pismo_ov9772_power_on(struct ov9772_power_rail *pw)
327 {
328         int err;
329
330         if (unlikely(!pw || !pw->avdd || !pw->dovdd))
331                 return -EFAULT;
332
333         if (pismo_get_vcmvdd())
334                 goto ov9772_get_vcmvdd_fail;
335
336         gpio_set_value(CAM2_POWER_DWN_GPIO, 0);
337         gpio_set_value(CAM_RSTN, 0);
338
339         err = regulator_enable(pw->avdd);
340         if (unlikely(err))
341                 goto ov9772_avdd_fail;
342
343         err = regulator_enable(pw->dovdd);
344         if (unlikely(err))
345                 goto ov9772_dovdd_fail;
346
347         gpio_set_value(CAM_RSTN, 1);
348         gpio_set_value(CAM2_POWER_DWN_GPIO, 1);
349
350         err = regulator_enable(pismo_vcmvdd);
351         if (unlikely(err))
352                 goto ov9772_vcmvdd_fail;
353
354         tegra_pinmux_config_table(&pbb0_enable, 1);
355         usleep_range(340, 380);
356
357         /* return 1 to skip the in-driver power_on sequence */
358         return 1;
359
360 ov9772_vcmvdd_fail:
361         regulator_disable(pw->dovdd);
362
363 ov9772_dovdd_fail:
364         regulator_disable(pw->avdd);
365
366 ov9772_avdd_fail:
367         gpio_set_value(CAM_RSTN, 0);
368         gpio_set_value(CAM2_POWER_DWN_GPIO, 0);
369
370 ov9772_get_vcmvdd_fail:
371         pr_err("%s FAILED\n", __func__);
372         return -ENODEV;
373 }
374
375 static int pismo_ov9772_power_off(struct ov9772_power_rail *pw)
376 {
377         if (unlikely(!pw || !pismo_vcmvdd || !pw->avdd || !pw->dovdd))
378                 return -EFAULT;
379
380         usleep_range(21, 25);
381         tegra_pinmux_config_table(&pbb0_disable, 1);
382
383         gpio_set_value(CAM2_POWER_DWN_GPIO, 0);
384         gpio_set_value(CAM_RSTN, 0);
385
386         regulator_disable(pismo_vcmvdd);
387         regulator_disable(pw->dovdd);
388         regulator_disable(pw->avdd);
389
390         /* return 1 to skip the in-driver power_off sequence */
391         return 1;
392 }
393
394 static struct nvc_gpio_pdata ov9772_gpio_pdata[] = {
395         { OV9772_GPIO_TYPE_SHTDN, CAM2_POWER_DWN_GPIO, true, 0, },
396         { OV9772_GPIO_TYPE_PWRDN, CAM_RSTN, true, 0, },
397 };
398
399 static struct ov9772_platform_data pismo_ov9772_pdata = {
400         .num            = 1,
401         .dev_name       = "camera",
402         .gpio_count     = ARRAY_SIZE(ov9772_gpio_pdata),
403         .gpio           = ov9772_gpio_pdata,
404         .power_on       = pismo_ov9772_power_on,
405         .power_off      = pismo_ov9772_power_off,
406 };
407
408 static int pismo_as3648_power_on(struct as364x_power_rail *pw)
409 {
410         int err = pismo_get_vcmvdd();
411
412         if (err)
413                 return err;
414
415         return regulator_enable(pismo_vcmvdd);
416 }
417
418 static int pismo_as3648_power_off(struct as364x_power_rail *pw)
419 {
420         if (!pismo_vcmvdd)
421                 return -ENODEV;
422
423         return regulator_disable(pismo_vcmvdd);
424 }
425
426 static struct as364x_platform_data pismo_as3648_pdata = {
427         .config         = {
428                 .led_mask       = 3,
429                 .max_total_current_mA = 1000,
430                 .max_peak_current_mA = 600,
431                 .vin_low_v_run_mV = 3070,
432                 .strobe_type = 1,
433                 },
434         .pinstate       = {
435                 .mask   = 1 << (CAM_FLASH_STROBE - TEGRA_GPIO_PBB0),
436                 .values = 1 << (CAM_FLASH_STROBE - TEGRA_GPIO_PBB0)
437                 },
438         .dev_name       = "torch",
439         .type           = AS3648,
440         .gpio_strobe    = CAM_FLASH_STROBE,
441
442         .power_on_callback = pismo_as3648_power_on,
443         .power_off_callback = pismo_as3648_power_off,
444 };
445
446 static struct ad5816_platform_data pismo_ad5816_pdata = {
447         .cfg = 0,
448         .num = 0,
449         .sync = 0,
450         .dev_name = "focuser",
451         .power_on = pismo_focuser_power_on,
452         .power_off = pismo_focuser_power_off,
453 };
454
455 static struct i2c_board_info pismo_i2c_board_info_e1625[] = {
456         {
457                 I2C_BOARD_INFO("imx091", 0x36),
458                 .platform_data = &imx091_pdata,
459         },
460         {
461                 I2C_BOARD_INFO("ov9772", 0x10),
462                 .platform_data = &pismo_ov9772_pdata,
463         },
464         {
465                 I2C_BOARD_INFO("as3648", 0x30),
466                 .platform_data = &pismo_as3648_pdata,
467         },
468         {
469                 I2C_BOARD_INFO("ad5816", 0x0E),
470                 .platform_data = &pismo_ad5816_pdata,
471         },
472 };
473
474 static int pismo_camera_init(void)
475 {
476         tegra_pinmux_config_table(&mclk_disable, 1);
477         tegra_pinmux_config_table(&pbb0_disable, 1);
478
479         i2c_register_board_info(2, pismo_i2c_board_info_e1625,
480                 ARRAY_SIZE(pismo_i2c_board_info_e1625));
481         return 0;
482 }
483
484 /* MPU board file definition    */
485 static struct mpu_platform_data mpu9150_gyro_data = {
486         .int_config     = 0x10,
487         .level_shifter  = 0,
488         /* Located in board_[platformname].h */
489         .orientation    = MPU_GYRO_ORIENTATION,
490         .sec_slave_type = SECONDARY_SLAVE_TYPE_COMPASS,
491         .sec_slave_id   = COMPASS_ID_AK8975,
492         .secondary_i2c_addr     = MPU_COMPASS_ADDR,
493         .secondary_read_reg     = 0x06,
494         .secondary_orientation  = MPU_COMPASS_ORIENTATION,
495         .key            = {0x4E, 0xCC, 0x7E, 0xEB, 0xF6, 0x1E, 0x35, 0x22,
496                            0x00, 0x34, 0x0D, 0x65, 0x32, 0xE9, 0x94, 0x89},
497 };
498
499 #define TEGRA_CAMERA_GPIO(_gpio, _label, _value)                \
500         {                                                       \
501                 .gpio = _gpio,                                  \
502                 .label = _label,                                \
503                 .value = _value,                                \
504         }
505
506 static struct i2c_board_info pismo_i2c_board_info_cm3218[] = {
507         {
508                 I2C_BOARD_INFO("cm3218", 0x48),
509         },
510 };
511
512 static struct i2c_board_info __initdata inv_mpu9150_i2c2_board_info[] = {
513         {
514                 I2C_BOARD_INFO(MPU_GYRO_NAME, MPU_GYRO_ADDR),
515                 .platform_data = &mpu9150_gyro_data,
516         },
517 };
518
519 static void mpuirq_init(void)
520 {
521         int ret = 0;
522         unsigned gyro_irq_gpio = MPU_GYRO_IRQ_GPIO;
523         unsigned gyro_bus_num = MPU_GYRO_BUS_NUM;
524         char *gyro_name = MPU_GYRO_NAME;
525
526         pr_info("*** MPU START *** mpuirq_init...\n");
527
528         ret = gpio_request(gyro_irq_gpio, gyro_name);
529
530         if (ret < 0) {
531                 pr_err("%s: gpio_request failed %d\n", __func__, ret);
532                 return;
533         }
534
535         ret = gpio_direction_input(gyro_irq_gpio);
536         if (ret < 0) {
537                 pr_err("%s: gpio_direction_input failed %d\n", __func__, ret);
538                 gpio_free(gyro_irq_gpio);
539                 return;
540         }
541         pr_info("*** MPU END *** mpuirq_init...\n");
542
543         inv_mpu9150_i2c2_board_info[0].irq = gpio_to_irq(MPU_GYRO_IRQ_GPIO);
544         i2c_register_board_info(gyro_bus_num, inv_mpu9150_i2c2_board_info,
545                 ARRAY_SIZE(inv_mpu9150_i2c2_board_info));
546 }
547
548 static int pismo_nct1008_init(void)
549 {
550         int nct1008_port;
551         int ret = 0;
552
553         nct1008_port = TEGRA_GPIO_PX6;
554
555         tegra_add_all_vmin_trips(pismo_nct1008_pdata.trips,
556                                 &pismo_nct1008_pdata.num_trips);
557
558         pismo_i2c4_nct1008_board_info[0].irq =
559                         gpio_to_irq(nct1008_port);
560         pr_info("%s: pismo nct1008 irq %d", __func__,
561                         pismo_i2c4_nct1008_board_info[0].irq);
562
563         ret = gpio_request(nct1008_port, "temp_alert");
564         if (ret < 0)
565                 return ret;
566
567         ret = gpio_direction_input(nct1008_port);
568         if (ret < 0) {
569                 pr_info("%s: calling gpio_free(nct1008_port)",
570                                 __func__);
571                 gpio_free(nct1008_port);
572         }
573
574         /* pismo has thermal sensor on GEN1-I2C i.e. instance 0 */
575         i2c_register_board_info(0, pismo_i2c4_nct1008_board_info,
576                 ARRAY_SIZE(pismo_i2c4_nct1008_board_info));
577
578         return ret;
579 }
580
581 static struct i2c_board_info __initdata bq20z45_pdata[] = {
582         {
583                 I2C_BOARD_INFO("sbs-battery", 0x0B),
584                 .platform_data = &sbs_pdata,
585         },
586 };
587
588 #ifdef CONFIG_TEGRA_SKIN_THROTTLE
589 static int tegra_skin_match(struct thermal_zone_device *thz, void *data)
590 {
591         return strcmp((char *)data, thz->type) == 0;
592 }
593
594 static int tegra_skin_get_temp(void *data, long *temp)
595 {
596         struct thermal_zone_device *thz;
597
598         thz = thermal_zone_device_find(data, tegra_skin_match);
599
600         if (!thz || thz->ops->get_temp(thz, temp))
601                 *temp = 25000;
602
603         return 0;
604 }
605
606 static struct therm_est_data skin_data = {
607         .toffset = 9793,
608         .polling_period = 1100,
609         .ndevs = 2,
610         .devs = {
611                         {
612                                 .dev_data = "nct_ext",
613                                 .get_temp = tegra_skin_get_temp,
614                                 .coeffs = {
615                                         2, 1, 1, 1,
616                                         1, 1, 1, 1,
617                                         1, 1, 1, 0,
618                                         1, 1, 0, 0,
619                                         0, 0, -1, -7
620                                 },
621                         },
622                         {
623                                 .dev_data = "nct_int",
624                                 .get_temp = tegra_skin_get_temp,
625                                 .coeffs = {
626                                         -11, -7, -5, -3,
627                                         -3, -2, -1, 0,
628                                         0, 0, 1, 1,
629                                         1, 2, 2, 3,
630                                         4, 6, 11, 18
631                                 },
632                         },
633         },
634         .trip_temp = 45000,
635         .tc1 = 10,
636         .tc2 = 1,
637         .passive_delay = 15000,
638 };
639
640 static struct throttle_table skin_throttle_table[] = {
641         { { 640000, 1200 } },
642         { { 640000, 1200 } },
643         { { 760000, 1200 } },
644         { { 760000, 1200 } },
645         { {1000000, 1200 } },
646         { {1000000, 1200 } },
647 };
648
649 static struct balanced_throttle skin_throttle = {
650         .throt_tab_size = ARRAY_SIZE(skin_throttle_table),
651         .throt_tab = skin_throttle_table,
652 };
653
654 static int __init pismo_skin_init(void)
655 {
656         struct thermal_cooling_device *skin_cdev;
657
658         skin_cdev = balanced_throttle_register(&skin_throttle, "pismo-skin");
659
660         skin_data.cdev = skin_cdev;
661         tegra_skin_therm_est_device.dev.platform_data = &skin_data;
662         platform_device_register(&tegra_skin_therm_est_device);
663
664         return 0;
665 }
666 late_initcall(pismo_skin_init);
667 #endif
668
669 int __init pismo_sensors_init(void)
670 {
671         int err;
672
673         err = pismo_nct1008_init();
674         if (err)
675                 return err;
676
677         pismo_camera_init();
678         mpuirq_init();
679
680         i2c_register_board_info(0, pismo_i2c_board_info_cm3218,
681                 ARRAY_SIZE(pismo_i2c_board_info_cm3218));
682
683         i2c_register_board_info(0, bq20z45_pdata,
684                 ARRAY_SIZE(bq20z45_pdata));
685
686         return 0;
687 }