Lines Matching refs:pdev
40 struct device *pdev = vibrator->input->dev.parent;
47 dev_err(pdev, "failed to enable regulator: %d\n", err);
61 dev_err(pdev, "failed to apply pwm state: %d\n", err);
72 dev_err(pdev, "failed to apply dir-pwm state: %d\n", err);
128 static int pwm_vibrator_probe(struct platform_device *pdev)
134 vibrator = devm_kzalloc(&pdev->dev, sizeof(*vibrator), GFP_KERNEL);
138 vibrator->input = devm_input_allocate_device(&pdev->dev);
142 vibrator->vcc = devm_regulator_get(&pdev->dev, "vcc");
144 return dev_err_probe(&pdev->dev, PTR_ERR(vibrator->vcc),
147 vibrator->enable_gpio = devm_gpiod_get_optional(&pdev->dev, "enable",
150 return dev_err_probe(&pdev->dev, PTR_ERR(vibrator->enable_gpio),
153 vibrator->pwm = devm_pwm_get(&pdev->dev, "enable");
155 return dev_err_probe(&pdev->dev, PTR_ERR(vibrator->pwm),
165 dev_err(&pdev->dev, "failed to apply initial PWM state: %d\n",
170 vibrator->pwm_dir = devm_pwm_get(&pdev->dev, "direction");
179 dev_err(&pdev->dev, "failed to apply initial PWM state: %d\n",
186 device_property_read_u32(&pdev->dev, "direction-duty-cycle-ns",
196 dev_err(&pdev->dev, "Failed to request direction pwm: %d\n", err);
205 vibrator->input->dev.parent = &pdev->dev;
214 dev_err(&pdev->dev, "Couldn't create FF dev: %d\n", err);
220 dev_err(&pdev->dev, "Couldn't register input dev: %d\n", err);
224 platform_set_drvdata(pdev, vibrator);