apb                96 drivers/pci/controller/dwc/pci-meson.c 	struct reset_control *apb;
apb               136 drivers/pci/controller/dwc/pci-meson.c 	mrst->apb = meson_pcie_get_reset(mp, "apb", PCIE_SHARED_RESET);
apb               137 drivers/pci/controller/dwc/pci-meson.c 	if (IS_ERR(mrst->apb))
apb               138 drivers/pci/controller/dwc/pci-meson.c 		return PTR_ERR(mrst->apb);
apb               139 drivers/pci/controller/dwc/pci-meson.c 	reset_control_deassert(mrst->apb);
apb               206 drivers/pci/controller/dwc/pci-meson.c 	reset_control_assert(mrst->apb);
apb               209 drivers/pci/controller/dwc/pci-meson.c 	reset_control_deassert(mrst->apb);
apb               151 drivers/pci/controller/dwc/pcie-kirin.c 	struct resource *apb;
apb               155 drivers/pci/controller/dwc/pcie-kirin.c 	apb = platform_get_resource_byname(pdev, IORESOURCE_MEM, "apb");
apb               156 drivers/pci/controller/dwc/pcie-kirin.c 	kirin_pcie->apb_base = devm_ioremap_resource(dev, apb);
apb                69 drivers/staging/greybus/arche-apb-ctrl.c 	struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
apb                72 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->init_disabled ||
apb                73 drivers/staging/greybus/arche-apb-ctrl.c 	    apb->state == ARCHE_PLATFORM_STATE_ACTIVE)
apb                77 drivers/staging/greybus/arche-apb-ctrl.c 	assert_reset(apb->resetn);
apb                79 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING && apb->spi_en)
apb                80 drivers/staging/greybus/arche-apb-ctrl.c 		devm_gpiod_put(dev, apb->spi_en);
apb                83 drivers/staging/greybus/arche-apb-ctrl.c 	if (!IS_ERR(apb->vcore)) {
apb                84 drivers/staging/greybus/arche-apb-ctrl.c 		ret = regulator_enable(apb->vcore);
apb                91 drivers/staging/greybus/arche-apb-ctrl.c 	if (!IS_ERR(apb->vio)) {
apb                92 drivers/staging/greybus/arche-apb-ctrl.c 		ret = regulator_enable(apb->vio);
apb               102 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->clk_en)
apb               103 drivers/staging/greybus/arche-apb-ctrl.c 		gpiod_set_value(apb->clk_en, 1);
apb               108 drivers/staging/greybus/arche-apb-ctrl.c 	deassert_reset(apb->resetn);
apb               110 drivers/staging/greybus/arche-apb-ctrl.c 	apb->state = ARCHE_PLATFORM_STATE_ACTIVE;
apb               118 drivers/staging/greybus/arche-apb-ctrl.c 	struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
apb               121 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->init_disabled ||
apb               122 drivers/staging/greybus/arche-apb-ctrl.c 	    apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING)
apb               125 drivers/staging/greybus/arche-apb-ctrl.c 	ret = regulator_enable(apb->vcore);
apb               131 drivers/staging/greybus/arche-apb-ctrl.c 	ret = regulator_enable(apb->vio);
apb               137 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->spi_en) {
apb               140 drivers/staging/greybus/arche-apb-ctrl.c 		if (apb->spi_en_polarity_high)
apb               145 drivers/staging/greybus/arche-apb-ctrl.c 		apb->spi_en = devm_gpiod_get(dev, "spi-en", flags);
apb               146 drivers/staging/greybus/arche-apb-ctrl.c 		if (IS_ERR(apb->spi_en)) {
apb               147 drivers/staging/greybus/arche-apb-ctrl.c 			ret = PTR_ERR(apb->spi_en);
apb               155 drivers/staging/greybus/arche-apb-ctrl.c 	assert_reset(apb->resetn);
apb               156 drivers/staging/greybus/arche-apb-ctrl.c 	apb->state = ARCHE_PLATFORM_STATE_FW_FLASHING;
apb               164 drivers/staging/greybus/arche-apb-ctrl.c 	struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
apb               166 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->init_disabled)
apb               173 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->state == ARCHE_PLATFORM_STATE_STANDBY ||
apb               174 drivers/staging/greybus/arche-apb-ctrl.c 	    apb->state == ARCHE_PLATFORM_STATE_OFF)
apb               177 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING && apb->spi_en)
apb               178 drivers/staging/greybus/arche-apb-ctrl.c 		devm_gpiod_put(dev, apb->spi_en);
apb               189 drivers/staging/greybus/arche-apb-ctrl.c 	apb->state = ARCHE_PLATFORM_STATE_STANDBY;
apb               196 drivers/staging/greybus/arche-apb-ctrl.c 	struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
apb               198 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->init_disabled || apb->state == ARCHE_PLATFORM_STATE_OFF)
apb               201 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING && apb->spi_en)
apb               202 drivers/staging/greybus/arche-apb-ctrl.c 		devm_gpiod_put(dev, apb->spi_en);
apb               205 drivers/staging/greybus/arche-apb-ctrl.c 	if (apb->clk_en)
apb               206 drivers/staging/greybus/arche-apb-ctrl.c 		gpiod_set_value(apb->clk_en, 0);
apb               208 drivers/staging/greybus/arche-apb-ctrl.c 	if (!IS_ERR(apb->vcore) && regulator_is_enabled(apb->vcore) > 0)
apb               209 drivers/staging/greybus/arche-apb-ctrl.c 		regulator_disable(apb->vcore);
apb               211 drivers/staging/greybus/arche-apb-ctrl.c 	if (!IS_ERR(apb->vio) && regulator_is_enabled(apb->vio) > 0)
apb               212 drivers/staging/greybus/arche-apb-ctrl.c 		regulator_disable(apb->vio);
apb               215 drivers/staging/greybus/arche-apb-ctrl.c 	assert_reset(apb->resetn);
apb               216 drivers/staging/greybus/arche-apb-ctrl.c 	apb->state = ARCHE_PLATFORM_STATE_OFF;
apb               223 drivers/staging/greybus/arche-apb-ctrl.c 	struct arche_apb_ctrl_drvdata *apb = dev_get_drvdata(dev);
apb               225 drivers/staging/greybus/arche-apb-ctrl.c 	gpiod_set_value(apb->boot_ret, 0);
apb               253 drivers/staging/greybus/arche-apb-ctrl.c 	struct arche_apb_ctrl_drvdata *apb = platform_get_drvdata(pdev);
apb               258 drivers/staging/greybus/arche-apb-ctrl.c 		if (apb->state == ARCHE_PLATFORM_STATE_OFF)
apb               263 drivers/staging/greybus/arche-apb-ctrl.c 		if (apb->state == ARCHE_PLATFORM_STATE_ACTIVE)
apb               267 drivers/staging/greybus/arche-apb-ctrl.c 		is_disabled = apb->init_disabled;
apb               268 drivers/staging/greybus/arche-apb-ctrl.c 		apb->init_disabled = false;
apb               271 drivers/staging/greybus/arche-apb-ctrl.c 			apb->init_disabled = is_disabled;
apb               273 drivers/staging/greybus/arche-apb-ctrl.c 		if (apb->state == ARCHE_PLATFORM_STATE_STANDBY)
apb               278 drivers/staging/greybus/arche-apb-ctrl.c 		if (apb->state == ARCHE_PLATFORM_STATE_FW_FLASHING)
apb               298 drivers/staging/greybus/arche-apb-ctrl.c 	struct arche_apb_ctrl_drvdata *apb = dev_get_drvdata(dev);
apb               300 drivers/staging/greybus/arche-apb-ctrl.c 	switch (apb->state) {
apb               303 drivers/staging/greybus/arche-apb-ctrl.c 				apb->init_disabled ? ",disabled" : "");
apb               318 drivers/staging/greybus/arche-apb-ctrl.c 				     struct arche_apb_ctrl_drvdata *apb)
apb               323 drivers/staging/greybus/arche-apb-ctrl.c 	apb->resetn = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
apb               324 drivers/staging/greybus/arche-apb-ctrl.c 	if (IS_ERR(apb->resetn)) {
apb               325 drivers/staging/greybus/arche-apb-ctrl.c 		ret = PTR_ERR(apb->resetn);
apb               330 drivers/staging/greybus/arche-apb-ctrl.c 	apb->boot_ret = devm_gpiod_get(dev, "boot-ret", GPIOD_OUT_LOW);
apb               331 drivers/staging/greybus/arche-apb-ctrl.c 	if (IS_ERR(apb->boot_ret)) {
apb               332 drivers/staging/greybus/arche-apb-ctrl.c 		ret = PTR_ERR(apb->boot_ret);
apb               338 drivers/staging/greybus/arche-apb-ctrl.c 	apb->pwroff = devm_gpiod_get_optional(dev, "pwr-off", GPIOD_IN);
apb               339 drivers/staging/greybus/arche-apb-ctrl.c 	if (IS_ERR(apb->pwroff)) {
apb               340 drivers/staging/greybus/arche-apb-ctrl.c 		ret = PTR_ERR(apb->pwroff);
apb               346 drivers/staging/greybus/arche-apb-ctrl.c 	apb->clk_en = devm_gpiod_get_optional(dev, "clock-en", GPIOD_OUT_LOW);
apb               347 drivers/staging/greybus/arche-apb-ctrl.c 	if (IS_ERR(apb->clk_en)) {
apb               348 drivers/staging/greybus/arche-apb-ctrl.c 		ret = PTR_ERR(apb->clk_en);
apb               353 drivers/staging/greybus/arche-apb-ctrl.c 	apb->pwrdn = devm_gpiod_get(dev, "pwr-down", GPIOD_OUT_LOW);
apb               354 drivers/staging/greybus/arche-apb-ctrl.c 	if (IS_ERR(apb->pwrdn)) {
apb               355 drivers/staging/greybus/arche-apb-ctrl.c 		ret = PTR_ERR(apb->pwrdn);
apb               361 drivers/staging/greybus/arche-apb-ctrl.c 	apb->vcore = devm_regulator_get(dev, "vcore");
apb               362 drivers/staging/greybus/arche-apb-ctrl.c 	if (IS_ERR(apb->vcore))
apb               365 drivers/staging/greybus/arche-apb-ctrl.c 	apb->vio = devm_regulator_get(dev, "vio");
apb               366 drivers/staging/greybus/arche-apb-ctrl.c 	if (IS_ERR(apb->vio))
apb               369 drivers/staging/greybus/arche-apb-ctrl.c 	apb->pinctrl = devm_pinctrl_get(&pdev->dev);
apb               370 drivers/staging/greybus/arche-apb-ctrl.c 	if (IS_ERR(apb->pinctrl)) {
apb               372 drivers/staging/greybus/arche-apb-ctrl.c 		return PTR_ERR(apb->pinctrl);
apb               374 drivers/staging/greybus/arche-apb-ctrl.c 	apb->pin_default = pinctrl_lookup_state(apb->pinctrl, "default");
apb               375 drivers/staging/greybus/arche-apb-ctrl.c 	if (IS_ERR(apb->pin_default)) {
apb               377 drivers/staging/greybus/arche-apb-ctrl.c 		return PTR_ERR(apb->pin_default);
apb               382 drivers/staging/greybus/arche-apb-ctrl.c 		apb->spi_en_polarity_high = true;
apb               390 drivers/staging/greybus/arche-apb-ctrl.c 	struct arche_apb_ctrl_drvdata *apb;
apb               393 drivers/staging/greybus/arche-apb-ctrl.c 	apb = devm_kzalloc(&pdev->dev, sizeof(*apb), GFP_KERNEL);
apb               394 drivers/staging/greybus/arche-apb-ctrl.c 	if (!apb)
apb               397 drivers/staging/greybus/arche-apb-ctrl.c 	ret = apb_ctrl_get_devtree_data(pdev, apb);
apb               404 drivers/staging/greybus/arche-apb-ctrl.c 	apb->state = ARCHE_PLATFORM_STATE_OFF;
apb               407 drivers/staging/greybus/arche-apb-ctrl.c 		apb->init_disabled = true;
apb               409 drivers/staging/greybus/arche-apb-ctrl.c 	platform_set_drvdata(pdev, apb);