All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V7 0/4] soc: imx: add i.MX BLK-CTL support
@ 2021-06-12 13:31 ` Peng Fan (OSS)
  0 siblings, 0 replies; 39+ messages in thread
From: Peng Fan (OSS) @ 2021-06-12 13:31 UTC (permalink / raw)
  To: robh+dt, shawnguo, s.hauer
  Cc: kernel, festevam, linux-imx, p.zabel, l.stach, krzk, agx, marex,
	andrew.smirnov, devicetree, linux-arm-kernel, linux-kernel,
	ping.bai, frieder.schrempf, aford173, abel.vesa, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

V7:
 patch 2: update patch title per Shawn 
 Patch 3: Addressed several comments from Shawn

V6:
 Thanks for Adam's report on V5.
 Resolve the error message dump, it is the child device reuse
 the parent device node and matches the parent driver.
 Filled the remove function for child device.
 A diff dts file for upstream:
 https://gist.github.com/MrVan/d73888d8273c43ea4a3b28fa668ca1d0

V5:
 Rework the blk-ctl driver to let sub-PGC use blk-ctl as parent power
 domain to fix the potential handshake issue.
 I still keep R-b/A-b tag for Patch 1,2,4, since very minor changes
 I only drop R-b tag for Patch 3, since it has big change.
 An example, the pgc_mipi not take pgc_dispmix as parent:

	pgc_dispmix: power-domain@10 {
		#power-domain-cells = <0>;
		reg = <IMX8MM_POWER_DOMAIN_DISPMIX>;
		clocks = <&clk IMX8MM_CLK_DISP_ROOT>,
			 <&clk IMX8MM_CLK_DISP_AXI_ROOT>,
			 <&clk IMX8MM_CLK_DISP_APB_ROOT>;
	};

	pgc_mipi: power-domain@11 {
		#power-domain-cells = <0>;
		reg = <IMX8MM_POWER_DOMAIN_MIPI>;
		power-domains = <&dispmix_blk_ctl IMX8MM_BLK_CTL_PD_DISPMIX_BUS>;
	};

	dispmix_blk_ctl: clock-controller@32e28000 {
		compatible = "fsl,imx8mm-dispmix-blk-ctl", "syscon";
		reg = <0x32e28000 0x100>;
		#power-domain-cells = <1>;
		power-domains = <&pgc_dispmix>, <&pgc_mipi>;
		power-domain-names = "dispmix", "mipi";
		clocks = <&clk IMX8MM_CLK_DISP_ROOT>, <&clk IMX8MM_CLK_DISP_AXI_ROOT>,
			 <&clk IMX8MM_CLK_DISP_APB_ROOT>;
	};

V4:
 Add R-b tag
 Typo fix
 Update the power domain macro names Per Abel and Frieder

V3:
 Add explaination for not listing items in patch 2 commit log Per Rob.
 Addressed comments from Lucas and Frieder on patch [3,4].
 A few comments from Jacky was ignored, because following gpcv2
 coding style.

V2:
 Fix yaml check failure.

Previously there is an effort from Abel that take BLK-CTL as clock
provider, but it turns out that there is A/B lock issue and we are
not able resolve that.

Per discuss with Lucas and Jacky, we made an agreement that take BLK-CTL
as a power domain provider and use GPC's domain as parent, the consumer
node take BLK-CTL as power domain input.

This patchset has been tested on i.MX8MM EVK board, but one hack
is not included in the patchset is that the DISPMIX BLK-CTL
MIPI_M/S_RESET not implemented. Per Lucas, we will finally have a MIPI
DPHY driver, so fine to leave it.

Thanks for Lucas's suggestion, Frieder Schrempf for collecting
all the patches, Abel's previous BLK-CTL work, Jacky Bai on help
debug issues.


Peng Fan (4):
  dt-bindings: power: Add defines for i.MX8MM BLK-CTL power domains
  dt-bindings: soc: imx: Add bindings for i.MX BLK_CTL
  soc: imx: Add generic blk-ctl driver
  soc: imx: Add blk-ctl driver for i.MX8MM

 .../bindings/soc/imx/fsl,imx-blk-ctl.yaml     |  66 ++++
 drivers/soc/imx/Makefile                      |   2 +-
 drivers/soc/imx/blk-ctl-imx8mm.c              | 139 ++++++++
 drivers/soc/imx/blk-ctl.c                     | 325 ++++++++++++++++++
 drivers/soc/imx/blk-ctl.h                     |  85 +++++
 include/dt-bindings/power/imx8mm-power.h      |  13 +
 6 files changed, 629 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/soc/imx/fsl,imx-blk-ctl.yaml
 create mode 100644 drivers/soc/imx/blk-ctl-imx8mm.c
 create mode 100644 drivers/soc/imx/blk-ctl.c
 create mode 100644 drivers/soc/imx/blk-ctl.h

-- 
2.30.0


^ permalink raw reply	[flat|nested] 39+ messages in thread
* Re: [PATCH V7 3/4] soc: imx: Add generic blk-ctl driver
  2021-06-12 13:31   ` Peng Fan (OSS)
