Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: qcom-ufs: fix build error when the component is built as a module

Export the following functions in order to avoid build errors
when the component PHY_QCOM_UFS is compiled as a module:

ERROR: "ufs_qcom_phy_disable_ref_clk"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
ERROR: "ufs_qcom_phy_enable_ref_clk"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
ERROR: "ufs_qcom_phy_is_pcs_ready"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
ERROR: "ufs_qcom_phy_disable_iface_clk"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
ERROR: "ufs_qcom_phy_start_serdes"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
ERROR: "ufs_qcom_phy_calibrate_phy"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
ERROR: "ufs_qcom_phy_enable_dev_ref_clk"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
ERROR: "ufs_qcom_phy_set_tx_lane_enable"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
ERROR: "ufs_qcom_phy_disable_dev_ref_clk"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
ERROR: "ufs_qcom_phy_save_controller_version"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
ERROR: "ufs_qcom_phy_enable_iface_clk"
[drivers/scsi/ufs/ufs-qcom.ko] undefined!
make[1]: *** [__modpost] Error 1

Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Reviewed-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Yaniv Gardi and committed by
Martin K. Petersen
aeeed76b fb53c439

+11
+11
drivers/phy/phy-qcom-ufs.c
··· 432 432 out: 433 433 return ret; 434 434 } 435 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_ref_clk); 435 436 436 437 static 437 438 int ufs_qcom_phy_disable_vreg(struct phy *phy, ··· 475 474 phy->is_ref_clk_enabled = false; 476 475 } 477 476 } 477 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_ref_clk); 478 478 479 479 #define UFS_REF_CLK_EN (1 << 5) 480 480 ··· 519 517 { 520 518 ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, true); 521 519 } 520 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_dev_ref_clk); 522 521 523 522 void ufs_qcom_phy_disable_dev_ref_clk(struct phy *generic_phy) 524 523 { 525 524 ufs_qcom_phy_dev_ref_clk_ctrl(generic_phy, false); 526 525 } 526 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_dev_ref_clk); 527 527 528 528 /* Turn ON M-PHY RMMI interface clocks */ 529 529 int ufs_qcom_phy_enable_iface_clk(struct phy *generic_phy) ··· 554 550 out: 555 551 return ret; 556 552 } 553 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_enable_iface_clk); 557 554 558 555 /* Turn OFF M-PHY RMMI interface clocks */ 559 556 void ufs_qcom_phy_disable_iface_clk(struct phy *generic_phy) ··· 567 562 phy->is_iface_clk_enabled = false; 568 563 } 569 564 } 565 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_disable_iface_clk); 570 566 571 567 int ufs_qcom_phy_start_serdes(struct phy *generic_phy) 572 568 { ··· 584 578 585 579 return ret; 586 580 } 581 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_start_serdes); 587 582 588 583 int ufs_qcom_phy_set_tx_lane_enable(struct phy *generic_phy, u32 tx_lanes) 589 584 { ··· 602 595 603 596 return ret; 604 597 } 598 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_set_tx_lane_enable); 605 599 606 600 void ufs_qcom_phy_save_controller_version(struct phy *generic_phy, 607 601 u8 major, u16 minor, u16 step) ··· 613 605 ufs_qcom_phy->host_ctrl_rev_minor = minor; 614 606 ufs_qcom_phy->host_ctrl_rev_step = step; 615 607 } 608 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_save_controller_version); 616 609 617 610 int ufs_qcom_phy_calibrate_phy(struct phy *generic_phy, bool is_rate_B) 618 611 { ··· 634 625 635 626 return ret; 636 627 } 628 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_calibrate_phy); 637 629 638 630 int ufs_qcom_phy_remove(struct phy *generic_phy, 639 631 struct ufs_qcom_phy *ufs_qcom_phy) ··· 672 662 return ufs_qcom_phy->phy_spec_ops-> 673 663 is_physical_coding_sublayer_ready(ufs_qcom_phy); 674 664 } 665 + EXPORT_SYMBOL_GPL(ufs_qcom_phy_is_pcs_ready); 675 666 676 667 int ufs_qcom_phy_power_on(struct phy *generic_phy) 677 668 {