@@ -407,12 +407,15 @@ static int tegra_hte_line_xlate(struct hte_chip *gc,
407
407
return - EINVAL ;
408
408
409
409
/*
410
+ * GPIO consumers can access GPIOs in two ways:
410
411
*
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.
416
419
*
417
420
* The code below addresses both the consumer use cases and maps into
418
421
* HTE/GTE namespace.
@@ -725,10 +728,8 @@ static int tegra_hte_probe(struct platform_device *pdev)
725
728
return - ENOMEM ;
726
729
727
730
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 )
730
732
return ret ;
731
- }
732
733
hte_dev -> hte_irq = ret ;
733
734
ret = devm_request_irq (dev , hte_dev -> hte_irq , tegra_hte_isr , 0 ,
734
735
dev_name (dev ), hte_dev );
@@ -811,7 +812,7 @@ static int tegra_hte_probe(struct platform_device *pdev)
811
812
return 0 ;
812
813
}
813
814
814
- static int __maybe_unused tegra_hte_resume_early (struct device * dev )
815
+ static int tegra_hte_resume_early (struct device * dev )
815
816
{
816
817
u32 i ;
817
818
struct tegra_hte_soc * gs = dev_get_drvdata (dev );
@@ -832,7 +833,7 @@ static int __maybe_unused tegra_hte_resume_early(struct device *dev)
832
833
return 0 ;
833
834
}
834
835
835
- static int __maybe_unused tegra_hte_suspend_late (struct device * dev )
836
+ static int tegra_hte_suspend_late (struct device * dev )
836
837
{
837
838
u32 i ;
838
839
struct tegra_hte_soc * gs = dev_get_drvdata (dev );
@@ -852,15 +853,14 @@ static int __maybe_unused tegra_hte_suspend_late(struct device *dev)
852
853
}
853
854
854
855
static 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 )
857
857
};
858
858
859
859
static struct platform_driver tegra_hte_driver = {
860
860
.probe = tegra_hte_probe ,
861
861
.driver = {
862
862
.name = "tegra_hte" ,
863
- .pm = & tegra_hte_pm ,
863
+ .pm = pm_sleep_ptr ( & tegra_hte_pm ) ,
864
864
.of_match_table = tegra_hte_of_match ,
865
865
},
866
866
};
0 commit comments