@@ -815,6 +815,24 @@ static const struct pca9450_regulator_desc pca9451a_regulators[] = {
815815 .owner = THIS_MODULE ,
816816 },
817817 },
818+ {
819+ .desc = {
820+ .name = "ldo3" ,
821+ .of_match = of_match_ptr ("LDO3" ),
822+ .regulators_node = of_match_ptr ("regulators" ),
823+ .id = PCA9450_LDO3 ,
824+ .ops = & pca9450_ldo_regulator_ops ,
825+ .type = REGULATOR_VOLTAGE ,
826+ .n_voltages = PCA9450_LDO3_VOLTAGE_NUM ,
827+ .linear_ranges = pca9450_ldo34_volts ,
828+ .n_linear_ranges = ARRAY_SIZE (pca9450_ldo34_volts ),
829+ .vsel_reg = PCA9450_REG_LDO3CTRL ,
830+ .vsel_mask = LDO3OUT_MASK ,
831+ .enable_reg = PCA9450_REG_LDO3CTRL ,
832+ .enable_mask = LDO3_EN_MASK ,
833+ .owner = THIS_MODULE ,
834+ },
835+ },
818836 {
819837 .desc = {
820838 .name = "ldo4" ,
@@ -916,6 +934,7 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
916934 pca9450 -> rcnt = ARRAY_SIZE (pca9450bc_regulators );
917935 break ;
918936 case PCA9450_TYPE_PCA9451A :
937+ case PCA9450_TYPE_PCA9452 :
919938 regulator_desc = pca9451a_regulators ;
920939 pca9450 -> rcnt = ARRAY_SIZE (pca9451a_regulators );
921940 break ;
@@ -943,7 +962,8 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
943962 /* Check your board and dts for match the right pmic */
944963 if (((device_id >> 4 ) != 0x1 && type == PCA9450_TYPE_PCA9450A ) ||
945964 ((device_id >> 4 ) != 0x3 && type == PCA9450_TYPE_PCA9450BC ) ||
946- ((device_id >> 4 ) != 0x9 && type == PCA9450_TYPE_PCA9451A ))
965+ ((device_id >> 4 ) != 0x9 && type == PCA9450_TYPE_PCA9451A ) ||
966+ ((device_id >> 4 ) != 0x9 && type == PCA9450_TYPE_PCA9452 ))
947967 return dev_err_probe (& i2c -> dev , - EINVAL ,
948968 "Device id(%x) mismatched\n" , device_id >> 4 );
949969
@@ -955,6 +975,9 @@ static int pca9450_i2c_probe(struct i2c_client *i2c)
955975 r = & regulator_desc [i ];
956976 desc = & r -> desc ;
957977
978+ if (type == PCA9450_TYPE_PCA9451A && !strcmp (desc -> name , "ldo3" ))
979+ continue ;
980+
958981 config .regmap = pca9450 -> regmap ;
959982 config .dev = pca9450 -> dev ;
960983
@@ -1043,6 +1066,10 @@ static const struct of_device_id pca9450_of_match[] = {
10431066 .compatible = "nxp,pca9451a" ,
10441067 .data = (void * )PCA9450_TYPE_PCA9451A ,
10451068 },
1069+ {
1070+ .compatible = "nxp,pca9452" ,
1071+ .data = (void * )PCA9450_TYPE_PCA9452 ,
1072+ },
10461073 { }
10471074};
10481075MODULE_DEVICE_TABLE (of , pca9450_of_match );
0 commit comments