From patchwork Thu Aug 4 13:38:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 9263677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 07B3C6048F for ; Thu, 4 Aug 2016 13:42:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECC1328406 for ; Thu, 4 Aug 2016 13:42:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E12E128409; Thu, 4 Aug 2016 13:42:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6A3DD28406 for ; Thu, 4 Aug 2016 13:42:23 +0000 (UTC) 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 1bVItV-0007D5-DF; Thu, 04 Aug 2016 13:41:05 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bVIsD-0005ak-Iy for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2016 13:39:46 +0000 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OBE013KD0GKDQE0@mailout3.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 04 Aug 2016 22:39:32 +0900 (KST) X-AuditID: cbfee61a-f78ff6d000001462-87-57a345946648 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 67.E8.05218.49543A75; Thu, 4 Aug 2016 22:39:32 +0900 (KST) Received: from AMDC1344.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OBE000Y20L4R530@mmp1.samsung.com>; Thu, 04 Aug 2016 22:39:32 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Subject: [PATCH 5/8] ASoC: s3c24xx_uda134x: Drop initialization of codec's platform data Date: Thu, 04 Aug 2016 15:38:45 +0200 Message-id: <1470317928-25365-6-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1470317928-25365-1-git-send-email-s.nawrocki@samsung.com> References: <1470317928-25365-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprCLMWRmVeSWpSXmKPExsVy+t9jAd0provDDZb957G4cvEQk8XGGetZ LaY+fMJmcf78BnaLTY+vsVrMOL+PyeLwm3ZWB3aPDZ+b2Dw2repk89i8pN6jb8sqRo/Pm+QC WKO4bFJSczLLUov07RK4Mn4fX8hacFy64ueJnewNjN/Euhg5OSQETCSe3p7AAmGLSVy4t56t i5GLQ0hgKaPEk1crWCGcX4wSv6c/YAOpYhMwlOg92scIYosAddye08kMYjMLHGGU2LuWHcQW FoiSuDSziwnEZhFQlVh2FyTOwcEr4CZx5mkOxDI5iZPHJrOChDkF3CVebPEACQsBVXx9dYx1 AiPvAkaGVYwSqQXJBcVJ6bmGeanlesWJucWleel6yfm5mxjBYfVMagfjwV3uhxgFOBiVeHgv mC4KF2JNLCuuzD3EKMHBrCTC+9tpcbgQb0piZVVqUX58UWlOavEhRmkOFiVx3sf/14UJCaQn lqRmp6YWpBbBZJk4OKUaGN1F/Xjryh+dClcrqHFyv+FfeuT2td7rFc9Wiaq6mft3ifdZcl+8 FBD4V0age8+xk1c/nn678cNEJs6E4ke1e5x1mkqSuZe8/8M/070gUyZcIEbVIskw2Mlizuv2 gsVTDtgdvnTx+yXln+VHLkyqj3+96dYm65NcboynI07uUGY+JbVYv7vxmRJLcUaioRZzUXEi AOxWMVQnAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160804_063945_818203_CFEDF331 X-CRM114-Status: GOOD ( 11.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com, krzk@kernel.org, Sylwester Nawrocki , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP It's already taken care by the codec and its platform_data defined in the arch/arm/mach-s3c24xx/mach-mini2440.c board file. Signed-off-by: Sylwester Nawrocki --- sound/soc/samsung/s3c24xx_uda134x.c | 71 +------------------------------------ 1 file changed, 1 insertion(+), 70 deletions(-) diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c index c145eb2..794e30d 100644 --- a/sound/soc/samsung/s3c24xx_uda134x.c +++ b/sound/soc/samsung/s3c24xx_uda134x.c @@ -227,78 +227,12 @@ static struct snd_soc_card snd_soc_s3c24xx_uda134x = { .num_links = 1, }; -static struct s3c24xx_uda134x_platform_data *s3c24xx_uda134x_l3_pins; - -static void setdat(int v) -{ - gpio_set_value(s3c24xx_uda134x_l3_pins->l3_data, v > 0); -} - -static void setclk(int v) -{ - gpio_set_value(s3c24xx_uda134x_l3_pins->l3_clk, v > 0); -} - -static void setmode(int v) -{ - gpio_set_value(s3c24xx_uda134x_l3_pins->l3_mode, v > 0); -} - -/* FIXME - This must be codec platform data but in which board file ?? */ -static struct uda134x_platform_data s3c24xx_uda134x = { - .l3 = { - .setdat = setdat, - .setclk = setclk, - .setmode = setmode, - .data_hold = 1, - .data_setup = 1, - .clock_high = 1, - .mode_hold = 1, - .mode = 1, - .mode_setup = 1, - }, -}; - -static int s3c24xx_uda134x_setup_pin(int pin, char *fun) -{ - if (gpio_request(pin, "s3c24xx_uda134x") < 0) { - printk(KERN_ERR "S3C24XX_UDA134X SoC Audio: " - "l3 %s pin already in use", fun); - return -EBUSY; - } - gpio_direction_output(pin, 0); - return 0; -} - static int s3c24xx_uda134x_probe(struct platform_device *pdev) { int ret; printk(KERN_INFO "S3C24XX_UDA134X SoC Audio driver\n"); - s3c24xx_uda134x_l3_pins = pdev->dev.platform_data; - if (s3c24xx_uda134x_l3_pins == NULL) { - printk(KERN_ERR "S3C24XX_UDA134X SoC Audio: " - "unable to find platform data\n"); - return -ENODEV; - } - s3c24xx_uda134x.model = s3c24xx_uda134x_l3_pins->model; - - if (s3c24xx_uda134x_setup_pin(s3c24xx_uda134x_l3_pins->l3_data, - "data") < 0) - return -EBUSY; - if (s3c24xx_uda134x_setup_pin(s3c24xx_uda134x_l3_pins->l3_clk, - "clk") < 0) { - gpio_free(s3c24xx_uda134x_l3_pins->l3_data); - return -EBUSY; - } - if (s3c24xx_uda134x_setup_pin(s3c24xx_uda134x_l3_pins->l3_mode, - "mode") < 0) { - gpio_free(s3c24xx_uda134x_l3_pins->l3_data); - gpio_free(s3c24xx_uda134x_l3_pins->l3_clk); - return -EBUSY; - } - s3c24xx_uda134x_snd_device = platform_device_alloc("soc-audio", -1); if (!s3c24xx_uda134x_snd_device) { printk(KERN_ERR "S3C24XX_UDA134X SoC Audio: " @@ -308,7 +242,7 @@ static int s3c24xx_uda134x_probe(struct platform_device *pdev) platform_set_drvdata(s3c24xx_uda134x_snd_device, &snd_soc_s3c24xx_uda134x); - platform_device_add_data(s3c24xx_uda134x_snd_device, &s3c24xx_uda134x, sizeof(s3c24xx_uda134x)); + ret = platform_device_add(s3c24xx_uda134x_snd_device); if (ret) { printk(KERN_ERR "S3C24XX_UDA134X SoC Audio: Unable to add\n"); @@ -321,9 +255,6 @@ static int s3c24xx_uda134x_probe(struct platform_device *pdev) static int s3c24xx_uda134x_remove(struct platform_device *pdev) { platform_device_unregister(s3c24xx_uda134x_snd_device); - gpio_free(s3c24xx_uda134x_l3_pins->l3_data); - gpio_free(s3c24xx_uda134x_l3_pins->l3_clk); - gpio_free(s3c24xx_uda134x_l3_pins->l3_mode); return 0; }