Hi Arnd,
I am using a .setup to initialize pin mux etc. To use the mfd_cells directly
should I
use .enable and .disable of the mfd_cells instead of the .setup.
+static int pruss_mfd_add_devices(struct platform_device *pdev)
+{
+ struct da8xx_pruss_devices *dev_data = pdev->dev.platform_data;
+ struct device *dev = &pdev->dev;
+ struct mfd_cell cell;
+ u32 err, count;
+
+ for (count = 0; dev_data[count].dev_name != NULL; count++) {
+ memset(&cell, 0, sizeof(struct mfd_cell));
+ cell.id = count;
+ cell.name = dev_data[count].dev_name;
+ cell.platform_data = dev_data[count].pdata;
+ cell.data_size = dev_data[count].pdata_size;
+ cell.resources = dev_data[count].resources;
+ cell.num_resources = dev_data[count].num_resources;
+
+ err = mfd_add_devices(dev, 0, &cell, 1, NULL, 0);
+ if (err) {
+ dev_err(dev, "cannot add mfd cells\n");
+ return err;
+ }
+ dev_info(dev, "mfd: added %s device\n",
+ dev_data[count].dev_name);
+ }
+
+ return err;
+}
This would get much simpler if you just replaced the da8xx_pruss_devices
array with an mfd_cell array.
_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source