return -ENODEV;
}
+ if (pdata->buck2_gpiodvs) {
+ if (pdata->buck3_gpiodvs || pdata->buck4_gpiodvs) {
+ dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n");
+ return -EINVAL;
+ }
+ }
+
+ if (pdata->buck3_gpiodvs) {
+ if (pdata->buck2_gpiodvs || pdata->buck4_gpiodvs) {
+ dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n");
+ return -EINVAL;
+ }
+ }
+
+ if (pdata->buck4_gpiodvs) {
+ if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs) {
+ dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n");
+ return -EINVAL;
+ }
+ }
+
s5m8767 = devm_kzalloc(&pdev->dev, sizeof(struct s5m8767_info),
GFP_KERNEL);
if (!s5m8767)
}
}
- if (pdata->buck2_gpiodvs) {
- if (pdata->buck3_gpiodvs || pdata->buck4_gpiodvs) {
- dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n");
- ret = -EINVAL;
- return ret;
- }
- }
-
- if (pdata->buck3_gpiodvs) {
- if (pdata->buck2_gpiodvs || pdata->buck4_gpiodvs) {
- dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n");
- ret = -EINVAL;
- return ret;
- }
- }
-
- if (pdata->buck4_gpiodvs) {
- if (pdata->buck2_gpiodvs || pdata->buck3_gpiodvs) {
- dev_err(&pdev->dev, "S5M8767 GPIO DVS NOT VALID\n");
- ret = -EINVAL;
- return ret;
- }
- }
-
s5m_reg_update(s5m8767->iodev, S5M8767_REG_BUCK2CTRL,
(pdata->buck2_gpiodvs) ? (1 << 1) : (0 << 1), 1 << 1);
s5m_reg_update(s5m8767->iodev, S5M8767_REG_BUCK3CTRL,