File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -680,13 +680,26 @@ static int tas2562_parse_dt(struct tas2562_data *tas2562)
680
680
struct device * dev = tas2562 -> dev ;
681
681
int ret = 0 ;
682
682
683
- tas2562 -> sdz_gpio = devm_gpiod_get_optional (dev , "shut-down" ,
684
- GPIOD_OUT_HIGH );
683
+ tas2562 -> sdz_gpio = devm_gpiod_get_optional (dev , "shutdown" , GPIOD_OUT_HIGH );
685
684
if (IS_ERR (tas2562 -> sdz_gpio )) {
686
- if (PTR_ERR (tas2562 -> sdz_gpio ) == - EPROBE_DEFER ) {
687
- tas2562 -> sdz_gpio = NULL ;
685
+ if (PTR_ERR (tas2562 -> sdz_gpio ) == - EPROBE_DEFER )
688
686
return - EPROBE_DEFER ;
689
- }
687
+
688
+ tas2562 -> sdz_gpio = NULL ;
689
+ }
690
+
691
+ /*
692
+ * The shut-down property is deprecated but needs to be checked for
693
+ * backwards compatibility.
694
+ */
695
+ if (tas2562 -> sdz_gpio == NULL ) {
696
+ tas2562 -> sdz_gpio = devm_gpiod_get_optional (dev , "shut-down" ,
697
+ GPIOD_OUT_HIGH );
698
+ if (IS_ERR (tas2562 -> sdz_gpio ))
699
+ if (PTR_ERR (tas2562 -> sdz_gpio ) == - EPROBE_DEFER )
700
+ return - EPROBE_DEFER ;
701
+
702
+ tas2562 -> sdz_gpio = NULL ;
690
703
}
691
704
692
705
ret = fwnode_property_read_u32 (dev -> fwnode , "ti,imon-slot-no" ,
You can’t perform that action at this time.
0 commit comments