#include <linux/spinlock.h>
#include <linux/mfd/core.h>
#include <linux/mfd/glamo.h>
-#include <linux/spi/glamo.h>
-#include <linux/glamo-gpio.h>
#include <linux/glamofb.h>
#include <linux/io.h>
spin_unlock(&glamo->lock);
}
+static int __reg_write_batch(struct glamo_core *glamo,
+ uint16_t start, size_t num, uint16_t *regs)
+{
+ int end = start + num * 2
+ for(end = start + num * 2; start < end; start += 2, ++regs) {
+ *regs = __reg_read(glamo, start);
+ }
+}
+
static inline void __reg_set_bit(struct glamo_core *glamo,
u_int16_t reg, u_int16_t bit)
{
glamo_pll_rate(glamo, GLAMO_PLL1),
glamo_pll_rate(glamo, GLAMO_PLL2));
- /* register siblings */
- glamo->pdata->mmc_data->core = glamo;
- glamo_cells[GLAMO_CELL_MMC].platform_data = glamo->pdata->mmc_data;
- glamo_cells[GLAMO_CELL_MMC].data_size =
- sizeof(struct glamo_mmc_platform_data);
-
- glamo->pdata->fb_data->core = glamo;
- glamo_cells[GLAMO_CELL_FB].platform_data = glamo->pdata->fb_data;
- glamo_cells[GLAMO_CELL_FB].data_size = sizeof(struct glamo_fb_platform_data);
-
mfd_add_devices(&pdev->dev, pdev->id, glamo_cells,
ARRAY_SIZE(glamo_cells),
glamo->mem, 0);