14 Nov
2008
14 Nov
'08
12:03 p.m.
On Thu, Nov 13, 2008 at 04:41:56PM +0100, Christian Pellegrin wrote:
This looks OK from an ASoC point of view but one small issue...
- s3c24xx_uda134x_l3_pins = pdev->dev.platform_data;
- if (s3c24xx_uda134x_l3_pins == NULL) {
printk(KERN_ERR "S3C24XX_UDA134X SoC Audio: "
"unable to find platform data\n");
return -ENODEV;
- }
- s3c24xx_uda134x.power = s3c24xx_uda134x_l3_pins->power;
- s3c24xx_uda134x.model = s3c24xx_uda134x_l3_pins->model;
- gpio_direction_output(s3c24xx_uda134x_l3_pins->l3_data, 0);
- gpio_direction_output(s3c24xx_uda134x_l3_pins->l3_clk, 0);
- gpio_direction_output(s3c24xx_uda134x_l3_pins->l3_mode, 0);
You should request the GPIOs with gpio_request() before using them (and then free them with gpio_free() when the driver exits).