@@ -891,11 +891,6 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
891
891
unsigned int reset_ctrl ;
892
892
int ret ;
893
893
894
- if (!i2c -> irq ) {
895
- dev_err (& i2c -> dev , "No IRQ configured?\n" );
896
- return - EINVAL ;
897
- }
898
-
899
894
pca9450 = devm_kzalloc (& i2c -> dev , sizeof (struct pca9450 ), GFP_KERNEL );
900
895
if (!pca9450 )
901
896
return - ENOMEM ;
@@ -967,23 +962,25 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
967
962
}
968
963
}
969
964
970
- ret = devm_request_threaded_irq (pca9450 -> dev , pca9450 -> irq , NULL ,
971
- pca9450_irq_handler ,
972
- (IRQF_TRIGGER_FALLING | IRQF_ONESHOT ),
973
- "pca9450-irq" , pca9450 );
974
- if (ret != 0 ) {
975
- dev_err (pca9450 -> dev , "Failed to request IRQ: %d\n" ,
976
- pca9450 -> irq );
977
- return ret ;
978
- }
979
- /* Unmask all interrupt except PWRON/WDOG/RSVD */
980
- ret = regmap_update_bits (pca9450 -> regmap , PCA9450_REG_INT1_MSK ,
981
- IRQ_VR_FLT1 | IRQ_VR_FLT2 | IRQ_LOWVSYS |
982
- IRQ_THERM_105 | IRQ_THERM_125 ,
983
- IRQ_PWRON | IRQ_WDOGB | IRQ_RSVD );
984
- if (ret ) {
985
- dev_err (& i2c -> dev , "Unmask irq error\n" );
986
- return ret ;
965
+ if (pca9450 -> irq ) {
966
+ ret = devm_request_threaded_irq (pca9450 -> dev , pca9450 -> irq , NULL ,
967
+ pca9450_irq_handler ,
968
+ (IRQF_TRIGGER_FALLING | IRQF_ONESHOT ),
969
+ "pca9450-irq" , pca9450 );
970
+ if (ret != 0 ) {
971
+ dev_err (pca9450 -> dev , "Failed to request IRQ: %d\n" ,
972
+ pca9450 -> irq );
973
+ return ret ;
974
+ }
975
+ /* Unmask all interrupt except PWRON/WDOG/RSVD */
976
+ ret = regmap_update_bits (pca9450 -> regmap , PCA9450_REG_INT1_MSK ,
977
+ IRQ_VR_FLT1 | IRQ_VR_FLT2 | IRQ_LOWVSYS |
978
+ IRQ_THERM_105 | IRQ_THERM_125 ,
979
+ IRQ_PWRON | IRQ_WDOGB | IRQ_RSVD );
980
+ if (ret ) {
981
+ dev_err (& i2c -> dev , "Unmask irq error\n" );
982
+ return ret ;
983
+ }
987
984
}
988
985
989
986
/* Clear PRESET_EN bit in BUCK123_DVS to use DVS registers */
0 commit comments