@ 2021-06-28  8:50 ` Dan Carpenter
  -1 siblings, 0 replies; 39+ messages in thread
From: kernel test robot @ 2021-06-26  8:07 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 14521 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210612133134.2738-4-peng.fan@oss.nxp.com>
References: <20210612133134.2738-4-peng.fan@oss.nxp.com>
TO: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
TO: robh+dt(a)kernel.org
TO: shawnguo(a)kernel.org
TO: s.hauer(a)pengutronix.de
CC: kernel(a)pengutronix.de
CC: festevam(a)gmail.com
CC: linux-imx(a)nxp.com
CC: p.zabel(a)pengutronix.de
CC: l.stach(a)pengutronix.de
CC: krzk(a)kernel.org
CC: agx(a)sigxcpu.org

Hi "Peng,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on shawnguo/for-next]
[also build test WARNING on next-20210625]
[cannot apply to robh/for-next pza/reset/next v5.13-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Peng-Fan-OSS/soc-imx-add-i-MX-BLK-CTL-support/20210617-013814
base:   https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git for-next
:::::: branch date: 10 days ago
:::::: commit date: 10 days ago
config: i386-randconfig-m031-20210625 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/soc/imx/blk-ctl.c:151 imx_blk_ctl_probe() warn: passing zero to 'PTR_ERR'
drivers/soc/imx/blk-ctl.c:188 imx_blk_ctl_remove() error: potentially dereferencing uninitialized 'active_pd'.
drivers/soc/imx/blk-ctl.c:318 imx_blk_ctl_register() error: uninitialized symbol 'ret'.

vim +/PTR_ERR +151 drivers/soc/imx/blk-ctl.c

4fd3f78814fbf8 Peng Fan 2021-06-12  136  
4fd3f78814fbf8 Peng Fan 2021-06-12  137  static int imx_blk_ctl_probe(struct platform_device *pdev)
4fd3f78814fbf8 Peng Fan 2021-06-12  138  {
4fd3f78814fbf8 Peng Fan 2021-06-12  139  	struct imx_blk_ctl_domain *domain = pdev->dev.platform_data;
4fd3f78814fbf8 Peng Fan 2021-06-12  140  	struct imx_blk_ctl *blk_ctl = domain->blk_ctl;
4fd3f78814fbf8 Peng Fan 2021-06-12  141  	struct generic_pm_domain *parent_genpd;
4fd3f78814fbf8 Peng Fan 2021-06-12  142  	struct device *dev = &pdev->dev;
4fd3f78814fbf8 Peng Fan 2021-06-12  143  	struct device *active_pd;
4fd3f78814fbf8 Peng Fan 2021-06-12  144  	int ret;
4fd3f78814fbf8 Peng Fan 2021-06-12  145  
4fd3f78814fbf8 Peng Fan 2021-06-12  146  	pdev->dev.of_node = blk_ctl->dev->of_node;
4fd3f78814fbf8 Peng Fan 2021-06-12  147  
4fd3f78814fbf8 Peng Fan 2021-06-12  148  	if (domain->hw->active_pd_name) {
4fd3f78814fbf8 Peng Fan 2021-06-12  149  		active_pd = dev_pm_domain_attach_by_name(dev, domain->hw->active_pd_name);
4fd3f78814fbf8 Peng Fan 2021-06-12  150  		if (IS_ERR_OR_NULL(active_pd)) {
4fd3f78814fbf8 Peng Fan 2021-06-12 @151  			ret = PTR_ERR(active_pd) ? : -ENODATA;
4fd3f78814fbf8 Peng Fan 2021-06-12  152  			pdev->dev.of_node = NULL;
4fd3f78814fbf8 Peng Fan 2021-06-12  153  			return ret;
4fd3f78814fbf8 Peng Fan 2021-06-12  154  		}
4fd3f78814fbf8 Peng Fan 2021-06-12  155  
4fd3f78814fbf8 Peng Fan 2021-06-12  156  		domain->active_pd = active_pd;
4fd3f78814fbf8 Peng Fan 2021-06-12  157  	} else {
4fd3f78814fbf8 Peng Fan 2021-06-12  158  		if (!blk_ctl->bus_domain) {
4fd3f78814fbf8 Peng Fan 2021-06-12  159  			pdev->dev.of_node = NULL;
4fd3f78814fbf8 Peng Fan 2021-06-12  160  			return -EPROBE_DEFER;
4fd3f78814fbf8 Peng Fan 2021-06-12  161  		}
4fd3f78814fbf8 Peng Fan 2021-06-12  162  	}
4fd3f78814fbf8 Peng Fan 2021-06-12  163  
4fd3f78814fbf8 Peng Fan 2021-06-12  164  	if (domain->hw->active_pd_name)
4fd3f78814fbf8 Peng Fan 2021-06-12  165  		parent_genpd = pd_to_genpd(active_pd->pm_domain);
4fd3f78814fbf8 Peng Fan 2021-06-12  166  	else
4fd3f78814fbf8 Peng Fan 2021-06-12  167  		parent_genpd = blk_ctl->bus_domain;
4fd3f78814fbf8 Peng Fan 2021-06-12  168  
4fd3f78814fbf8 Peng Fan 2021-06-12  169  	if (pm_genpd_add_subdomain(parent_genpd, &domain->genpd)) {
4fd3f78814fbf8 Peng Fan 2021-06-12  170  		dev_warn(dev, "failed to add subdomain: %s\n", domain->genpd.name);
4fd3f78814fbf8 Peng Fan 2021-06-12  171  	} else {
4fd3f78814fbf8 Peng Fan 2021-06-12  172  		mutex_lock(&blk_ctl->lock);
4fd3f78814fbf8 Peng Fan 2021-06-12  173  		domain->hooked = true;
4fd3f78814fbf8 Peng Fan 2021-06-12  174  		mutex_unlock(&blk_ctl->lock);
4fd3f78814fbf8 Peng Fan 2021-06-12  175  	}
4fd3f78814fbf8 Peng Fan 2021-06-12  176  
4fd3f78814fbf8 Peng Fan 2021-06-12  177  	return 0;
4fd3f78814fbf8 Peng Fan 2021-06-12  178  }
4fd3f78814fbf8 Peng Fan 2021-06-12  179  
4fd3f78814fbf8 Peng Fan 2021-06-12  180  static int imx_blk_ctl_remove(struct platform_device *pdev)
4fd3f78814fbf8 Peng Fan 2021-06-12  181  {
4fd3f78814fbf8 Peng Fan 2021-06-12  182  	struct imx_blk_ctl_domain *domain = pdev->dev.platform_data;
4fd3f78814fbf8 Peng Fan 2021-06-12  183  	struct imx_blk_ctl *blk_ctl = domain->blk_ctl;
4fd3f78814fbf8 Peng Fan 2021-06-12  184  	struct generic_pm_domain *parent_genpd;
4fd3f78814fbf8 Peng Fan 2021-06-12  185  	struct device *active_pd;
4fd3f78814fbf8 Peng Fan 2021-06-12  186  
4fd3f78814fbf8 Peng Fan 2021-06-12  187  	if (domain->hw->active_pd_name)
4fd3f78814fbf8 Peng Fan 2021-06-12 @188  		parent_genpd = pd_to_genpd(active_pd->pm_domain);
4fd3f78814fbf8 Peng Fan 2021-06-12  189  	else
4fd3f78814fbf8 Peng Fan 2021-06-12  190  		parent_genpd = blk_ctl->bus_domain;
4fd3f78814fbf8 Peng Fan 2021-06-12  191  
4fd3f78814fbf8 Peng Fan 2021-06-12  192  	pm_genpd_remove_subdomain(parent_genpd, &domain->genpd);
4fd3f78814fbf8 Peng Fan 2021-06-12  193  
4fd3f78814fbf8 Peng Fan 2021-06-12  194  	mutex_lock(&blk_ctl->lock);
4fd3f78814fbf8 Peng Fan 2021-06-12  195  	domain->hooked = false;
4fd3f78814fbf8 Peng Fan 2021-06-12  196  	mutex_unlock(&blk_ctl->lock);
4fd3f78814fbf8 Peng Fan 2021-06-12  197  
4fd3f78814fbf8 Peng Fan 2021-06-12  198  	if (domain->hw->active_pd_name)
4fd3f78814fbf8 Peng Fan 2021-06-12  199  		dev_pm_domain_detach(domain->active_pd, false);
4fd3f78814fbf8 Peng Fan 2021-06-12  200  
4fd3f78814fbf8 Peng Fan 2021-06-12  201  	return 0;
4fd3f78814fbf8 Peng Fan 2021-06-12  202  }
4fd3f78814fbf8 Peng Fan 2021-06-12  203  
4fd3f78814fbf8 Peng Fan 2021-06-12  204  static const struct platform_device_id imx_blk_ctl_id[] = {
4fd3f78814fbf8 Peng Fan 2021-06-12  205  	{ "imx-vpumix-blk-ctl", },
4fd3f78814fbf8 Peng Fan 2021-06-12  206  	{ "imx-dispmix-blk-ctl", },
4fd3f78814fbf8 Peng Fan 2021-06-12  207  	{ },
4fd3f78814fbf8 Peng Fan 2021-06-12  208  };
4fd3f78814fbf8 Peng Fan 2021-06-12  209  
4fd3f78814fbf8 Peng Fan 2021-06-12  210  static struct platform_driver imx_blk_ctl_driver = {
4fd3f78814fbf8 Peng Fan 2021-06-12  211  	.driver = {
4fd3f78814fbf8 Peng Fan 2021-06-12  212  		.name = "imx-blk-ctl",
4fd3f78814fbf8 Peng Fan 2021-06-12  213  	},
4fd3f78814fbf8 Peng Fan 2021-06-12  214  	.probe    = imx_blk_ctl_probe,
4fd3f78814fbf8 Peng Fan 2021-06-12  215  	.remove   = imx_blk_ctl_remove,
4fd3f78814fbf8 Peng Fan 2021-06-12  216  	.id_table = imx_blk_ctl_id,
4fd3f78814fbf8 Peng Fan 2021-06-12  217  };
4fd3f78814fbf8 Peng Fan 2021-06-12  218  builtin_platform_driver(imx_blk_ctl_driver)
4fd3f78814fbf8 Peng Fan 2021-06-12  219  
4fd3f78814fbf8 Peng Fan 2021-06-12  220  static struct generic_pm_domain *imx_blk_ctl_genpd_xlate(struct of_phandle_args *genpdspec,
4fd3f78814fbf8 Peng Fan 2021-06-12  221  							 void *data)
4fd3f78814fbf8 Peng Fan 2021-06-12  222  {
4fd3f78814fbf8 Peng Fan 2021-06-12  223  	struct genpd_onecell_data *genpd_data = data;
4fd3f78814fbf8 Peng Fan 2021-06-12  224  	unsigned int idx = genpdspec->args[0];
4fd3f78814fbf8 Peng Fan 2021-06-12  225  	struct imx_blk_ctl_domain *domain;
4fd3f78814fbf8 Peng Fan 2021-06-12  226  	struct generic_pm_domain *genpd = ERR_PTR(-EPROBE_DEFER);
4fd3f78814fbf8 Peng Fan 2021-06-12  227  
4fd3f78814fbf8 Peng Fan 2021-06-12  228  	if (genpdspec->args_count != 1)
4fd3f78814fbf8 Peng Fan 2021-06-12  229  		return ERR_PTR(-EINVAL);
4fd3f78814fbf8 Peng Fan 2021-06-12  230  
4fd3f78814fbf8 Peng Fan 2021-06-12  231  	if (idx >= genpd_data->num_domains)
4fd3f78814fbf8 Peng Fan 2021-06-12  232  		return ERR_PTR(-EINVAL);
4fd3f78814fbf8 Peng Fan 2021-06-12  233  
4fd3f78814fbf8 Peng Fan 2021-06-12  234  	if (!genpd_data->domains[idx])
4fd3f78814fbf8 Peng Fan 2021-06-12  235  		return ERR_PTR(-ENOENT);
4fd3f78814fbf8 Peng Fan 2021-06-12  236  
4fd3f78814fbf8 Peng Fan 2021-06-12  237  	domain = to_imx_blk_ctl_pd(genpd_data->domains[idx]);
4fd3f78814fbf8 Peng Fan 2021-06-12  238  
4fd3f78814fbf8 Peng Fan 2021-06-12  239  	mutex_lock(&domain->blk_ctl->lock);
4fd3f78814fbf8 Peng Fan 2021-06-12  240  	if (domain->hooked)
4fd3f78814fbf8 Peng Fan 2021-06-12  241  		genpd = genpd_data->domains[idx];
4fd3f78814fbf8 Peng Fan 2021-06-12  242  	mutex_unlock(&domain->blk_ctl->lock);
4fd3f78814fbf8 Peng Fan 2021-06-12  243  
4fd3f78814fbf8 Peng Fan 2021-06-12  244  	return genpd;
4fd3f78814fbf8 Peng Fan 2021-06-12  245  }
4fd3f78814fbf8 Peng Fan 2021-06-12  246  
4fd3f78814fbf8 Peng Fan 2021-06-12  247  int imx_blk_ctl_register(struct device *dev)
4fd3f78814fbf8 Peng Fan 2021-06-12  248  {
4fd3f78814fbf8 Peng Fan 2021-06-12  249  	struct imx_blk_ctl *blk_ctl = dev_get_drvdata(dev);
4fd3f78814fbf8 Peng Fan 2021-06-12  250  	const struct imx_blk_ctl_dev_data *dev_data = blk_ctl->dev_data;
4fd3f78814fbf8 Peng Fan 2021-06-12  251  	int num = dev_data->pds_num;
4fd3f78814fbf8 Peng Fan 2021-06-12  252  	struct imx_blk_ctl_domain *domain;
4fd3f78814fbf8 Peng Fan 2021-06-12  253  	struct generic_pm_domain *genpd;
4fd3f78814fbf8 Peng Fan 2021-06-12  254  	struct platform_device *pd_pdev;
4fd3f78814fbf8 Peng Fan 2021-06-12  255  	int domain_index;
4fd3f78814fbf8 Peng Fan 2021-06-12  256  	int i, ret;
4fd3f78814fbf8 Peng Fan 2021-06-12  257  
4fd3f78814fbf8 Peng Fan 2021-06-12  258  	blk_ctl->onecell_data.num_domains = num;
4fd3f78814fbf8 Peng Fan 2021-06-12  259  	blk_ctl->onecell_data.xlate = imx_blk_ctl_genpd_xlate;
4fd3f78814fbf8 Peng Fan 2021-06-12  260  	blk_ctl->onecell_data.domains = devm_kcalloc(dev, num, sizeof(struct generic_pm_domain *),
4fd3f78814fbf8 Peng Fan 2021-06-12  261  						     GFP_KERNEL);
4fd3f78814fbf8 Peng Fan 2021-06-12  262  	if (!blk_ctl->onecell_data.domains)
4fd3f78814fbf8 Peng Fan 2021-06-12  263  		return -ENOMEM;
4fd3f78814fbf8 Peng Fan 2021-06-12  264  
4fd3f78814fbf8 Peng Fan 2021-06-12  265  	for (i = 0; i < num; i++) {
4fd3f78814fbf8 Peng Fan 2021-06-12  266  		domain_index = dev_data->pds[i].id;
4fd3f78814fbf8 Peng Fan 2021-06-12  267  		if (domain_index >= num) {
4fd3f78814fbf8 Peng Fan 2021-06-12  268  			dev_warn(dev, "Domain index %d is out of bounds\n", domain_index);
4fd3f78814fbf8 Peng Fan 2021-06-12  269  			continue;
4fd3f78814fbf8 Peng Fan 2021-06-12  270  		}
4fd3f78814fbf8 Peng Fan 2021-06-12  271  
4fd3f78814fbf8 Peng Fan 2021-06-12  272  		domain = devm_kzalloc(dev, sizeof(struct imx_blk_ctl_domain), GFP_KERNEL);
4fd3f78814fbf8 Peng Fan 2021-06-12  273  		if (!domain)
4fd3f78814fbf8 Peng Fan 2021-06-12  274  			goto error;
4fd3f78814fbf8 Peng Fan 2021-06-12  275  
4fd3f78814fbf8 Peng Fan 2021-06-12  276  		pd_pdev = platform_device_alloc(dev_data->name, domain_index);
4fd3f78814fbf8 Peng Fan 2021-06-12  277  		if (!pd_pdev) {
4fd3f78814fbf8 Peng Fan 2021-06-12  278  			dev_err(dev, "Failed to allocate platform device\n");
4fd3f78814fbf8 Peng Fan 2021-06-12  279  			goto error;
4fd3f78814fbf8 Peng Fan 2021-06-12  280  		}
4fd3f78814fbf8 Peng Fan 2021-06-12  281  
4fd3f78814fbf8 Peng Fan 2021-06-12  282  		pd_pdev->dev.platform_data = domain;
4fd3f78814fbf8 Peng Fan 2021-06-12  283  
4fd3f78814fbf8 Peng Fan 2021-06-12  284  		domain->blk_ctl = blk_ctl;
4fd3f78814fbf8 Peng Fan 2021-06-12  285  		domain->hw = &dev_data->pds[i];
4fd3f78814fbf8 Peng Fan 2021-06-12  286  		domain->id = domain_index;
4fd3f78814fbf8 Peng Fan 2021-06-12  287  		domain->genpd.name = dev_data->pds[i].name;
4fd3f78814fbf8 Peng Fan 2021-06-12  288  		domain->genpd.power_off = imx_blk_ctl_power_off;
4fd3f78814fbf8 Peng Fan 2021-06-12  289  		domain->genpd.power_on = imx_blk_ctl_power_on;
4fd3f78814fbf8 Peng Fan 2021-06-12  290  		domain->dev = &pd_pdev->dev;
4fd3f78814fbf8 Peng Fan 2021-06-12  291  		domain->hooked = false;
4fd3f78814fbf8 Peng Fan 2021-06-12  292  
4fd3f78814fbf8 Peng Fan 2021-06-12  293  		ret = pm_genpd_init(&domain->genpd, NULL, true);
4fd3f78814fbf8 Peng Fan 2021-06-12  294  		pd_pdev->dev.parent = dev;
4fd3f78814fbf8 Peng Fan 2021-06-12  295  
4fd3f78814fbf8 Peng Fan 2021-06-12  296  		if (domain->hw->flags & IMX_BLK_CTL_PD_HANDSHAKE)
4fd3f78814fbf8 Peng Fan 2021-06-12  297  			blk_ctl->bus_domain = &domain->genpd;
4fd3f78814fbf8 Peng Fan 2021-06-12  298  
4fd3f78814fbf8 Peng Fan 2021-06-12  299  		ret = platform_device_add(pd_pdev);
4fd3f78814fbf8 Peng Fan 2021-06-12  300  		if (ret) {
4fd3f78814fbf8 Peng Fan 2021-06-12  301  			platform_device_put(pd_pdev);
4fd3f78814fbf8 Peng Fan 2021-06-12  302  			goto error;
4fd3f78814fbf8 Peng Fan 2021-06-12  303  		}
4fd3f78814fbf8 Peng Fan 2021-06-12  304  		blk_ctl->onecell_data.domains[i] = &domain->genpd;
4fd3f78814fbf8 Peng Fan 2021-06-12  305  	}
4fd3f78814fbf8 Peng Fan 2021-06-12  306  
4fd3f78814fbf8 Peng Fan 2021-06-12  307  	return of_genpd_add_provider_onecell(dev->of_node, &blk_ctl->onecell_data);
4fd3f78814fbf8 Peng Fan 2021-06-12  308  
4fd3f78814fbf8 Peng Fan 2021-06-12  309  error:
4fd3f78814fbf8 Peng Fan 2021-06-12  310  	for (; i >= 0; i--) {
4fd3f78814fbf8 Peng Fan 2021-06-12  311  		genpd = blk_ctl->onecell_data.domains[i];
4fd3f78814fbf8 Peng Fan 2021-06-12  312  		if (!genpd)
4fd3f78814fbf8 Peng Fan 2021-06-12  313  			continue;
4fd3f78814fbf8 Peng Fan 2021-06-12  314  		domain = to_imx_blk_ctl_pd(genpd);
4fd3f78814fbf8 Peng Fan 2021-06-12  315  		if (domain->dev)
4fd3f78814fbf8 Peng Fan 2021-06-12  316  			platform_device_put(to_platform_device(domain->dev));
4fd3f78814fbf8 Peng Fan 2021-06-12  317  	}
4fd3f78814fbf8 Peng Fan 2021-06-12 @318  	return ret;
4fd3f78814fbf8 Peng Fan 2021-06-12  319  }
4fd3f78814fbf8 Peng Fan 2021-06-12  320  EXPORT_SYMBOL_GPL(imx_blk_ctl_register);
4fd3f78814fbf8 Peng Fan 2021-06-12  321  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37606 bytes --]

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2021-06-28 11:20 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-12 13:31 [PATCH V7 0/4] soc: imx: add i.MX BLK-CTL support Peng Fan (OSS)
2021-06-12 13:31 ` Peng Fan (OSS)
2021-06-12 13:31 ` [PATCH V7 1/4] dt-bindings: power: Add defines for i.MX8MM BLK-CTL power domains Peng Fan (OSS)
2021-06-12 13:31   ` Peng Fan (OSS)
2021-06-12 13:31 ` [PATCH V7 2/4] dt-bindings: soc: imx: Add bindings for i.MX BLK_CTL Peng Fan (OSS)
2021-06-12 13:31   ` Peng Fan (OSS)
2021-06-12 13:31 ` [PATCH V7 3/4] soc: imx: Add generic blk-ctl driver Peng Fan (OSS)
2021-06-12 13:31   ` Peng Fan (OSS)
2021-06-14 19:43   ` Adam Ford
2021-06-14 19:43     ` Adam Ford
2021-06-17 10:09   ` Aisheng Dong
2021-06-17 10:09     ` Aisheng Dong
2021-06-12 13:31 ` [PATCH V7 4/4] soc: imx: Add blk-ctl driver for i.MX8MM Peng Fan (OSS)
2021-06-12 13:31   ` Peng Fan (OSS)
2021-06-14 18:07   ` Adam Ford
2021-06-14 18:07     ` Adam Ford
2021-06-14 19:29     ` Adam Ford
2021-06-14 19:29       ` Adam Ford
2021-06-15 11:05       ` Peng Fan (OSS)
2021-06-15 11:05         ` Peng Fan (OSS)
2021-06-16 10:34         ` Adam Ford
2021-06-16 10:34           ` Adam Ford
2021-06-16 10:58           ` Peng Fan (OSS)
2021-06-16 10:58             ` Peng Fan (OSS)
2021-06-17  3:14           ` Peng Fan (OSS)
2021-06-17  3:14             ` Peng Fan (OSS)
2021-06-17 12:25             ` Adam Ford
2021-06-17 12:25               ` Adam Ford
2021-06-17 12:33               ` Fabio Estevam
2021-06-17 12:33                 ` Fabio Estevam
2021-06-28 10:59     ` Marek Vasut
2021-06-28 10:59       ` Marek Vasut
2021-06-28 11:14       ` Peng Fan
2021-06-28 11:14         ` Peng Fan
2021-06-28 11:18         ` Marek Vasut
2021-06-28 11:18           ` Marek Vasut
2021-06-26  9:01   ` kernel test robot
2021-06-26  8:07 [PATCH V7 3/4] soc: imx: Add generic blk-ctl driver kernel test robot
2021-06-28  8:50 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.