From patchwork Mon Dec 26 12:56:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 708788 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tnJyx21fSz9srZ for ; Tue, 27 Dec 2016 00:01:13 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lccB/HOv"; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cLUqd-0002Kx-Kc; Mon, 26 Dec 2016 12:57:51 +0000 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cLUpp-00024h-5e for linux-arm-kernel@lists.infradead.org; Mon, 26 Dec 2016 12:57:03 +0000 Received: by mail-qt0-x243.google.com with SMTP id 3so14339746qtr.2 for ; Mon, 26 Dec 2016 04:56:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZnOZbjtp0HJJLyv96EN76OmGNunEQE/uW5VzWdJoNQE=; b=lccB/HOvqhDR2RFPWCkp3Bdw/bzeNEl+u07G0fwYSN0HdTf4Yg6IkmGzqByAcZBUD1 8/H57goeCINWrUT3n2n7f11+6csfvkfBB/xVDb5va11MX1fxT3XBLRZzdCrIuEpJSBA/ 0M+11d6X+z/1Gv9UMrX/H6SM7olYBnURONHT6j1AQutssXinX5/2GsjWNwcvlRw3t1f0 VWYaG8HBoEDG61sLZtzm4Tuf3sr4dnRkSJDGMreAthzbCnJoi42ZeNzbJBURgkrsRjav SpqOOU6PnGB4atxjtx5WbtvrYVHhHnFlxGEsOd4oYtTcnwsyqNPMnvPDegIfnpoO2A0f 8KQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ZnOZbjtp0HJJLyv96EN76OmGNunEQE/uW5VzWdJoNQE=; b=jPioBs3TTmOOkItL3CkQzkRbHfrde2Yf0umzBmXH2OFdpYzDJEuopGSCge43OfBnGS AoxmVb66jlhvsTRMv93Ju3qrCmhwbz0J1ZXEZqkPTrzN6LUdfCjV7Pgtc9UydWr70L/Y kWvQ7fWOl7iZPVk69wPyGaiDBtG2YRM4ib8CIPAFKq5coXuCbJtEZ7H1bYpWLuOYY13r hLmiwlxlwdY04Ogc7kb/w4+caZp6Rgu2iUKcwkb0GyjZI1ceJIteZXiJXtKGxo5ygEM1 lU8nfoGX2Nse5RcHp/FGgnhJkuVkHQvNyB/k6bb2oUqwhGBNeSMi2OxS+3xwJag+nQOf h8UQ== X-Gm-Message-State: AIkVDXJPbnONRrQypB/rhiDOR1WXFXx6Y4XEnEdMaXBCQT3tkZ6OMv6IayVMbC8Bhgh2ew== X-Received: by 10.200.39.230 with SMTP id x35mr24426346qtx.259.1482757001523; Mon, 26 Dec 2016 04:56:41 -0800 (PST) Received: from localhost.localdomain ([187.180.187.205]) by smtp.gmail.com with ESMTPSA id k20sm19555015qkl.11.2016.12.26.04.56.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Dec 2016 04:56:41 -0800 (PST) From: Fabio Estevam To: shawnguo@kernel.org Subject: [PATCH 6/6] ARM: mach-mx27_3ds: Remove camera support Date: Mon, 26 Dec 2016 10:56:27 -0200 Message-Id: <1482756987-12414-6-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482756987-12414-1-git-send-email-festevam@gmail.com> References: <1482756987-12414-1-git-send-email-festevam@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161226_045701_447368_2D81EB98 X-CRM114-Status: GOOD ( 14.80 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400d:c0d:0:0:0:243 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (festevam[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fabio Estevam , lilja.magnus@gmail.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org From: Fabio Estevam > Since commit 6b879edf75b316 ("[media] staging/media: remove deprecated mx2 driver") the mx2 camera driver has been removed, so remove the camera support from the board file as well. Signed-off-by: Fabio Estevam --- arch/arm/mach-imx/mach-mx27_3ds.c | 90 --------------------------------------- 1 file changed, 90 deletions(-) diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 7ba651a..fcc55fc 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c @@ -31,7 +31,6 @@ #include #include -#include #include #include @@ -166,11 +165,6 @@ static const int mx27pdk_pins[] __initconst = { PC19_PF_SSI4_CLK, }; -static struct gpio mx27_3ds_camera_gpios[] = { - { CSI_PWRDWN, GPIOF_OUT_INIT_HIGH, "camera-power" }, - { CSI_RESET, GPIOF_OUT_INIT_HIGH, "camera-reset" }, -}; - static const struct imxuart_platform_data uart_pdata __initconst = { .flags = IMXUART_HAVE_RTSCTS, }; @@ -270,7 +264,6 @@ static struct regulator_init_data gpo_init = { static struct regulator_consumer_supply vmmc1_consumers[] = { REGULATOR_SUPPLY("vcore", "spi0.0"), - REGULATOR_SUPPLY("cmos_2v8", "soc-camera-pdrv.0"), }; static struct regulator_init_data vmmc1_init = { @@ -299,22 +292,6 @@ static struct regulator_init_data vgen_init = { .consumer_supplies = vgen_consumers, }; -static struct regulator_consumer_supply vvib_consumers[] = { - REGULATOR_SUPPLY("cmos_vcore", "soc-camera-pdrv.0"), -}; - -static struct regulator_init_data vvib_init = { - .constraints = { - .min_uV = 1300000, - .max_uV = 1300000, - .apply_uV = 1, - .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | - REGULATOR_CHANGE_STATUS, - }, - .num_consumer_supplies = ARRAY_SIZE(vvib_consumers), - .consumer_supplies = vvib_consumers, -}; - static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = { { .id = MC13783_REG_VMMC1, @@ -328,9 +305,6 @@ static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = { }, { .id = MC13783_REG_GPO3, /* Turn on 3.3V */ .init_data = &gpo_init, - }, { - .id = MC13783_REG_VVIB, /* Power OV2640 */ - .init_data = &vvib_init, }, }; @@ -370,51 +344,6 @@ static const struct spi_imx_master spi2_pdata __initconst = { .num_chipselect = ARRAY_SIZE(spi2_chipselect), }; -static int mx27_3ds_camera_power(struct device *dev, int on) -{ - /* enable or disable the camera */ - pr_debug("%s: %s the camera\n", __func__, on ? "ENABLE" : "DISABLE"); - gpio_set_value(CSI_PWRDWN, on ? 0 : 1); - - if (!on) - goto out; - - /* If enabled, give a reset impulse */ - gpio_set_value(CSI_RESET, 0); - msleep(20); - gpio_set_value(CSI_RESET, 1); - msleep(100); - -out: - return 0; -} - -static struct i2c_board_info mx27_3ds_i2c_camera = { - I2C_BOARD_INFO("ov2640", 0x30), -}; - -static struct regulator_bulk_data mx27_3ds_camera_regs[] = { - { .supply = "cmos_vcore" }, - { .supply = "cmos_2v8" }, -}; - -static struct soc_camera_link iclink_ov2640 = { - .bus_id = 0, - .board_info = &mx27_3ds_i2c_camera, - .i2c_adapter_id = 0, - .power = mx27_3ds_camera_power, - .regulators = mx27_3ds_camera_regs, - .num_regulators = ARRAY_SIZE(mx27_3ds_camera_regs), -}; - -static struct platform_device mx27_3ds_ov2640 = { - .name = "soc-camera-pdrv", - .id = 0, - .dev = { - .platform_data = &iclink_ov2640, - }, -}; - static struct imx_fb_videomode mx27_3ds_modes[] = { { /* 480x640 @ 60 Hz */ .mode = { @@ -471,14 +400,6 @@ static struct spi_board_info mx27_3ds_spi_devs[] __initdata = { }, }; -static struct platform_device *devices[] __initdata = { - &mx27_3ds_ov2640, -}; - -static const struct mx2_camera_platform_data mx27_3ds_cam_pdata __initconst = { - .clk = 26000000, -}; - static const struct imxi2c_platform_data mx27_3ds_i2c0_data __initconst = { .bitrate = 100000, }; @@ -498,7 +419,6 @@ static void __init mx27pdk_init(void) imx27_add_spi_imx0(&spi1_pdata); imx27_add_imx_i2c(0, &mx27_3ds_i2c0_data); - platform_add_devices(devices, ARRAY_SIZE(devices)); imx27_add_imx_fb(&mx27_3ds_fb_data); imx27_add_imx_ssi(0, &mx27_3ds_ssi_pdata); @@ -506,8 +426,6 @@ static void __init mx27pdk_init(void) static void __init mx27pdk_late_init(void) { - int ret; - mx27_3ds_sdhc1_enable_level_translator(); imx27_add_mxc_mmc(0, &sdhc1_pdata); @@ -531,14 +449,6 @@ static void __init mx27pdk_late_init(void) if (mxc_expio_init(MX27_CS5_BASE_ADDR, IMX_GPIO_NR(3, 28))) pr_warn("Init of the debugboard failed, all devices on the debugboard are unusable.\n"); - ret = gpio_request_array(mx27_3ds_camera_gpios, - ARRAY_SIZE(mx27_3ds_camera_gpios)); - if (ret) { - pr_err("Failed to request camera gpios"); - iclink_ov2640.power = NULL; - } - - imx27_add_mx2_camera(&mx27_3ds_cam_pdata); imx_add_platform_device("imx_mc13783", 0, NULL, 0, NULL, 0); }