inno_rk3036.c (c39f2d9db0fd81ea20bb5cce9b3f082ca63753e2) | inno_rk3036.c (2d1ffc7d0f58f6a39a34854e952f5020fc655af0) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Driver of Inno codec for rk3036 by Rockchip Inc. 4 * 5 * Author: Rockchip Inc. 6 * Author: Zheng ShunQian<zhengsq@rock-chips.com> 7 */ 8 --- 391 unchanged lines hidden (view full) --- 400 401#define GRF_SOC_CON0 0x00140 402#define GRF_ACODEC_SEL (BIT(10) | BIT(16 + 10)) 403 404static int rk3036_codec_platform_probe(struct platform_device *pdev) 405{ 406 struct rk3036_codec_priv *priv; 407 struct device_node *of_node = pdev->dev.of_node; | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Driver of Inno codec for rk3036 by Rockchip Inc. 4 * 5 * Author: Rockchip Inc. 6 * Author: Zheng ShunQian<zhengsq@rock-chips.com> 7 */ 8 --- 391 unchanged lines hidden (view full) --- 400 401#define GRF_SOC_CON0 0x00140 402#define GRF_ACODEC_SEL (BIT(10) | BIT(16 + 10)) 403 404static int rk3036_codec_platform_probe(struct platform_device *pdev) 405{ 406 struct rk3036_codec_priv *priv; 407 struct device_node *of_node = pdev->dev.of_node; |
408 struct resource *res; | |
409 void __iomem *base; 410 struct regmap *grf; 411 int ret; 412 413 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 414 if (!priv) 415 return -ENOMEM; 416 | 408 void __iomem *base; 409 struct regmap *grf; 410 int ret; 411 412 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 413 if (!priv) 414 return -ENOMEM; 415 |
417 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 418 base = devm_ioremap_resource(&pdev->dev, res); | 416 base = devm_platform_ioremap_resource(pdev, 0); |
419 if (IS_ERR(base)) 420 return PTR_ERR(base); 421 422 priv->base = base; 423 priv->regmap = devm_regmap_init_mmio(&pdev->dev, priv->base, 424 &rk3036_codec_regmap_config); 425 if (IS_ERR(priv->regmap)) { 426 dev_err(&pdev->dev, "init regmap failed\n"); --- 67 unchanged lines hidden --- | 417 if (IS_ERR(base)) 418 return PTR_ERR(base); 419 420 priv->base = base; 421 priv->regmap = devm_regmap_init_mmio(&pdev->dev, priv->base, 422 &rk3036_codec_regmap_config); 423 if (IS_ERR(priv->regmap)) { 424 dev_err(&pdev->dev, "init regmap failed\n"); --- 67 unchanged lines hidden --- |