.platform_data = &mma8452_info,
},
#endif
-#if defined (CONFIG_SENSORS_AK8973)
+#if defined (CONFIG_COMPASS_AK8973)
{
.type = "ak8973",
.addr = 0x1d,
.irq = RK29_PIN0_PA4,
},
#endif
-#if defined (CONFIG_SENSORS_AK8975)
+#if defined (CONFIG_COMPASS_AK8975)
{
.type = "ak8975",
.addr = 0x1d,
[1] = {
.name = "gpu_base",
.start = RK29_GPU_PHYS,
- .end = RK29_GPU_PHYS + RK29_GPU_PHYS_SIZE,
+ .end = RK29_GPU_PHYS + RK29_GPU_SIZE,
.flags = IORESOURCE_MEM,
},
[2] = {
{
.name = "spi0 cs0",
.cs_gpio = RK29_PIN2_PC1,
- .cs_iomux_name = NULL,
+ .cs_iomux_name = GPIO2C1_SPI0CSN0_NAME,
+ .cs_iomux_mode = GPIO2H_SPI0_CSN0,
},
{
.name = "spi0 cs1",
{
.name = "spi1 cs0",
.cs_gpio = RK29_PIN2_PC5,
- .cs_iomux_name = NULL,
+ .cs_iomux_name = GPIO2C5_SPI1CSN0_NAME,
+ .cs_iomux_mode = GPIO2H_SPI1_CSN0,
},
{
.name = "spi1 cs1",
static int spi_io_init(struct spi_cs_gpio *cs_gpios, int cs_num)
{
#if 1
- int i,j,ret;
-
- //cs
+ int i;
if (cs_gpios) {
for (i=0; i<cs_num; i++) {
rk29_mux_api_set(cs_gpios[i].cs_iomux_name, cs_gpios[i].cs_iomux_mode);
- ret = gpio_request(cs_gpios[i].cs_gpio, cs_gpios[i].name);
- if (ret) {
- for (j=0;j<i;j++) {
- gpio_free(cs_gpios[j].cs_gpio);
- //rk29_mux_api_mode_resume(cs_gpios[j].cs_iomux_name);
- }
- printk("[fun:%s, line:%d], gpio request err\n", __func__, __LINE__);
- return -1;
- }
- gpio_direction_output(cs_gpios[i].cs_gpio, GPIO_HIGH);
}
}
#endif
static int spi_io_deinit(struct spi_cs_gpio *cs_gpios, int cs_num)
{
-#if 1
- int i;
-
- if (cs_gpios) {
- for (i=0; i<cs_num; i++) {
- gpio_free(cs_gpios[i].cs_gpio);
- //rk29_mux_api_mode_resume(cs_gpios[i].cs_iomux_name);
- }
- }
-#endif
return 0;
}