Lines Matching refs:pdev

77 	struct platform_device *pdev = to_platform_device(dev);  in mc13783_adc_read_bp()  local
78 kernel_ulong_t driver_data = platform_get_device_id(pdev)->driver_data; in mc13783_adc_read_bp()
167 static int mc13783_adc_use_touchscreen(struct platform_device *pdev) in mc13783_adc_use_touchscreen() argument
169 struct mc13783_adc_priv *priv = platform_get_drvdata(pdev); in mc13783_adc_use_touchscreen()
175 static int __init mc13783_adc_probe(struct platform_device *pdev) in mc13783_adc_probe() argument
179 const struct platform_device_id *id = platform_get_device_id(pdev); in mc13783_adc_probe()
182 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); in mc13783_adc_probe()
186 priv->mc13xxx = dev_get_drvdata(pdev->dev.parent); in mc13783_adc_probe()
192 platform_set_drvdata(pdev, priv); in mc13783_adc_probe()
195 ret = sysfs_create_group(&pdev->dev.kobj, &mc13783_group_base); in mc13783_adc_probe()
200 ret = sysfs_create_group(&pdev->dev.kobj, in mc13783_adc_probe()
206 if (!mc13783_adc_use_touchscreen(pdev)) { in mc13783_adc_probe()
207 ret = sysfs_create_group(&pdev->dev.kobj, &mc13783_group_ts); in mc13783_adc_probe()
212 priv->hwmon_dev = hwmon_device_register(&pdev->dev); in mc13783_adc_probe()
215 dev_err(&pdev->dev, in mc13783_adc_probe()
224 if (!mc13783_adc_use_touchscreen(pdev)) in mc13783_adc_probe()
225 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_ts); in mc13783_adc_probe()
229 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_16chans); in mc13783_adc_probe()
232 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_base); in mc13783_adc_probe()
236 static int mc13783_adc_remove(struct platform_device *pdev) in mc13783_adc_remove() argument
238 struct mc13783_adc_priv *priv = platform_get_drvdata(pdev); in mc13783_adc_remove()
239 kernel_ulong_t driver_data = platform_get_device_id(pdev)->driver_data; in mc13783_adc_remove()
243 if (!mc13783_adc_use_touchscreen(pdev)) in mc13783_adc_remove()
244 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_ts); in mc13783_adc_remove()
247 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_16chans); in mc13783_adc_remove()
249 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_base); in mc13783_adc_remove()