|
12 | 12 | #include <linux/module.h>
|
13 | 13 | #include <linux/of.h>
|
14 | 14 | #include <linux/platform_device.h>
|
| 15 | +#include <linux/property.h> |
15 | 16 | #include <linux/regulator/driver.h>
|
16 | 17 | #include <linux/regulator/machine.h>
|
17 | 18 | #include <linux/regulator/of_regulator.h>
|
@@ -939,19 +940,19 @@ static int bd957x_probe(struct platform_device *pdev)
|
939 | 940 | }
|
940 | 941 |
|
941 | 942 | ic_data->regmap = regmap;
|
942 |
| - vout_mode = of_property_read_bool(pdev->dev.parent->of_node, |
943 |
| - "rohm,vout1-en-low"); |
| 943 | + vout_mode = device_property_read_bool(pdev->dev.parent, |
| 944 | + "rohm,vout1-en-low"); |
944 | 945 | if (vout_mode) {
|
945 | 946 | struct gpio_desc *en;
|
946 | 947 |
|
947 | 948 | dev_dbg(&pdev->dev, "GPIO controlled mode\n");
|
948 | 949 |
|
949 | 950 | /* VOUT1 enable state judged by VOUT1_EN pin */
|
950 | 951 | /* See if we have GPIO defined */
|
951 |
| - en = devm_gpiod_get_from_of_node(&pdev->dev, |
952 |
| - pdev->dev.parent->of_node, |
953 |
| - "rohm,vout1-en-gpios", 0, |
954 |
| - GPIOD_OUT_LOW, "vout1-en"); |
| 952 | + en = devm_fwnode_gpiod_get(&pdev->dev, |
| 953 | + dev_fwnode(pdev->dev.parent), |
| 954 | + "rohm,vout1-en", GPIOD_OUT_LOW, |
| 955 | + "vout1-en"); |
955 | 956 | if (!IS_ERR(en)) {
|
956 | 957 | /* VOUT1_OPS gpio ctrl */
|
957 | 958 | /*
|
@@ -986,8 +987,8 @@ static int bd957x_probe(struct platform_device *pdev)
|
986 | 987 | * like DDR voltage selection.
|
987 | 988 | */
|
988 | 989 | platform_set_drvdata(pdev, ic_data);
|
989 |
| - ddr_sel = of_property_read_bool(pdev->dev.parent->of_node, |
990 |
| - "rohm,ddr-sel-low"); |
| 990 | + ddr_sel = device_property_read_bool(pdev->dev.parent, |
| 991 | + "rohm,ddr-sel-low"); |
991 | 992 | if (ddr_sel)
|
992 | 993 | ic_data->regulator_data[2].desc.fixed_uV = 1350000;
|
993 | 994 | else
|
|
0 commit comments