aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-cm-t35.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2015-03-25 18:57:30 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-02 15:41:01 -0400
commit6890874772e4c5e2925187f262893df0eb0322ba (patch)
tree474cac6b5ec549f201648746b428a6fa8b6df1ef /arch/arm/mach-omap2/board-cm-t35.c
parent4c8f14861cccb7b19cfd582e135847aa772f3854 (diff)
[media] omap3isp: Refactor device configuration structs for Device Tree
Make omap3isp configuration data structures more suitable for consumption by the DT by separating the I2C bus information of all the sub-devices in a group and the ISP bus information from each other. The ISP bus information is made a pointer instead of being directly embedded in the struct. In the case of the DT only the sensor specific information on the ISP bus configuration is retained. The structs are renamed to reflect that. After this change the structs needed to describe device configuration can be allocated and accessed separately without those needed only in the case of platform data. The platform data related structs can be later removed once the support for platform data can be removed. Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Igor Grinberg <grinberg@compulab.co.il> (for cm-t35) Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-cm-t35.c')
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c57
1 files changed, 21 insertions, 36 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 91738a14ecbe..b5dfbc1b1fc6 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -492,51 +492,36 @@ static struct twl4030_platform_data cm_t35_twldata = {
492#include <media/omap3isp.h> 492#include <media/omap3isp.h>
493#include "devices.h" 493#include "devices.h"
494 494
495static struct i2c_board_info cm_t35_isp_i2c_boardinfo[] = { 495static struct isp_platform_subdev cm_t35_isp_subdevs[] = {
496 { 496 {
497 I2C_BOARD_INFO("mt9t001", 0x5d), 497 .board_info = &(struct i2c_board_info){
498 }, 498 I2C_BOARD_INFO("mt9t001", 0x5d)
499 { 499 },
500 I2C_BOARD_INFO("tvp5150", 0x5c),
501 },
502};
503
504static struct isp_subdev_i2c_board_info cm_t35_isp_primary_subdevs[] = {
505 {
506 .board_info = &cm_t35_isp_i2c_boardinfo[0],
507 .i2c_adapter_id = 3,
508 },
509 { NULL, 0, },
510};
511
512static struct isp_subdev_i2c_board_info cm_t35_isp_secondary_subdevs[] = {
513 {
514 .board_info = &cm_t35_isp_i2c_boardinfo[1],
515 .i2c_adapter_id = 3, 500 .i2c_adapter_id = 3,
516 }, 501 .bus = &(struct isp_bus_cfg){
517 { NULL, 0, }, 502 .interface = ISP_INTERFACE_PARALLEL,
518}; 503 .bus = {
519 504 .parallel = {
520static struct isp_v4l2_subdevs_group cm_t35_isp_subdevs[] = { 505 .clk_pol = 1,
521 { 506 },
522 .subdevs = cm_t35_isp_primary_subdevs,
523 .interface = ISP_INTERFACE_PARALLEL,
524 .bus = {
525 .parallel = {
526 .clk_pol = 1,
527 }, 507 },
528 }, 508 },
529 }, 509 },
530 { 510 {
531 .subdevs = cm_t35_isp_secondary_subdevs, 511 .board_info = &(struct i2c_board_info){
532 .interface = ISP_INTERFACE_PARALLEL, 512 I2C_BOARD_INFO("tvp5150", 0x5c),
533 .bus = { 513 },
534 .parallel = { 514 .i2c_adapter_id = 3,
535 .clk_pol = 0, 515 .bus = &(struct isp_bus_cfg){
516 .interface = ISP_INTERFACE_PARALLEL,
517 .bus = {
518 .parallel = {
519 .clk_pol = 0,
520 },
536 }, 521 },
537 }, 522 },
538 }, 523 },
539 { NULL, 0, }, 524 { 0 },
540}; 525};
541 526
542static struct isp_platform_data cm_t35_isp_pdata = { 527static struct isp_platform_data cm_t35_isp_pdata = {