@@ -407,12 +407,15 @@ static int tegra_hte_line_xlate(struct hte_chip *gc,
407407 return - EINVAL ;
408408
409409 /*
410+ * GPIO consumers can access GPIOs in two ways:
410411 *
411- * There are two paths GPIO consumers can take as follows:
412- * 1) The consumer (gpiolib-cdev for example) which uses GPIO global
413- * number which gets assigned run time.
414- * 2) The consumer passing GPIO from the DT which is assigned
415- * statically for example by using TEGRA194_AON_GPIO gpio DT binding.
412+ * 1) Using the global GPIO numberspace.
413+ *
414+ * This is the old, now DEPRECATED method and should not be used in
415+ * new code. TODO: Check if tegra is even concerned by this.
416+ *
417+ * 2) Using GPIO descriptors that can be assigned to consumer devices
418+ * using device-tree, ACPI or lookup tables.
416419 *
417420 * The code below addresses both the consumer use cases and maps into
418421 * HTE/GTE namespace.
@@ -725,10 +728,8 @@ static int tegra_hte_probe(struct platform_device *pdev)
725728 return - ENOMEM ;
726729
727730 ret = platform_get_irq (pdev , 0 );
728- if (ret < 0 ) {
729- dev_err_probe (dev , ret , "failed to get irq\n" );
731+ if (ret < 0 )
730732 return ret ;
731- }
732733 hte_dev -> hte_irq = ret ;
733734 ret = devm_request_irq (dev , hte_dev -> hte_irq , tegra_hte_isr , 0 ,
734735 dev_name (dev ), hte_dev );
@@ -811,7 +812,7 @@ static int tegra_hte_probe(struct platform_device *pdev)
811812 return 0 ;
812813}
813814
814- static int __maybe_unused tegra_hte_resume_early (struct device * dev )
815+ static int tegra_hte_resume_early (struct device * dev )
815816{
816817 u32 i ;
817818 struct tegra_hte_soc * gs = dev_get_drvdata (dev );
@@ -832,7 +833,7 @@ static int __maybe_unused tegra_hte_resume_early(struct device *dev)
832833 return 0 ;
833834}
834835
835- static int __maybe_unused tegra_hte_suspend_late (struct device * dev )
836+ static int tegra_hte_suspend_late (struct device * dev )
836837{
837838 u32 i ;
838839 struct tegra_hte_soc * gs = dev_get_drvdata (dev );
@@ -852,15 +853,14 @@ static int __maybe_unused tegra_hte_suspend_late(struct device *dev)
852853}
853854
854855static const struct dev_pm_ops tegra_hte_pm = {
855- SET_LATE_SYSTEM_SLEEP_PM_OPS (tegra_hte_suspend_late ,
856- tegra_hte_resume_early )
856+ LATE_SYSTEM_SLEEP_PM_OPS (tegra_hte_suspend_late , tegra_hte_resume_early )
857857};
858858
859859static struct platform_driver tegra_hte_driver = {
860860 .probe = tegra_hte_probe ,
861861 .driver = {
862862 .name = "tegra_hte" ,
863- .pm = & tegra_hte_pm ,
863+ .pm = pm_sleep_ptr ( & tegra_hte_pm ) ,
864864 .of_match_table = tegra_hte_of_match ,
865865 },
866866};
0 commit comments