rphy              113 drivers/message/fusion/mptsas.c 		struct mptsas_phyinfo *phy_info, struct sas_rphy *rphy);
rphy              370 drivers/message/fusion/mptsas.c static inline MPT_ADAPTER *rphy_to_ioc(struct sas_rphy *rphy)
rphy              372 drivers/message/fusion/mptsas.c 	struct Scsi_Host *shost = dev_to_shost(rphy->dev.parent->parent);
rphy              482 drivers/message/fusion/mptsas.c 		return phy_info->port_details->rphy;
rphy              488 drivers/message/fusion/mptsas.c mptsas_set_rphy(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info, struct sas_rphy *rphy)
rphy              491 drivers/message/fusion/mptsas.c 		phy_info->port_details->rphy = rphy;
rphy              493 drivers/message/fusion/mptsas.c 		    ioc->name, rphy));
rphy              496 drivers/message/fusion/mptsas.c 	if (rphy) {
rphy              498 drivers/message/fusion/mptsas.c 		    &rphy->dev, MYIOC_s_FMT "add:", ioc->name));
rphy              500 drivers/message/fusion/mptsas.c 		    ioc->name, rphy, rphy->dev.release));
rphy              560 drivers/message/fusion/mptsas.c 	struct sas_rphy	*rphy;
rphy              599 drivers/message/fusion/mptsas.c 		rphy = dev_to_rphy(starget->dev.parent);
rphy              600 drivers/message/fusion/mptsas.c 		if (rphy->identify.sas_address == sas_address) {
rphy              759 drivers/message/fusion/mptsas.c 	struct sas_rphy	*rphy;
rphy              763 drivers/message/fusion/mptsas.c 	rphy = dev_to_rphy(starget->dev.parent);
rphy              766 drivers/message/fusion/mptsas.c 			rphy->identify.sas_address);
rphy              916 drivers/message/fusion/mptsas.c 				port_details->rphy =
rphy              951 drivers/message/fusion/mptsas.c 		    ioc->name, port_details->port, port_details->rphy));
rphy             1418 drivers/message/fusion/mptsas.c 	struct sas_rphy *rphy;
rphy             1465 drivers/message/fusion/mptsas.c 	rphy = sas_end_device_alloc(port);
rphy             1466 drivers/message/fusion/mptsas.c 	if (!rphy) {
rphy             1473 drivers/message/fusion/mptsas.c 	rphy->identify = identify;
rphy             1474 drivers/message/fusion/mptsas.c 	if (sas_rphy_add(rphy)) {
rphy             1478 drivers/message/fusion/mptsas.c 		sas_rphy_free(rphy);
rphy             1481 drivers/message/fusion/mptsas.c 	mptsas_set_rphy(ioc, phy_info, rphy);
rphy             1494 drivers/message/fusion/mptsas.c 	struct sas_rphy *rphy;
rphy             1515 drivers/message/fusion/mptsas.c 	rphy = mptsas_get_rphy(phy_info);
rphy             1516 drivers/message/fusion/mptsas.c 	if (!rphy) {
rphy             1539 drivers/message/fusion/mptsas.c 	dev_printk(KERN_DEBUG, &rphy->dev, MYIOC_s_FMT
rphy             1721 drivers/message/fusion/mptsas.c 	struct sas_rphy		*rphy;
rphy             1755 drivers/message/fusion/mptsas.c 	rphy = dev_to_rphy(starget->dev.parent);
rphy             1760 drivers/message/fusion/mptsas.c 					rphy->identify.sas_address)
rphy             1797 drivers/message/fusion/mptsas.c 	struct sas_rphy		*rphy;
rphy             1815 drivers/message/fusion/mptsas.c 	rphy = dev_to_rphy(starget->dev.parent);
rphy             1819 drivers/message/fusion/mptsas.c 					rphy->identify.sas_address)
rphy             1846 drivers/message/fusion/mptsas.c 	struct sas_rphy		*rphy;
rphy             1865 drivers/message/fusion/mptsas.c 	rphy = dev_to_rphy(sdev->sdev_target->dev.parent);
rphy             1870 drivers/message/fusion/mptsas.c 					rphy->identify.sas_address)
rphy             2156 drivers/message/fusion/mptsas.c mptsas_get_enclosure_identifier(struct sas_rphy *rphy, u64 *identifier)
rphy             2158 drivers/message/fusion/mptsas.c 	MPT_ADAPTER *ioc = rphy_to_ioc(rphy);
rphy             2168 drivers/message/fusion/mptsas.c 			    rphy->identify.sas_address) {
rphy             2190 drivers/message/fusion/mptsas.c mptsas_get_bay_identifier(struct sas_rphy *rphy)
rphy             2192 drivers/message/fusion/mptsas.c 	MPT_ADAPTER *ioc = rphy_to_ioc(rphy);
rphy             2200 drivers/message/fusion/mptsas.c 			    rphy->identify.sas_address) {
rphy             2213 drivers/message/fusion/mptsas.c 		struct sas_rphy *rphy)
rphy             2251 drivers/message/fusion/mptsas.c 	if (rphy)
rphy             2252 drivers/message/fusion/mptsas.c 		sas_address = rphy->identify.sas_address;
rphy             3188 drivers/message/fusion/mptsas.c 	if (!mptsas_get_rphy(phy_info) && port && !port->rphy) {
rphy             3190 drivers/message/fusion/mptsas.c 		struct sas_rphy *rphy;
rphy             3230 drivers/message/fusion/mptsas.c 			rphy = sas_end_device_alloc(port);
rphy             3234 drivers/message/fusion/mptsas.c 			rphy = sas_expander_alloc(port, identify.device_type);
rphy             3237 drivers/message/fusion/mptsas.c 			rphy = NULL;
rphy             3240 drivers/message/fusion/mptsas.c 		if (!rphy) {
rphy             3247 drivers/message/fusion/mptsas.c 		rphy->identify = identify;
rphy             3248 drivers/message/fusion/mptsas.c 		error = sas_rphy_add(rphy);
rphy             3253 drivers/message/fusion/mptsas.c 			sas_rphy_free(rphy);
rphy             3256 drivers/message/fusion/mptsas.c 		mptsas_set_rphy(ioc, phy_info, rphy);
rphy             3261 drivers/message/fusion/mptsas.c 					rphy_to_expander_device(rphy));
rphy             3358 drivers/message/fusion/mptsas.c 	struct sas_rphy	*rphy;
rphy             3399 drivers/message/fusion/mptsas.c 			rphy = mptsas_get_rphy(&parent->phy_info[i]);
rphy             3400 drivers/message/fusion/mptsas.c 			parent_dev = &rphy->dev;
rphy             3462 drivers/message/fusion/mptsas.c 	struct sas_rphy *rphy;
rphy             3467 drivers/message/fusion/mptsas.c 		rphy = mptsas_get_rphy(phy_info);
rphy             3468 drivers/message/fusion/mptsas.c 		if (!rphy)
rphy             3470 drivers/message/fusion/mptsas.c 		if (rphy->identify.device_type == SAS_END_DEVICE)
rphy             3476 drivers/message/fusion/mptsas.c 		rphy = mptsas_get_rphy(phy_info);
rphy             3477 drivers/message/fusion/mptsas.c 		if (!rphy)
rphy             3479 drivers/message/fusion/mptsas.c 		if (rphy->identify.device_type ==
rphy             3481 drivers/message/fusion/mptsas.c 		    rphy->identify.device_type ==
rphy             3484 drivers/message/fusion/mptsas.c 			    rphy->identify.sas_address);
rphy              152 drivers/message/fusion/mptsas.h 	struct sas_rphy *rphy;	/* transport layer rphy object */
rphy              394 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	struct rcar_gen3_phy *rphy = phy_get_drvdata(p);
rphy              395 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	struct rcar_gen3_chan *channel = rphy->ch;
rphy              401 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	val |= USB2_INT_ENABLE_UCOM_INTEN | rphy->int_enable_bits;
rphy              410 drivers/phy/renesas/phy-rcar-gen3-usb2.c 		rphy->otg_initialized = true;
rphy              413 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	rphy->initialized = true;
rphy              420 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	struct rcar_gen3_phy *rphy = phy_get_drvdata(p);
rphy              421 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	struct rcar_gen3_chan *channel = rphy->ch;
rphy              425 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	rphy->initialized = false;
rphy              428 drivers/phy/renesas/phy-rcar-gen3-usb2.c 		rphy->otg_initialized = false;
rphy              431 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	val &= ~rphy->int_enable_bits;
rphy              441 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	struct rcar_gen3_phy *rphy = phy_get_drvdata(p);
rphy              442 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	struct rcar_gen3_chan *channel = rphy->ch;
rphy              465 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	rphy->powered = true;
rphy              473 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	struct rcar_gen3_phy *rphy = phy_get_drvdata(p);
rphy              474 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	struct rcar_gen3_chan *channel = rphy->ch;
rphy              478 drivers/phy/renesas/phy-rcar-gen3-usb2.c 	rphy->powered = false;
rphy              225 drivers/phy/rockchip/phy-rockchip-inno-usb2.c static inline struct regmap *get_reg_base(struct rockchip_usb2phy *rphy)
rphy              227 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	return rphy->usbgrf == NULL ? rphy->grf : rphy->usbgrf;
rphy              259 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy =
rphy              261 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct regmap *base = get_reg_base(rphy);
rphy              265 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (!property_enabled(base, &rphy->phy_cfg->clkout_ctl)) {
rphy              266 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		ret = property_enable(base, &rphy->phy_cfg->clkout_ctl, true);
rphy              279 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy =
rphy              281 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct regmap *base = get_reg_base(rphy);
rphy              284 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	property_enable(base, &rphy->phy_cfg->clkout_ctl, false);
rphy              289 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy =
rphy              291 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct regmap *base = get_reg_base(rphy);
rphy              293 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	return property_enabled(base, &rphy->phy_cfg->clkout_ctl);
rphy              312 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy = data;
rphy              314 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	of_clk_del_provider(rphy->dev->of_node);
rphy              315 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	clk_unregister(rphy->clk480m);
rphy              319 drivers/phy/rockchip/phy-rockchip-inno-usb2.c rockchip_usb2phy_clk480m_register(struct rockchip_usb2phy *rphy)
rphy              321 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct device_node *node = rphy->dev->of_node;
rphy              333 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (rphy->clk) {
rphy              334 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		clk_name = __clk_get_name(rphy->clk);
rphy              342 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rphy->clk480m_hw.init = &init;
rphy              345 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rphy->clk480m = clk_register(rphy->dev, &rphy->clk480m_hw);
rphy              346 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (IS_ERR(rphy->clk480m)) {
rphy              347 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		ret = PTR_ERR(rphy->clk480m);
rphy              351 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	ret = of_clk_add_provider(node, of_clk_src_simple_get, rphy->clk480m);
rphy              355 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	ret = devm_add_action(rphy->dev, rockchip_usb2phy_clk480m_unregister,
rphy              356 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			      rphy);
rphy              365 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	clk_unregister(rphy->clk480m);
rphy              370 drivers/phy/rockchip/phy-rockchip-inno-usb2.c static int rockchip_usb2phy_extcon_register(struct rockchip_usb2phy *rphy)
rphy              373 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct device_node *node = rphy->dev->of_node;
rphy              377 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		edev = extcon_get_edev_by_phandle(rphy->dev, 0);
rphy              380 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 				dev_err(rphy->dev, "Invalid or missing extcon\n");
rphy              385 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		edev = devm_extcon_dev_allocate(rphy->dev,
rphy              391 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		ret = devm_extcon_dev_register(rphy->dev, edev);
rphy              393 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			dev_err(rphy->dev, "failed to register extcon device\n");
rphy              398 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rphy->edev = edev;
rphy              406 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy = dev_get_drvdata(phy->dev.parent);
rphy              415 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			ret = property_enable(rphy->grf,
rphy              421 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			ret = property_enable(rphy->grf,
rphy              435 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		ret = property_enable(rphy->grf,
rphy              440 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		ret = property_enable(rphy->grf,
rphy              456 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy = dev_get_drvdata(phy->dev.parent);
rphy              457 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct regmap *base = get_reg_base(rphy);
rphy              465 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	ret = clk_prepare_enable(rphy->clk480m);
rphy              483 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy = dev_get_drvdata(phy->dev.parent);
rphy              484 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct regmap *base = get_reg_base(rphy);
rphy              497 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	clk_disable_unprepare(rphy->clk480m);
rphy              530 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent);
rphy              535 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	vbus_attach = property_enabled(rphy->grf,
rphy              551 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		if (extcon_get_state(rphy->edev, EXTCON_USB_HOST) > 0) {
rphy              558 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			switch (rphy->chg_state) {
rphy              563 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 				switch (rphy->chg_type) {
rphy              596 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rphy->chg_state = USB_CHG_STATE_UNDEFINED;
rphy              597 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN;
rphy              603 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			if (notify_charger && rphy->edev) {
rphy              604 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 				extcon_set_state_sync(rphy->edev,
rphy              607 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 					extcon_set_state_sync(rphy->edev,
rphy              616 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rphy->chg_state = USB_CHG_STATE_UNDEFINED;
rphy              617 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN;
rphy              625 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		if (extcon_get_state(rphy->edev, EXTCON_USB_HOST) == 0) {
rphy              653 drivers/phy/rockchip/phy-rockchip-inno-usb2.c static void rockchip_chg_enable_dcd(struct rockchip_usb2phy *rphy,
rphy              656 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct regmap *base = get_reg_base(rphy);
rphy              658 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	property_enable(base, &rphy->phy_cfg->chg_det.rdm_pdwn_en, en);
rphy              659 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	property_enable(base, &rphy->phy_cfg->chg_det.idp_src_en, en);
rphy              662 drivers/phy/rockchip/phy-rockchip-inno-usb2.c static void rockchip_chg_enable_primary_det(struct rockchip_usb2phy *rphy,
rphy              665 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct regmap *base = get_reg_base(rphy);
rphy              667 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	property_enable(base, &rphy->phy_cfg->chg_det.vdp_src_en, en);
rphy              668 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	property_enable(base, &rphy->phy_cfg->chg_det.idm_sink_en, en);
rphy              671 drivers/phy/rockchip/phy-rockchip-inno-usb2.c static void rockchip_chg_enable_secondary_det(struct rockchip_usb2phy *rphy,
rphy              674 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct regmap *base = get_reg_base(rphy);
rphy              676 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	property_enable(base, &rphy->phy_cfg->chg_det.vdm_src_en, en);
rphy              677 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	property_enable(base, &rphy->phy_cfg->chg_det.idp_sink_en, en);
rphy              688 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent);
rphy              689 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct regmap *base = get_reg_base(rphy);
rphy              694 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		rphy->chg_state);
rphy              695 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	switch (rphy->chg_state) {
rphy              700 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		property_enable(base, &rphy->phy_cfg->chg_det.opmode, false);
rphy              702 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		rockchip_chg_enable_dcd(rphy, true);
rphy              703 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		rphy->chg_state = USB_CHG_STATE_WAIT_FOR_DCD;
rphy              704 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		rphy->dcd_retries = 0;
rphy              709 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		is_dcd = property_enabled(rphy->grf,
rphy              710 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 					  &rphy->phy_cfg->chg_det.dp_det);
rphy              711 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		tmout = ++rphy->dcd_retries == CHG_DCD_MAX_RETRIES;
rphy              716 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rockchip_chg_enable_dcd(rphy, false);
rphy              718 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rockchip_chg_enable_primary_det(rphy, true);
rphy              720 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rphy->chg_state = USB_CHG_STATE_DCD_DONE;
rphy              727 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		vout = property_enabled(rphy->grf,
rphy              728 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 					&rphy->phy_cfg->chg_det.cp_det);
rphy              729 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		rockchip_chg_enable_primary_det(rphy, false);
rphy              732 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rockchip_chg_enable_secondary_det(rphy, true);
rphy              734 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rphy->chg_state = USB_CHG_STATE_PRIMARY_DONE;
rphy              736 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			if (rphy->dcd_retries == CHG_DCD_MAX_RETRIES) {
rphy              738 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 				rphy->chg_type = POWER_SUPPLY_TYPE_USB_DCP;
rphy              739 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 				rphy->chg_state = USB_CHG_STATE_DETECTED;
rphy              742 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 				rphy->chg_type = POWER_SUPPLY_TYPE_USB;
rphy              743 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 				rphy->chg_state = USB_CHG_STATE_DETECTED;
rphy              749 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		vout = property_enabled(rphy->grf,
rphy              750 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 					&rphy->phy_cfg->chg_det.dcp_det);
rphy              752 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		rockchip_chg_enable_secondary_det(rphy, false);
rphy              754 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rphy->chg_type = POWER_SUPPLY_TYPE_USB_DCP;
rphy              756 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rphy->chg_type = POWER_SUPPLY_TYPE_USB_CDP;
rphy              759 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		rphy->chg_state = USB_CHG_STATE_DETECTED;
rphy              764 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		property_enable(base, &rphy->phy_cfg->chg_det.opmode, true);
rphy              767 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			 chg_to_string(rphy->chg_type));
rphy              793 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent);
rphy              802 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	ret = regmap_read(rphy->grf, rport->port_cfg->utmi_ls.offset, &ul);
rphy              806 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	ret = regmap_read(rphy->grf, rport->port_cfg->utmi_hstdet.offset, &uhd);
rphy              860 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		property_enable(rphy->grf, &rport->port_cfg->ls_det_clr, true);
rphy              861 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		property_enable(rphy->grf, &rport->port_cfg->ls_det_en, true);
rphy              882 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent);
rphy              884 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (!property_enabled(rphy->grf, &rport->port_cfg->ls_det_st))
rphy              890 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	property_enable(rphy->grf, &rport->port_cfg->ls_det_en, false);
rphy              891 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	property_enable(rphy->grf, &rport->port_cfg->ls_det_clr, true);
rphy              909 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent);
rphy              911 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (!property_enabled(rphy->grf, &rport->port_cfg->bvalid_det_st))
rphy              917 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	property_enable(rphy->grf, &rport->port_cfg->bvalid_det_clr, true);
rphy              929 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy = dev_get_drvdata(rport->phy->dev.parent);
rphy              931 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (property_enabled(rphy->grf, &rport->port_cfg->bvalid_det_st))
rphy              937 drivers/phy/rockchip/phy-rockchip-inno-usb2.c static int rockchip_usb2phy_host_port_init(struct rockchip_usb2phy *rphy,
rphy              944 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rport->port_cfg = &rphy->phy_cfg->port_cfgs[USB2PHY_PORT_HOST];
rphy              952 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		dev_err(rphy->dev, "no linestate irq provided\n");
rphy              956 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	ret = devm_request_threaded_irq(rphy->dev, rport->ls_irq, NULL,
rphy              961 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		dev_err(rphy->dev, "failed to request linestate irq handle\n");
rphy              979 drivers/phy/rockchip/phy-rockchip-inno-usb2.c static int rockchip_usb2phy_otg_port_init(struct rockchip_usb2phy *rphy,
rphy              986 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rport->port_cfg = &rphy->phy_cfg->port_cfgs[USB2PHY_PORT_OTG];
rphy             1017 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		ret = devm_request_threaded_irq(rphy->dev, rport->otg_mux_irq,
rphy             1024 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			dev_err(rphy->dev,
rphy             1031 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			dev_err(rphy->dev, "no vbus valid irq provided\n");
rphy             1036 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		ret = devm_request_threaded_irq(rphy->dev, rport->bvalid_irq,
rphy             1043 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			dev_err(rphy->dev,
rphy             1049 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (!IS_ERR(rphy->edev)) {
rphy             1052 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		ret = devm_extcon_register_notifier(rphy->dev, rphy->edev,
rphy             1055 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			dev_err(rphy->dev, "register USB HOST notifier failed\n");
rphy             1068 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	struct rockchip_usb2phy *rphy;
rphy             1074 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rphy = devm_kzalloc(dev, sizeof(*rphy), GFP_KERNEL);
rphy             1075 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (!rphy)
rphy             1087 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rphy->grf = syscon_node_to_regmap(dev->parent->of_node);
rphy             1088 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (IS_ERR(rphy->grf))
rphy             1089 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		return PTR_ERR(rphy->grf);
rphy             1092 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		rphy->usbgrf =
rphy             1095 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		if (IS_ERR(rphy->usbgrf))
rphy             1096 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			return PTR_ERR(rphy->usbgrf);
rphy             1098 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		rphy->usbgrf = NULL;
rphy             1107 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rphy->dev = dev;
rphy             1109 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rphy->chg_state = USB_CHG_STATE_UNDEFINED;
rphy             1110 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rphy->chg_type = POWER_SUPPLY_TYPE_UNKNOWN;
rphy             1111 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	platform_set_drvdata(pdev, rphy);
rphy             1113 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	ret = rockchip_usb2phy_extcon_register(rphy);
rphy             1121 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			rphy->phy_cfg = &phy_cfgs[index];
rphy             1128 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (!rphy->phy_cfg) {
rphy             1134 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	rphy->clk = of_clk_get_by_name(np, "phyclk");
rphy             1135 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (!IS_ERR(rphy->clk)) {
rphy             1136 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		clk_prepare_enable(rphy->clk);
rphy             1139 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		rphy->clk = NULL;
rphy             1142 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	ret = rockchip_usb2phy_clk480m_register(rphy);
rphy             1150 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		struct rockchip_usb2phy_port *rport = &rphy->ports[index];
rphy             1170 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			ret = rockchip_usb2phy_host_port_init(rphy, rport,
rphy             1175 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 			ret = rockchip_usb2phy_otg_port_init(rphy, rport,
rphy             1183 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		if (++index >= rphy->phy_cfg->num_ports)
rphy             1193 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 	if (rphy->clk) {
rphy             1194 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		clk_disable_unprepare(rphy->clk);
rphy             1195 drivers/phy/rockchip/phy-rockchip-inno-usb2.c 		clk_put(rphy->clk);
rphy              204 drivers/scsi/aic94xx/aic94xx_dev.c 		struct sas_end_device *rdev = rphy_to_end_device(dev->rphy);
rphy              245 drivers/scsi/hpsa.c 		struct sas_rphy *rphy);
rphy             2104 drivers/scsi/hpsa.c 		struct sas_rphy *rphy;
rphy             2107 drivers/scsi/hpsa.c 		rphy = target_to_rphy(starget);
rphy             2108 drivers/scsi/hpsa.c 		sd = hpsa_find_device_by_sas_rphy(h, rphy);
rphy             9585 drivers/scsi/hpsa.c 				struct sas_rphy *rphy)
rphy             9589 drivers/scsi/hpsa.c 	identify = &rphy->identify;
rphy             9594 drivers/scsi/hpsa.c 	return sas_rphy_add(rphy);
rphy             9679 drivers/scsi/hpsa.c 					struct sas_rphy *rphy)
rphy             9688 drivers/scsi/hpsa.c 		if (device->sas_port->rphy == rphy)
rphy             9749 drivers/scsi/hpsa.c 	struct sas_rphy *rphy;
rphy             9755 drivers/scsi/hpsa.c 	rphy = sas_end_device_alloc(hpsa_sas_port->port);
rphy             9756 drivers/scsi/hpsa.c 	if (!rphy) {
rphy             9761 drivers/scsi/hpsa.c 	hpsa_sas_port->rphy = rphy;
rphy             9764 drivers/scsi/hpsa.c 	rc = hpsa_sas_port_add_rphy(hpsa_sas_port, rphy);
rphy             9792 drivers/scsi/hpsa.c hpsa_sas_get_enclosure_identifier(struct sas_rphy *rphy, u64 *identifier)
rphy             9794 drivers/scsi/hpsa.c 	struct Scsi_Host *shost = phy_to_shost(rphy);
rphy             9806 drivers/scsi/hpsa.c 	sd = hpsa_find_device_by_sas_rphy(h, rphy);
rphy             9816 drivers/scsi/hpsa.c hpsa_sas_get_bay_identifier(struct sas_rphy *rphy)
rphy               50 drivers/scsi/hpsa.h 	struct sas_rphy *rphy;
rphy              353 drivers/scsi/libsas/sas_ata.c 	struct device *dev = &ddev->rphy->dev;
rphy              718 drivers/scsi/libsas/sas_ata.c 	sas_fill_in_rphy(dev, dev->rphy);
rphy               53 drivers/scsi/libsas/sas_discover.c 	struct sas_rphy *rphy;
rphy              108 drivers/scsi/libsas/sas_discover.c 			rphy = NULL;
rphy              113 drivers/scsi/libsas/sas_discover.c 		rphy = sas_end_device_alloc(port->port);
rphy              116 drivers/scsi/libsas/sas_discover.c 		rphy = sas_expander_alloc(port->port,
rphy              120 drivers/scsi/libsas/sas_discover.c 		rphy = sas_expander_alloc(port->port,
rphy              125 drivers/scsi/libsas/sas_discover.c 		rphy = NULL;
rphy              129 drivers/scsi/libsas/sas_discover.c 	if (!rphy) {
rphy              134 drivers/scsi/libsas/sas_discover.c 	rphy->identify.phy_identifier = phy->phy->identify.phy_identifier;
rphy              136 drivers/scsi/libsas/sas_discover.c 	sas_fill_in_rphy(dev, rphy);
rphy              149 drivers/scsi/libsas/sas_discover.c 	dev->rphy = rphy;
rphy              150 drivers/scsi/libsas/sas_discover.c 	get_device(&dev->rphy->dev);
rphy              223 drivers/scsi/libsas/sas_discover.c 		err = sas_rphy_add(dev->rphy);
rphy              295 drivers/scsi/libsas/sas_discover.c 	put_device(&dev->rphy->dev);
rphy              296 drivers/scsi/libsas/sas_discover.c 	dev->rphy = NULL;
rphy              353 drivers/scsi/libsas/sas_discover.c 		sas_remove_children(&dev->rphy->dev);
rphy              354 drivers/scsi/libsas/sas_discover.c 		sas_rphy_delete(dev->rphy);
rphy              375 drivers/scsi/libsas/sas_discover.c 		sas_rphy_free(dev->rphy);
rphy              381 drivers/scsi/libsas/sas_discover.c 		sas_rphy_unlink(dev->rphy);
rphy              399 drivers/scsi/libsas/sas_discover.c 	port->port->rphy = NULL;
rphy              479 drivers/scsi/libsas/sas_discover.c 		sas_rphy_free(dev->rphy);
rphy              205 drivers/scsi/libsas/sas_expander.c 	struct sas_rphy *rphy = dev->rphy;
rphy              212 drivers/scsi/libsas/sas_expander.c 		phy->phy = sas_phy_alloc(&rphy->dev, phy_id);
rphy              349 drivers/scsi/libsas/sas_expander.c 	struct sas_rphy *rphy;
rphy              354 drivers/scsi/libsas/sas_expander.c 	rphy = ex_phy->port->rphy;
rphy              355 drivers/scsi/libsas/sas_expander.c 	if (!rphy)
rphy              358 drivers/scsi/libsas/sas_expander.c 	dev = sas_find_dev_by_rphy(rphy);
rphy              519 drivers/scsi/libsas/sas_expander.c 	struct sas_rphy *rphy = dev->rphy;
rphy              520 drivers/scsi/libsas/sas_expander.c 	struct sas_expander_device *edev = rphy_to_expander_device(rphy);
rphy              664 drivers/scsi/libsas/sas_expander.c 	struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
rphy              665 drivers/scsi/libsas/sas_expander.c 	struct domain_device *dev = sas_find_dev_by_rphy(rphy);
rphy              784 drivers/scsi/libsas/sas_expander.c 	struct sas_rphy *rphy;
rphy              801 drivers/scsi/libsas/sas_expander.c 		phy->port = sas_port_alloc(&parent->rphy->dev, phy_id);
rphy              847 drivers/scsi/libsas/sas_expander.c 		rphy = sas_end_device_alloc(phy->port);
rphy              848 drivers/scsi/libsas/sas_expander.c 		if (!rphy)
rphy              850 drivers/scsi/libsas/sas_expander.c 		rphy->identify.phy_identifier = phy_id;
rphy              852 drivers/scsi/libsas/sas_expander.c 		child->rphy = rphy;
rphy              853 drivers/scsi/libsas/sas_expander.c 		get_device(&rphy->dev);
rphy              868 drivers/scsi/libsas/sas_expander.c 		rphy = sas_end_device_alloc(phy->port);
rphy              870 drivers/scsi/libsas/sas_expander.c 		if (unlikely(!rphy))
rphy              875 drivers/scsi/libsas/sas_expander.c 		child->rphy = rphy;
rphy              876 drivers/scsi/libsas/sas_expander.c 		get_device(&rphy->dev);
rphy              877 drivers/scsi/libsas/sas_expander.c 		rphy->identify.phy_identifier = phy_id;
rphy              878 drivers/scsi/libsas/sas_expander.c 		sas_fill_in_rphy(child, rphy);
rphy              900 drivers/scsi/libsas/sas_expander.c 	sas_rphy_free(child->rphy);
rphy              940 drivers/scsi/libsas/sas_expander.c 	struct sas_expander_device *parent_ex = rphy_to_expander_device(parent->rphy);
rphy              943 drivers/scsi/libsas/sas_expander.c 	struct sas_rphy *rphy;
rphy              959 drivers/scsi/libsas/sas_expander.c 	phy->port = sas_port_alloc(&parent->rphy->dev, phy_id);
rphy              966 drivers/scsi/libsas/sas_expander.c 		rphy = sas_expander_alloc(phy->port,
rphy              970 drivers/scsi/libsas/sas_expander.c 		rphy = sas_expander_alloc(phy->port,
rphy              974 drivers/scsi/libsas/sas_expander.c 		rphy = NULL;	/* shut gcc up */
rphy              978 drivers/scsi/libsas/sas_expander.c 	child->rphy = rphy;
rphy              979 drivers/scsi/libsas/sas_expander.c 	get_device(&rphy->dev);
rphy              980 drivers/scsi/libsas/sas_expander.c 	edev = rphy_to_expander_device(rphy);
rphy              994 drivers/scsi/libsas/sas_expander.c 	sas_fill_in_rphy(child, rphy);
rphy              995 drivers/scsi/libsas/sas_expander.c 	sas_rphy_add(rphy);
rphy             1003 drivers/scsi/libsas/sas_expander.c 		sas_rphy_delete(rphy);
rphy             1622 drivers/scsi/libsas/sas_expander.c 				rphy_to_expander_device(dev->rphy);
rphy             1652 drivers/scsi/libsas/sas_expander.c 	struct sas_expander_device *ex = rphy_to_expander_device(dev->rphy);
rphy             1654 drivers/scsi/libsas/sas_expander.c 	res = sas_rphy_add(dev->rphy);
rphy             1668 drivers/scsi/libsas/sas_expander.c 	sas_rphy_remove(dev->rphy);
rphy             1920 drivers/scsi/libsas/sas_expander.c 				rphy_to_expander_device(child->rphy);
rphy             1935 drivers/scsi/libsas/sas_expander.c 	struct sas_expander_device *ex = rphy_to_expander_device(dev->rphy);
rphy             2136 drivers/scsi/libsas/sas_expander.c 		struct sas_rphy *rphy)
rphy             2143 drivers/scsi/libsas/sas_expander.c 	if (!rphy)
rphy             2146 drivers/scsi/libsas/sas_expander.c 	switch (rphy->identify.device_type) {
rphy             2156 drivers/scsi/libsas/sas_expander.c 	dev = sas_find_dev_by_rphy(rphy);
rphy               23 drivers/scsi/libsas/sas_host_smp.c 	struct sas_rphy *rphy;
rphy               46 drivers/scsi/libsas/sas_host_smp.c 	rphy = sas_ha->sas_phy[phy_id]->port->port_dev->rphy;
rphy               47 drivers/scsi/libsas/sas_host_smp.c 	resp_data[12] = rphy->identify.device_type << 4;
rphy               48 drivers/scsi/libsas/sas_host_smp.c 	resp_data[14] = rphy->identify.initiator_port_protocols;
rphy               49 drivers/scsi/libsas/sas_host_smp.c 	resp_data[15] = rphy->identify.target_port_protocols;
rphy              140 drivers/scsi/libsas/sas_host_smp.c 	struct sas_rphy *rphy;
rphy              154 drivers/scsi/libsas/sas_host_smp.c 	rphy = sas_ha->sas_phy[phy_id]->port->port_dev->rphy;
rphy              157 drivers/scsi/libsas/sas_host_smp.c 	if (rphy->identify.target_port_protocols != SAS_PROTOCOL_SATA)
rphy              211 drivers/scsi/libsas/sas_init.c 		dev = sas_find_dev_by_rphy(dev->rphy);
rphy              248 drivers/scsi/libsas/sas_init.c 		struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
rphy              249 drivers/scsi/libsas/sas_init.c 		struct domain_device *ddev = sas_find_dev_by_rphy(rphy);
rphy              283 drivers/scsi/libsas/sas_init.c 		struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
rphy              284 drivers/scsi/libsas/sas_init.c 		struct domain_device *ddev = sas_find_dev_by_rphy(rphy);
rphy              316 drivers/scsi/libsas/sas_init.c 		struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
rphy              317 drivers/scsi/libsas/sas_init.c 		struct domain_device *ddev = sas_find_dev_by_rphy(rphy);
rphy              352 drivers/scsi/libsas/sas_init.c 		struct sas_rphy *rphy = dev_to_rphy(phy->dev.parent);
rphy              353 drivers/scsi/libsas/sas_init.c 		struct domain_device *ddev = sas_find_dev_by_rphy(rphy);
rphy               75 drivers/scsi/libsas/sas_internal.h 		struct sas_rphy *rphy);
rphy               82 drivers/scsi/libsas/sas_internal.h struct domain_device *sas_find_dev_by_rphy(struct sas_rphy *rphy);
rphy              118 drivers/scsi/libsas/sas_internal.h 				    struct sas_rphy *rphy)
rphy              120 drivers/scsi/libsas/sas_internal.h 	rphy->identify.sas_address = SAS_ADDR(dev->sas_addr);
rphy              121 drivers/scsi/libsas/sas_internal.h 	rphy->identify.initiator_port_protocols = dev->iproto;
rphy              122 drivers/scsi/libsas/sas_internal.h 	rphy->identify.target_port_protocols = dev->tproto;
rphy              128 drivers/scsi/libsas/sas_internal.h 		rphy->identify.device_type = SAS_END_DEVICE;
rphy              131 drivers/scsi/libsas/sas_internal.h 		rphy->identify.device_type = SAS_EDGE_EXPANDER_DEVICE;
rphy              134 drivers/scsi/libsas/sas_internal.h 		rphy->identify.device_type = SAS_FANOUT_EXPANDER_DEVICE;
rphy              137 drivers/scsi/libsas/sas_internal.h 		rphy->identify.device_type = SAS_PHY_UNUSED;
rphy              164 drivers/scsi/libsas/sas_internal.h 		ex->parent_port = sas_port_alloc(&dev->rphy->dev, phy_id);
rphy              455 drivers/scsi/libsas/sas_scsi_host.c 		dev_name(&dev->rphy->dev));
rphy              794 drivers/scsi/libsas/sas_scsi_host.c struct domain_device *sas_find_dev_by_rphy(struct sas_rphy *rphy)
rphy              796 drivers/scsi/libsas/sas_scsi_host.c 	struct Scsi_Host *shost = dev_to_shost(rphy->dev.parent);
rphy              809 drivers/scsi/libsas/sas_scsi_host.c 			if (rphy == dev->rphy) {
rphy              825 drivers/scsi/libsas/sas_scsi_host.c 	struct sas_rphy *rphy = dev_to_rphy(starget->dev.parent);
rphy              826 drivers/scsi/libsas/sas_scsi_host.c 	struct domain_device *found_dev = sas_find_dev_by_rphy(rphy);
rphy              842 drivers/scsi/libsas/sas_scsi_host.c 	BUG_ON(dev->rphy->identify.device_type != SAS_END_DEVICE);
rphy              723 drivers/scsi/mpt3sas/mpt3sas_base.h 	struct sas_rphy *rphy;
rphy             1596 drivers/scsi/mpt3sas/mpt3sas_scsih.c 	struct sas_rphy *rphy;
rphy             1648 drivers/scsi/mpt3sas/mpt3sas_scsih.c 	rphy = dev_to_rphy(starget->dev.parent);
rphy             1650 drivers/scsi/mpt3sas/mpt3sas_scsih.c 	   rphy->identify.sas_address);
rphy             5751 drivers/scsi/mpt3sas/mpt3sas_scsih.c 	sas_expander->parent_dev = &mpt3sas_port->rphy->dev;
rphy              611 drivers/scsi/mpt3sas/mpt3sas_transport.c 	struct sas_rphy *rphy;
rphy              693 drivers/scsi/mpt3sas/mpt3sas_transport.c 		rphy = sas_end_device_alloc(port);
rphy              695 drivers/scsi/mpt3sas/mpt3sas_transport.c 		rphy = sas_expander_alloc(port,
rphy              698 drivers/scsi/mpt3sas/mpt3sas_transport.c 	rphy->identify = mpt3sas_port->remote_identify;
rphy              712 drivers/scsi/mpt3sas/mpt3sas_transport.c 	if ((sas_rphy_add(rphy))) {
rphy              723 drivers/scsi/mpt3sas/mpt3sas_transport.c 		dev_printk(KERN_INFO, &rphy->dev,
rphy              727 drivers/scsi/mpt3sas/mpt3sas_transport.c 	mpt3sas_port->rphy = rphy;
rphy              739 drivers/scsi/mpt3sas/mpt3sas_transport.c 		    rphy_to_expander_device(rphy));
rphy             1016 drivers/scsi/mpt3sas/mpt3sas_transport.c rphy_to_ioc(struct sas_rphy *rphy)
rphy             1018 drivers/scsi/mpt3sas/mpt3sas_transport.c 	struct Scsi_Host *shost = dev_to_shost(rphy->dev.parent->parent);
rphy             1259 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_get_enclosure_identifier(struct sas_rphy *rphy, u64 *identifier)
rphy             1261 drivers/scsi/mpt3sas/mpt3sas_transport.c 	struct MPT3SAS_ADAPTER *ioc = rphy_to_ioc(rphy);
rphy             1268 drivers/scsi/mpt3sas/mpt3sas_transport.c 	    rphy->identify.sas_address);
rphy             1289 drivers/scsi/mpt3sas/mpt3sas_transport.c _transport_get_bay_identifier(struct sas_rphy *rphy)
rphy             1291 drivers/scsi/mpt3sas/mpt3sas_transport.c 	struct MPT3SAS_ADAPTER *ioc = rphy_to_ioc(rphy);
rphy             1298 drivers/scsi/mpt3sas/mpt3sas_transport.c 	    rphy->identify.sas_address);
rphy             1834 drivers/scsi/mpt3sas/mpt3sas_transport.c 		struct sas_rphy *rphy)
rphy             1901 drivers/scsi/mpt3sas/mpt3sas_transport.c 	mpi_request->SASAddress = (rphy) ?
rphy             1902 drivers/scsi/mpt3sas/mpt3sas_transport.c 	    cpu_to_le64(rphy->identify.sas_address) :
rphy              659 drivers/scsi/pm8001/pm8001_sas.c 				dev->rphy->identify.phy_identifier;
rphy              163 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = target_to_rphy(sdev->sdev_target);
rphy              166 drivers/scsi/scsi_transport_sas.c 	BUG_ON(rphy->identify.device_type != SAS_END_DEVICE);
rphy              168 drivers/scsi/scsi_transport_sas.c 	rdev = rphy_to_end_device(rphy);
rphy              175 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = NULL;
rphy              178 drivers/scsi/scsi_transport_sas.c 		rphy = dev_to_rphy(job->dev);
rphy              186 drivers/scsi/scsi_transport_sas.c 	to_sas_internal(shost->transportt)->f->smp_handler(job, shost, rphy);
rphy              190 drivers/scsi/scsi_transport_sas.c static int sas_bsg_initialize(struct Scsi_Host *shost, struct sas_rphy *rphy)
rphy              199 drivers/scsi/scsi_transport_sas.c 	if (rphy) {
rphy              200 drivers/scsi/scsi_transport_sas.c 		q = bsg_setup_queue(&rphy->dev, dev_name(&rphy->dev),
rphy              204 drivers/scsi/scsi_transport_sas.c 		rphy->q = q;
rphy              326 drivers/scsi/scsi_transport_sas.c 	return rdev->rphy.identify.sas_address;
rphy              696 drivers/scsi/scsi_transport_sas.c 		struct sas_rphy *rphy = dev_to_rphy(parent);
rphy              698 drivers/scsi/scsi_transport_sas.c 			rphy->scsi_target_id, number);
rphy              888 drivers/scsi/scsi_transport_sas.c 		struct sas_rphy *rphy = dev_to_rphy(parent);
rphy              890 drivers/scsi/scsi_transport_sas.c 			     rphy->scsi_target_id, port->port_identifier);
rphy              922 drivers/scsi/scsi_transport_sas.c 		struct sas_rphy *rphy = dev_to_rphy(parent);
rphy              923 drivers/scsi/scsi_transport_sas.c 		struct sas_expander_device *exp = rphy_to_expander_device(rphy);
rphy              987 drivers/scsi/scsi_transport_sas.c 	if (port->rphy) {
rphy              988 drivers/scsi/scsi_transport_sas.c 		sas_rphy_delete(port->rphy);
rphy              989 drivers/scsi/scsi_transport_sas.c 		port->rphy = NULL;
rphy             1135 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = transport_class_to_rphy(dev);		\
rphy             1137 drivers/scsi/scsi_transport_sas.c 	return snprintf(buf, 20, format_string, cast rphy->field);	\
rphy             1142 drivers/scsi/scsi_transport_sas.c static SAS_DEVICE_ATTR(rphy, name, S_IRUGO, 			\
rphy             1150 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = transport_class_to_rphy(dev);		\
rphy             1152 drivers/scsi/scsi_transport_sas.c 	if (!rphy->field)					\
rphy             1154 drivers/scsi/scsi_transport_sas.c 	return get_sas_protocol_names(rphy->field, buf);	\
rphy             1159 drivers/scsi/scsi_transport_sas.c static SAS_DEVICE_ATTR(rphy, name, S_IRUGO,			\
rphy             1166 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = transport_class_to_rphy(dev);
rphy             1168 drivers/scsi/scsi_transport_sas.c 	if (!rphy->identify.device_type)
rphy             1171 drivers/scsi/scsi_transport_sas.c 			rphy->identify.device_type, buf);
rphy             1174 drivers/scsi/scsi_transport_sas.c static SAS_DEVICE_ATTR(rphy, device_type, S_IRUGO,
rphy             1181 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = transport_class_to_rphy(dev);
rphy             1182 drivers/scsi/scsi_transport_sas.c 	struct sas_phy *phy = dev_to_phy(rphy->dev.parent);
rphy             1188 drivers/scsi/scsi_transport_sas.c 	error = i->f->get_enclosure_identifier(rphy, &identifier);
rphy             1194 drivers/scsi/scsi_transport_sas.c static SAS_DEVICE_ATTR(rphy, enclosure_identifier, S_IRUGO,
rphy             1201 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = transport_class_to_rphy(dev);
rphy             1202 drivers/scsi/scsi_transport_sas.c 	struct sas_phy *phy = dev_to_phy(rphy->dev.parent);
rphy             1207 drivers/scsi/scsi_transport_sas.c 	val = i->f->get_bay_identifier(rphy);
rphy             1213 drivers/scsi/scsi_transport_sas.c static SAS_DEVICE_ATTR(rphy, bay_identifier, S_IRUGO,
rphy             1270 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = transport_class_to_rphy(dev);		\
rphy             1271 drivers/scsi/scsi_transport_sas.c 	struct sas_end_device *rdev = rphy_to_end_device(rphy);		\
rphy             1299 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = transport_class_to_rphy(dev);		\
rphy             1300 drivers/scsi/scsi_transport_sas.c 	struct sas_expander_device *edev = rphy_to_expander_device(rphy); \
rphy             1347 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy;
rphy             1352 drivers/scsi/scsi_transport_sas.c 	rphy = dev_to_rphy(dev);
rphy             1362 drivers/scsi/scsi_transport_sas.c 		rphy->identify.device_type == SAS_END_DEVICE;
rphy             1370 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy;
rphy             1375 drivers/scsi/scsi_transport_sas.c 	rphy = dev_to_rphy(dev);
rphy             1385 drivers/scsi/scsi_transport_sas.c 		(rphy->identify.device_type == SAS_EDGE_EXPANDER_DEVICE ||
rphy             1386 drivers/scsi/scsi_transport_sas.c 		 rphy->identify.device_type == SAS_FANOUT_EXPANDER_DEVICE);
rphy             1391 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = dev_to_rphy(dev);
rphy             1392 drivers/scsi/scsi_transport_sas.c 	struct sas_expander_device *edev = rphy_to_expander_device(rphy);
rphy             1400 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy = dev_to_rphy(dev);
rphy             1401 drivers/scsi/scsi_transport_sas.c 	struct sas_end_device *edev = rphy_to_end_device(rphy);
rphy             1414 drivers/scsi/scsi_transport_sas.c static void sas_rphy_initialize(struct sas_rphy *rphy)
rphy             1416 drivers/scsi/scsi_transport_sas.c 	INIT_LIST_HEAD(&rphy->list);
rphy             1438 drivers/scsi/scsi_transport_sas.c 	device_initialize(&rdev->rphy.dev);
rphy             1439 drivers/scsi/scsi_transport_sas.c 	rdev->rphy.dev.parent = get_device(&parent->dev);
rphy             1440 drivers/scsi/scsi_transport_sas.c 	rdev->rphy.dev.release = sas_end_device_release;
rphy             1442 drivers/scsi/scsi_transport_sas.c 		struct sas_rphy *rphy = dev_to_rphy(parent->dev.parent);
rphy             1443 drivers/scsi/scsi_transport_sas.c 		dev_set_name(&rdev->rphy.dev, "end_device-%d:%d:%d",
rphy             1444 drivers/scsi/scsi_transport_sas.c 			     shost->host_no, rphy->scsi_target_id,
rphy             1447 drivers/scsi/scsi_transport_sas.c 		dev_set_name(&rdev->rphy.dev, "end_device-%d:%d",
rphy             1449 drivers/scsi/scsi_transport_sas.c 	rdev->rphy.identify.device_type = SAS_END_DEVICE;
rphy             1450 drivers/scsi/scsi_transport_sas.c 	sas_rphy_initialize(&rdev->rphy);
rphy             1451 drivers/scsi/scsi_transport_sas.c 	transport_setup_device(&rdev->rphy.dev);
rphy             1453 drivers/scsi/scsi_transport_sas.c 	return &rdev->rphy;
rphy             1482 drivers/scsi/scsi_transport_sas.c 	device_initialize(&rdev->rphy.dev);
rphy             1483 drivers/scsi/scsi_transport_sas.c 	rdev->rphy.dev.parent = get_device(&parent->dev);
rphy             1484 drivers/scsi/scsi_transport_sas.c 	rdev->rphy.dev.release = sas_expander_release;
rphy             1486 drivers/scsi/scsi_transport_sas.c 	rdev->rphy.scsi_target_id = sas_host->next_expander_id++;
rphy             1488 drivers/scsi/scsi_transport_sas.c 	dev_set_name(&rdev->rphy.dev, "expander-%d:%d",
rphy             1489 drivers/scsi/scsi_transport_sas.c 		     shost->host_no, rdev->rphy.scsi_target_id);
rphy             1490 drivers/scsi/scsi_transport_sas.c 	rdev->rphy.identify.device_type = type;
rphy             1491 drivers/scsi/scsi_transport_sas.c 	sas_rphy_initialize(&rdev->rphy);
rphy             1492 drivers/scsi/scsi_transport_sas.c 	transport_setup_device(&rdev->rphy.dev);
rphy             1494 drivers/scsi/scsi_transport_sas.c 	return &rdev->rphy;
rphy             1504 drivers/scsi/scsi_transport_sas.c int sas_rphy_add(struct sas_rphy *rphy)
rphy             1506 drivers/scsi/scsi_transport_sas.c 	struct sas_port *parent = dev_to_sas_port(rphy->dev.parent);
rphy             1509 drivers/scsi/scsi_transport_sas.c 	struct sas_identify *identify = &rphy->identify;
rphy             1512 drivers/scsi/scsi_transport_sas.c 	if (parent->rphy)
rphy             1514 drivers/scsi/scsi_transport_sas.c 	parent->rphy = rphy;
rphy             1516 drivers/scsi/scsi_transport_sas.c 	error = device_add(&rphy->dev);
rphy             1519 drivers/scsi/scsi_transport_sas.c 	transport_add_device(&rphy->dev);
rphy             1520 drivers/scsi/scsi_transport_sas.c 	transport_configure_device(&rphy->dev);
rphy             1521 drivers/scsi/scsi_transport_sas.c 	if (sas_bsg_initialize(shost, rphy))
rphy             1522 drivers/scsi/scsi_transport_sas.c 		printk("fail to a bsg device %s\n", dev_name(&rphy->dev));
rphy             1526 drivers/scsi/scsi_transport_sas.c 	list_add_tail(&rphy->list, &sas_host->rphy_list);
rphy             1530 drivers/scsi/scsi_transport_sas.c 		rphy->scsi_target_id = sas_host->next_target_id++;
rphy             1532 drivers/scsi/scsi_transport_sas.c 		rphy->scsi_target_id = -1;
rphy             1536 drivers/scsi/scsi_transport_sas.c 	    rphy->scsi_target_id != -1) {
rphy             1544 drivers/scsi/scsi_transport_sas.c 		scsi_scan_target(&rphy->dev, 0, rphy->scsi_target_id, lun,
rphy             1563 drivers/scsi/scsi_transport_sas.c void sas_rphy_free(struct sas_rphy *rphy)
rphy             1565 drivers/scsi/scsi_transport_sas.c 	struct device *dev = &rphy->dev;
rphy             1566 drivers/scsi/scsi_transport_sas.c 	struct Scsi_Host *shost = dev_to_shost(rphy->dev.parent->parent);
rphy             1570 drivers/scsi/scsi_transport_sas.c 	list_del(&rphy->list);
rphy             1586 drivers/scsi/scsi_transport_sas.c sas_rphy_delete(struct sas_rphy *rphy)
rphy             1588 drivers/scsi/scsi_transport_sas.c 	sas_rphy_remove(rphy);
rphy             1589 drivers/scsi/scsi_transport_sas.c 	sas_rphy_free(rphy);
rphy             1599 drivers/scsi/scsi_transport_sas.c void sas_rphy_unlink(struct sas_rphy *rphy)
rphy             1601 drivers/scsi/scsi_transport_sas.c 	struct sas_port *parent = dev_to_sas_port(rphy->dev.parent);
rphy             1603 drivers/scsi/scsi_transport_sas.c 	parent->rphy = NULL;
rphy             1614 drivers/scsi/scsi_transport_sas.c sas_rphy_remove(struct sas_rphy *rphy)
rphy             1616 drivers/scsi/scsi_transport_sas.c 	struct device *dev = &rphy->dev;
rphy             1618 drivers/scsi/scsi_transport_sas.c 	switch (rphy->identify.device_type) {
rphy             1630 drivers/scsi/scsi_transport_sas.c 	sas_rphy_unlink(rphy);
rphy             1631 drivers/scsi/scsi_transport_sas.c 	bsg_remove_queue(rphy->q);
rphy             1660 drivers/scsi/scsi_transport_sas.c 	struct sas_rphy *rphy;
rphy             1663 drivers/scsi/scsi_transport_sas.c 	list_for_each_entry(rphy, &sas_host->rphy_list, list) {
rphy             1664 drivers/scsi/scsi_transport_sas.c 		if (rphy->identify.device_type != SAS_END_DEVICE ||
rphy             1665 drivers/scsi/scsi_transport_sas.c 		    rphy->scsi_target_id == -1)
rphy             1669 drivers/scsi/scsi_transport_sas.c 		    (id == SCAN_WILD_CARD || id == rphy->scsi_target_id)) {
rphy             1670 drivers/scsi/scsi_transport_sas.c 			scsi_scan_target(&rphy->dev, 0, rphy->scsi_target_id,
rphy             1030 drivers/scsi/smartpqi/smartpqi.h 	struct sas_rphy *rphy;
rphy             1433 drivers/scsi/smartpqi/smartpqi.h 	struct sas_rphy *rphy);
rphy             1441 drivers/scsi/smartpqi/smartpqi.h 	struct pqi_ctrl_info *ctrl_info, struct sas_rphy *rphy);
rphy             5771 drivers/scsi/smartpqi/smartpqi_init.c 	struct sas_rphy *rphy;
rphy             5779 drivers/scsi/smartpqi/smartpqi_init.c 		rphy = target_to_rphy(starget);
rphy             5780 drivers/scsi/smartpqi/smartpqi_init.c 		device = pqi_find_device_by_sas_rphy(ctrl_info, rphy);
rphy               89 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	struct sas_rphy *rphy)
rphy               93 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	identify = &rphy->identify;
rphy              105 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	return sas_rphy_add(rphy);
rphy              200 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	struct pqi_ctrl_info *ctrl_info, struct sas_rphy *rphy)
rphy              208 drivers/scsi/smartpqi/smartpqi_sas_transport.c 		if (device->sas_port->rphy == rphy)
rphy              270 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	struct sas_rphy *rphy;
rphy              277 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	rphy = pqi_sas_rphy_alloc(pqi_sas_port);
rphy              278 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	if (!rphy) {
rphy              283 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	pqi_sas_port->rphy = rphy;
rphy              286 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	rc = pqi_sas_port_add_rphy(pqi_sas_port, rphy);
rphy              312 drivers/scsi/smartpqi/smartpqi_sas_transport.c static int pqi_sas_get_enclosure_identifier(struct sas_rphy *rphy,
rphy              323 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	if (!rphy)
rphy              326 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	shost = rphy_to_shost(rphy);
rphy              329 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	found_device = pqi_find_device_by_sas_rphy(ctrl_info, rphy);
rphy              388 drivers/scsi/smartpqi/smartpqi_sas_transport.c static int pqi_sas_get_bay_identifier(struct sas_rphy *rphy)
rphy              397 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	if (!rphy)
rphy              400 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	shost = rphy_to_shost(rphy);
rphy              403 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	device = pqi_find_device_by_sas_rphy(ctrl_info, rphy);
rphy              450 drivers/scsi/smartpqi/smartpqi_sas_transport.c pqi_build_csmi_smp_passthru_buffer(struct sas_rphy *rphy,
rphy              475 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	parameters->phy_identifier = rphy->identify.phy_identifier;
rphy              478 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	put_unaligned_be64(rphy->identify.sas_address,
rphy              512 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	struct sas_rphy *rphy)
rphy              527 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	if (!rphy) {
rphy              532 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	if (rphy->identify.device_type != SAS_FANOUT_EXPANDER_DEVICE) {
rphy              552 drivers/scsi/smartpqi/smartpqi_sas_transport.c 	smp_buf = pqi_build_csmi_smp_passthru_buffer(rphy, job);
rphy              187 include/scsi/libsas.h 	struct sas_rphy *rphy;
rphy              107 include/scsi/scsi_transport_sas.h #define rphy_to_shost(rphy) \
rphy              108 include/scsi/scsi_transport_sas.h 	dev_to_shost((rphy)->dev.parent)
rphy              113 include/scsi/scsi_transport_sas.h 	struct sas_rphy		rphy;
rphy              123 include/scsi/scsi_transport_sas.h 	container_of((r), struct sas_end_device, rphy)
rphy              140 include/scsi/scsi_transport_sas.h 	struct sas_rphy		rphy;
rphy              144 include/scsi/scsi_transport_sas.h 	container_of((r), struct sas_expander_device, rphy)
rphy              155 include/scsi/scsi_transport_sas.h 	struct sas_rphy		*rphy;
rphy              234 include/scsi/scsi_transport_sas.h 	struct sas_rphy *rphy;
rphy              237 include/scsi/scsi_transport_sas.h 	rphy = dev_to_rphy(dev);
rphy              238 include/scsi/scsi_transport_sas.h 	return rphy->identify.device_type == SAS_FANOUT_EXPANDER_DEVICE ||
rphy              239 include/scsi/scsi_transport_sas.h 		rphy->identify.device_type == SAS_EDGE_EXPANDER_DEVICE;