95f33865ab9b00351836470e368af0171165c683
[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 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 = 85, /* C */
106         .shutdown_local_limit = 120, /* C */
107
108         .passive_delay = 2000,
109
110         .num_trips = 1,
111         .trips = {
112                 /* Thermal Throttling */
113                 [0] = {
114                         .cdev_type = "pismo-nct",
115                         .trip_temp = 75000,
116                         .trip_type = THERMAL_TRIP_PASSIVE,
117                         .upper = THERMAL_NO_LIMIT,
118                         .lower = THERMAL_NO_LIMIT,
119                         .hysteresis = 0,
120                 },
121         },
122 };
123
124 static struct i2c_board_info pismo_i2c4_nct1008_board_info[] = {
125         {
126                 I2C_BOARD_INFO("nct1008", 0x4C),
127                 .platform_data = &pismo_nct1008_pdata,
128                 .irq = -1,
129         }
130 };
131
132 #define VI_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _ioreset) \
133         {                                                       \
134                 .pingroup       = TEGRA_PINGROUP_##_pingroup,   \
135                 .func           = TEGRA_MUX_##_mux,             \
136                 .pupd           = TEGRA_PUPD_##_pupd,           \
137                 .tristate       = TEGRA_TRI_##_tri,             \
138                 .io             = TEGRA_PIN_##_io,              \
139                 .lock           = TEGRA_PIN_LOCK_##_lock,       \
140                 .od             = TEGRA_PIN_OD_DEFAULT,         \
141                 .ioreset        = TEGRA_PIN_IO_RESET_##_ioreset \
142 }
143
144 static int pismo_focuser_power_on(struct ad5816_power_rail *pw)
145 {
146         int err;
147
148         if (unlikely(WARN_ON(!pw || !pw->vdd || !pw->vdd_i2c)))
149                 return -EFAULT;
150
151         err = regulator_enable(pw->vdd_i2c);
152         if (unlikely(err))
153                 goto ad5816_vdd_i2c_fail;
154
155         err = regulator_enable(pw->vdd);
156         if (unlikely(err))
157                 goto ad5816_vdd_fail;
158
159         return 0;
160
161 ad5816_vdd_fail:
162         regulator_disable(pw->vdd_i2c);
163
164 ad5816_vdd_i2c_fail:
165         pr_err("%s FAILED\n", __func__);
166
167         return -ENODEV;
168 }
169
170 static int pismo_focuser_power_off(struct ad5816_power_rail *pw)
171 {
172         if (unlikely(WARN_ON(!pw || !pw->vdd || !pw->vdd_i2c)))
173                 return -EFAULT;
174
175         regulator_disable(pw->vdd);
176         regulator_disable(pw->vdd_i2c);
177
178         return 0;
179 }
180
181 static struct tegra_pingroup_config mclk_disable =
182         VI_PINMUX(CAM_MCLK, VI, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
183
184 static struct tegra_pingroup_config mclk_enable =
185         VI_PINMUX(CAM_MCLK, VI_ALT3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
186
187 static struct tegra_pingroup_config pbb0_disable =
188         VI_PINMUX(GPIO_PBB0, VI, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
189
190 static struct tegra_pingroup_config pbb0_enable =
191         VI_PINMUX(GPIO_PBB0, VI_ALT3, NORMAL, NORMAL, OUTPUT, DEFAULT, DEFAULT);
192
193 /*
194  * As a workaround, pismo_vcmvdd need to be allocated to activate the
195  * sensor devices. This is due to the focuser device(AD5816) will hook up
196  * the i2c bus if it is not powered up.
197 */
198 static struct regulator *pismo_vcmvdd;
199
200 static int pismo_get_vcmvdd(void)
201 {
202         if (!pismo_vcmvdd) {
203                 pismo_vcmvdd = regulator_get(NULL, "vdd_af_cam1");
204                 if (unlikely(WARN_ON(IS_ERR(pismo_vcmvdd)))) {
205                         pr_err("%s: can't get regulator vcmvdd: %ld\n",
206                                 __func__, PTR_ERR(pismo_vcmvdd));
207                         pismo_vcmvdd = NULL;
208                         return -ENODEV;
209                 }
210         }
211         return 0;
212 }
213
214 static int pismo_imx091_power_on(struct nvc_regulator *vreg)
215 {
216         int err;
217
218         if (unlikely(WARN_ON(!vreg)))
219                 return -EFAULT;
220
221         if (pismo_get_vcmvdd())
222                 goto imx091_poweron_fail;
223
224         gpio_set_value(CAM1_POWER_DWN_GPIO, 0);
225         usleep_range(10, 20);
226
227         err = regulator_enable(vreg[IMX091_VREG_AVDD].vreg);
228         if (err)
229                 goto imx091_avdd_fail;
230
231         err = regulator_enable(vreg[IMX091_VREG_IOVDD].vreg);
232         if (err)
233                 goto imx091_iovdd_fail;
234
235         usleep_range(1, 2);
236         gpio_set_value(CAM1_POWER_DWN_GPIO, 1);
237
238         err = regulator_enable(pismo_vcmvdd);
239         if (unlikely(err))
240                 goto imx091_vcmvdd_fail;
241
242         tegra_pinmux_config_table(&mclk_enable, 1);
243         usleep_range(300, 310);
244
245         return 1;
246
247 imx091_vcmvdd_fail:
248         regulator_disable(vreg[IMX091_VREG_IOVDD].vreg);
249
250 imx091_iovdd_fail:
251         regulator_disable(vreg[IMX091_VREG_AVDD].vreg);
252
253 imx091_avdd_fail:
254         gpio_set_value(CAM1_POWER_DWN_GPIO, 0);
255
256 imx091_poweron_fail:
257         pr_err("%s FAILED\n", __func__);
258         return -ENODEV;
259 }
260
261 static int pismo_imx091_power_off(struct nvc_regulator *vreg)
262 {
263         if (unlikely(WARN_ON(!vreg)))
264                 return -EFAULT;
265
266         usleep_range(1, 2);
267         tegra_pinmux_config_table(&mclk_disable, 1);
268         gpio_set_value(CAM1_POWER_DWN_GPIO, 0);
269         usleep_range(1, 2);
270
271         regulator_disable(pismo_vcmvdd);
272         regulator_disable(vreg[IMX091_VREG_IOVDD].vreg);
273         regulator_disable(vreg[IMX091_VREG_AVDD].vreg);
274
275         return 1;
276 }
277
278 static struct nvc_imager_cap imx091_cap = {
279         .identifier             = "IMX091",
280         .sensor_nvc_interface   = 3,
281         .pixel_types[0]         = 0x100,
282         .orientation            = 0,
283         .direction              = 0,
284         .initial_clock_rate_khz = 6000,
285         .clock_profiles[0] = {
286                 .external_clock_khz     = 24000,
287                 .clock_multiplier       = 10416667, /* value / 1,000,000 */
288         },
289         .clock_profiles[1] = {
290                 .external_clock_khz     = 0,
291                 .clock_multiplier       = 0,
292         },
293         .h_sync_edge            = 0,
294         .v_sync_edge            = 0,
295         .mclk_on_vgp0           = 0,
296         .csi_port               = 0,
297         .data_lanes             = 4,
298         .virtual_channel_id     = 0,
299         .discontinuous_clk_mode = 1,
300         .cil_threshold_settle   = 0x0,
301         .min_blank_time_width   = 16,
302         .min_blank_time_height  = 16,
303         .preferred_mode_index   = 0,
304         .focuser_guid           = NVC_FOCUS_GUID(0),
305         .torch_guid             = NVC_TORCH_GUID(0),
306         .cap_version            = NVC_IMAGER_CAPABILITIES_VERSION2,
307 };
308
309 static struct imx091_platform_data imx091_pdata = {
310         .num                    = 0,
311         .sync                   = 0,
312         .dev_name               = "camera",
313         .gpio_count             = ARRAY_SIZE(imx091_gpio_pdata),
314         .gpio                   = imx091_gpio_pdata,
315         .flash_cap              = {
316                 .sdo_trigger_enabled = 1,
317                 .adjustable_flash_timing = 1,
318         },
319         .cap                    = &imx091_cap,
320         .power_on               = pismo_imx091_power_on,
321         .power_off              = pismo_imx091_power_off,
322 };
323
324 static struct sbs_platform_data sbs_pdata = {
325         .poll_retry_count = 100,
326         .i2c_retry_count = 2,
327 };
328
329 static int pismo_ov9772_power_on(struct ov9772_power_rail *pw)
330 {
331         int err;
332
333         if (unlikely(!pw || !pw->avdd || !pw->dovdd))
334                 return -EFAULT;
335
336         if (pismo_get_vcmvdd())
337                 goto ov9772_get_vcmvdd_fail;
338
339         gpio_set_value(CAM2_POWER_DWN_GPIO, 0);
340         gpio_set_value(CAM_RSTN, 0);
341
342         err = regulator_enable(pw->avdd);
343         if (unlikely(err))
344                 goto ov9772_avdd_fail;
345
346         err = regulator_enable(pw->dovdd);
347         if (unlikely(err))
348                 goto ov9772_dovdd_fail;
349
350         gpio_set_value(CAM_RSTN, 1);
351         gpio_set_value(CAM2_POWER_DWN_GPIO, 1);
352
353         err = regulator_enable(pismo_vcmvdd);
354         if (unlikely(err))
355                 goto ov9772_vcmvdd_fail;
356
357         tegra_pinmux_config_table(&pbb0_enable, 1);
358         usleep_range(340, 380);
359
360         /* return 1 to skip the in-driver power_on sequence */
361         return 1;
362
363 ov9772_vcmvdd_fail:
364         regulator_disable(pw->dovdd);
365
366 ov9772_dovdd_fail:
367         regulator_disable(pw->avdd);
368
369 ov9772_avdd_fail:
370         gpio_set_value(CAM_RSTN, 0);
371         gpio_set_value(CAM2_POWER_DWN_GPIO, 0);
372
373 ov9772_get_vcmvdd_fail:
374         pr_err("%s FAILED\n", __func__);
375         return -ENODEV;
376 }
377
378 static int pismo_ov9772_power_off(struct ov9772_power_rail *pw)
379 {
380         if (unlikely(!pw || !pismo_vcmvdd || !pw->avdd || !pw->dovdd))
381                 return -EFAULT;
382
383         usleep_range(21, 25);
384         tegra_pinmux_config_table(&pbb0_disable, 1);
385
386         gpio_set_value(CAM2_POWER_DWN_GPIO, 0);
387         gpio_set_value(CAM_RSTN, 0);
388
389         regulator_disable(pismo_vcmvdd);
390         regulator_disable(pw->dovdd);
391         regulator_disable(pw->avdd);
392
393         /* return 1 to skip the in-driver power_off sequence */
394         return 1;
395 }
396
397 static struct nvc_gpio_pdata ov9772_gpio_pdata[] = {
398         { OV9772_GPIO_TYPE_SHTDN, CAM2_POWER_DWN_GPIO, true, 0, },
399         { OV9772_GPIO_TYPE_PWRDN, CAM_RSTN, true, 0, },
400 };
401
402 static struct ov9772_platform_data pismo_ov9772_pdata = {
403         .num            = 1,
404         .dev_name       = "camera",
405         .gpio_count     = ARRAY_SIZE(ov9772_gpio_pdata),
406         .gpio           = ov9772_gpio_pdata,
407         .power_on       = pismo_ov9772_power_on,
408         .power_off      = pismo_ov9772_power_off,
409 };
410
411 static int pismo_as3648_power_on(struct as364x_power_rail *pw)
412 {
413         int err = pismo_get_vcmvdd();
414
415         if (err)
416                 return err;
417
418         return regulator_enable(pismo_vcmvdd);
419 }
420
421 static int pismo_as3648_power_off(struct as364x_power_rail *pw)
422 {
423         if (!pismo_vcmvdd)
424                 return -ENODEV;
425
426         return regulator_disable(pismo_vcmvdd);
427 }
428
429 static struct as364x_platform_data pismo_as3648_pdata = {
430         .config         = {
431                 .max_total_current_mA = 1000,
432                 .max_peak_current_mA = 600,
433                 .vin_low_v_run_mV = 3070,
434                 .strobe_type = 1,
435                 },
436         .pinstate       = {
437                 .mask   = 1 << (CAM_FLASH_STROBE - TEGRA_GPIO_PBB0),
438                 .values = 1 << (CAM_FLASH_STROBE - TEGRA_GPIO_PBB0)
439                 },
440         .dev_name       = "torch",
441         .type           = AS3648,
442         .gpio_strobe    = CAM_FLASH_STROBE,
443         .led_mask       = 3,
444
445         .power_on_callback = pismo_as3648_power_on,
446         .power_off_callback = pismo_as3648_power_off,
447 };
448
449 static struct ad5816_platform_data pismo_ad5816_pdata = {
450         .cfg = 0,
451         .num = 0,
452         .sync = 0,
453         .dev_name = "focuser",
454         .power_on = pismo_focuser_power_on,
455         .power_off = pismo_focuser_power_off,
456 };
457
458 static struct i2c_board_info pismo_i2c_board_info_e1625[] = {
459         {
460                 I2C_BOARD_INFO("imx091", 0x36),
461                 .platform_data = &imx091_pdata,
462         },
463         {
464                 I2C_BOARD_INFO("ov9772", 0x10),
465                 .platform_data = &pismo_ov9772_pdata,
466         },
467         {
468                 I2C_BOARD_INFO("as3648", 0x30),
469                 .platform_data = &pismo_as3648_pdata,
470         },
471         {
472                 I2C_BOARD_INFO("ad5816", 0x0E),
473                 .platform_data = &pismo_ad5816_pdata,
474         },
475 };
476
477 static int pismo_camera_init(void)
478 {
479         tegra_pinmux_config_table(&mclk_disable, 1);
480         tegra_pinmux_config_table(&pbb0_disable, 1);
481
482         i2c_register_board_info(2, pismo_i2c_board_info_e1625,
483                 ARRAY_SIZE(pismo_i2c_board_info_e1625));
484         return 0;
485 }
486
487 /* MPU board file definition    */
488 static struct mpu_platform_data mpu9150_gyro_data = {
489         .int_config     = 0x10,
490         .level_shifter  = 0,
491         /* Located in board_[platformname].h */
492         .orientation    = MPU_GYRO_ORIENTATION,
493         .sec_slave_type = SECONDARY_SLAVE_TYPE_COMPASS,
494         .sec_slave_id   = COMPASS_ID_AK8975,
495         .secondary_i2c_addr     = MPU_COMPASS_ADDR,
496         .secondary_read_reg     = 0x06,
497         .secondary_orientation  = MPU_COMPASS_ORIENTATION,
498         .key            = {0x4E, 0xCC, 0x7E, 0xEB, 0xF6, 0x1E, 0x35, 0x22,
499                            0x00, 0x34, 0x0D, 0x65, 0x32, 0xE9, 0x94, 0x89},
500 };
501
502 #define TEGRA_CAMERA_GPIO(_gpio, _label, _value)                \
503         {                                                       \
504                 .gpio = _gpio,                                  \
505                 .label = _label,                                \
506                 .value = _value,                                \
507         }
508
509 static struct i2c_board_info pismo_i2c_board_info_cm3218[] = {
510         {
511                 I2C_BOARD_INFO("cm3218", 0x48),
512         },
513 };
514
515 static struct i2c_board_info __initdata inv_mpu9150_i2c2_board_info[] = {
516         {
517                 I2C_BOARD_INFO(MPU_GYRO_NAME, MPU_GYRO_ADDR),
518                 .platform_data = &mpu9150_gyro_data,
519         },
520 };
521
522 static void mpuirq_init(void)
523 {
524         int ret = 0;
525         unsigned gyro_irq_gpio = MPU_GYRO_IRQ_GPIO;
526         unsigned gyro_bus_num = MPU_GYRO_BUS_NUM;
527         char *gyro_name = MPU_GYRO_NAME;
528
529         pr_info("*** MPU START *** mpuirq_init...\n");
530
531         ret = gpio_request(gyro_irq_gpio, gyro_name);
532
533         if (ret < 0) {
534                 pr_err("%s: gpio_request failed %d\n", __func__, ret);
535                 return;
536         }
537
538         ret = gpio_direction_input(gyro_irq_gpio);
539         if (ret < 0) {
540                 pr_err("%s: gpio_direction_input failed %d\n", __func__, ret);
541                 gpio_free(gyro_irq_gpio);
542                 return;
543         }
544         pr_info("*** MPU END *** mpuirq_init...\n");
545
546         inv_mpu9150_i2c2_board_info[0].irq = gpio_to_irq(MPU_GYRO_IRQ_GPIO);
547         i2c_register_board_info(gyro_bus_num, inv_mpu9150_i2c2_board_info,
548                 ARRAY_SIZE(inv_mpu9150_i2c2_board_info));
549 }
550
551 static int pismo_nct1008_init(void)
552 {
553         int nct1008_port;
554         int ret = 0;
555
556         nct1008_port = TEGRA_GPIO_PX6;
557
558         tegra_platform_edp_init(pismo_nct1008_pdata.trips,
559                                 &pismo_nct1008_pdata.num_trips);
560         tegra_add_cdev_trips(pismo_nct1008_pdata.trips,
561                                 &pismo_nct1008_pdata.num_trips);
562
563         pismo_i2c4_nct1008_board_info[0].irq =
564                         gpio_to_irq(nct1008_port);
565         pr_info("%s: pismo nct1008 irq %d", __func__,
566                         pismo_i2c4_nct1008_board_info[0].irq);
567
568         ret = gpio_request(nct1008_port, "temp_alert");
569         if (ret < 0)
570                 return ret;
571
572         ret = gpio_direction_input(nct1008_port);
573         if (ret < 0) {
574                 pr_info("%s: calling gpio_free(nct1008_port)",
575                                 __func__);
576                 gpio_free(nct1008_port);
577         }
578
579         /* pismo has thermal sensor on GEN1-I2C i.e. instance 0 */
580         i2c_register_board_info(0, pismo_i2c4_nct1008_board_info,
581                 ARRAY_SIZE(pismo_i2c4_nct1008_board_info));
582
583         return ret;
584 }
585
586 static struct i2c_board_info __initdata bq20z45_pdata[] = {
587         {
588                 I2C_BOARD_INFO("sbs-battery", 0x0B),
589                 .platform_data = &sbs_pdata,
590         },
591 };
592
593 #ifdef CONFIG_TEGRA_SKIN_THROTTLE
594 static int tegra_skin_match(struct thermal_zone_device *thz, void *data)
595 {
596         return strcmp((char *)data, thz->type) == 0;
597 }
598
599 static int tegra_skin_get_temp(void *data, long *temp)
600 {
601         struct thermal_zone_device *thz;
602
603         thz = thermal_zone_device_find(data, tegra_skin_match);
604
605         if (!thz || thz->ops->get_temp(thz, temp))
606                 *temp = 25000;
607
608         return 0;
609 }
610
611 static struct therm_est_data skin_data = {
612         .toffset = 9793,
613         .polling_period = 1100,
614         .ndevs = 2,
615         .devs = {
616                         {
617                                 .dev_data = "nct_ext",
618                                 .get_temp = tegra_skin_get_temp,
619                                 .coeffs = {
620                                         2, 1, 1, 1,
621                                         1, 1, 1, 1,
622                                         1, 1, 1, 0,
623                                         1, 1, 0, 0,
624                                         0, 0, -1, -7
625                                 },
626                         },
627                         {
628                                 .dev_data = "nct_int",
629                                 .get_temp = tegra_skin_get_temp,
630                                 .coeffs = {
631                                         -11, -7, -5, -3,
632                                         -3, -2, -1, 0,
633                                         0, 0, 1, 1,
634                                         1, 2, 2, 3,
635                                         4, 6, 11, 18
636                                 },
637                         },
638         },
639         .trip_temp = 43000,
640         .tc1 = 1,
641         .tc2 = 15,
642         .passive_delay = 15000,
643 };
644
645 static struct throttle_table skin_throttle_table[] = {
646         { 640000, 1200 },
647         { 640000, 1200 },
648         { 760000, 1200 },
649         { 760000, 1200 },
650         {1000000, 1200 },
651         {1000000, 1200 },
652 };
653
654 static struct balanced_throttle skin_throttle = {
655         .throt_tab_size = ARRAY_SIZE(skin_throttle_table),
656         .throt_tab = skin_throttle_table,
657 };
658
659 static int __init pismo_skin_init(void)
660 {
661         struct thermal_cooling_device *skin_cdev;
662
663         skin_cdev = balanced_throttle_register(&skin_throttle, "pismo-skin");
664
665         skin_data.cdev = skin_cdev;
666         tegra_skin_therm_est_device.dev.platform_data = &skin_data;
667         platform_device_register(&tegra_skin_therm_est_device);
668
669         return 0;
670 }
671 late_initcall(pismo_skin_init);
672 #endif
673
674 int __init pismo_sensors_init(void)
675 {
676         int err;
677
678         err = pismo_nct1008_init();
679         if (err)
680                 return err;
681
682         pismo_camera_init();
683         mpuirq_init();
684
685         i2c_register_board_info(0, pismo_i2c_board_info_cm3218,
686                 ARRAY_SIZE(pismo_i2c_board_info_cm3218));
687
688         i2c_register_board_info(0, bq20z45_pdata,
689                 ARRAY_SIZE(bq20z45_pdata));
690
691         return 0;
692 }