mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
phonepad:modify tps65910 gpio base
This commit is contained in:
@@ -600,6 +600,7 @@ void __sramfunc board_pmu_tps65910_resume(void)
|
||||
static struct tps65910_board tps65910_data = {
|
||||
.irq = (unsigned)TPS65910_HOST_IRQ,
|
||||
.irq_base = NR_GIC_IRQS + NR_GPIO_IRQS,
|
||||
.gpio_base = TPS65910_GPIO_EXPANDER_BASE,
|
||||
|
||||
.pre_init = tps65910_pre_init,
|
||||
.post_init = tps65910_post_init,
|
||||
|
||||
@@ -40,23 +40,34 @@
|
||||
#else
|
||||
#define TCA6424_TOTOL_GPIO_NUM 0
|
||||
#define TCA6424_TOTOL_GPIO_IRQ_NUM 0
|
||||
#define TCA6424_GPIO_EXPANDER_BASE GPIO_EXPANDER_BASE
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_GPIO_WM831X)
|
||||
#define WM831X_TOTOL_GPIO_NUM 12
|
||||
#define WM831X_GPIO_EXPANDER_BASE (GPIO_EXPANDER_BASE+TCA6424_TOTOL_GPIO_NUM)
|
||||
#define WM831X_GPIO_EXPANDER_BASE (TCA6424_GPIO_EXPANDER_BASE+TCA6424_TOTOL_GPIO_NUM)
|
||||
#else
|
||||
#define WM831X_TOTOL_GPIO_NUM 0
|
||||
#define WM831X_GPIO_EXPANDER_BASE (GPIO_EXPANDER_BASE+TCA6424_TOTOL_GPIO_NUM)
|
||||
#define WM831X_GPIO_EXPANDER_BASE (TCA6424_GPIO_EXPANDER_BASE+TCA6424_TOTOL_GPIO_NUM)
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_GPIO_WM8994)
|
||||
#define CONFIG_GPIO_WM8994_NUM 11
|
||||
#define WM8994_GPIO_EXPANDER_BASE (GPIO_EXPANDER_BASE+WM831X_TOTOL_GPIO_NUM)
|
||||
#define WM8994_GPIO_EXPANDER_BASE (WM831X_GPIO_EXPANDER_BASE+WM831X_TOTOL_GPIO_NUM)
|
||||
#else
|
||||
#define CONFIG_GPIO_WM8994_NUM 0
|
||||
#define WM8994_GPIO_EXPANDER_BASE (WM831X_GPIO_EXPANDER_BASE+WM831X_TOTOL_GPIO_NUM)
|
||||
#endif
|
||||
|
||||
#if defined (CONFIG_GPIO_TPS65910)
|
||||
#define CONFIG_GPIO_TPS65910_NUM 9
|
||||
#define TPS65910_GPIO_EXPANDER_BASE (WM8994_GPIO_EXPANDER_BASE+CONFIG_GPIO_WM8994_NUM)
|
||||
#else
|
||||
#define CONFIG_GPIO_TPS65910_NUM 0
|
||||
#define TPS65910_GPIO_EXPANDER_BASE (WM8994_GPIO_EXPANDER_BASE+CONFIG_GPIO_WM8994_NUM)
|
||||
#endif
|
||||
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>GPIO<49><4F>PIN<49><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF>CONFIG_SPI_FPGA_GPIO_NUM<55><4D>ʾFPGA<47><41>PIN<49><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define ARCH_NR_GPIOS (PIN_BASE + RK30_TOTOL_GPIO_NUM + TCA6424_TOTOL_GPIO_NUM + WM831X_TOTOL_GPIO_NUM + CONFIG_SPI_FPGA_GPIO_NUM+CONFIG_GPIO_WM8994_NUM)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ static struct mfd_cell tps65910s[] = {
|
||||
},
|
||||
};
|
||||
|
||||
#define TPS65910_SPEED 400 * 1000
|
||||
#define TPS65910_SPEED 200 * 1000
|
||||
|
||||
static int tps65910_i2c_read(struct tps65910 *tps65910, u8 reg,
|
||||
int bytes, void *dest)
|
||||
@@ -51,14 +51,14 @@ static int tps65910_i2c_read(struct tps65910 *tps65910, u8 reg,
|
||||
xfer[0].flags = 0;
|
||||
xfer[0].len = 1;
|
||||
xfer[0].buf = ®
|
||||
xfer[0].scl_rate = 200*1000;
|
||||
xfer[0].scl_rate = TPS65910_SPEED;
|
||||
|
||||
/* Read data */
|
||||
xfer[1].addr = i2c->addr;
|
||||
xfer[1].flags = I2C_M_RD;
|
||||
xfer[1].len = bytes;
|
||||
xfer[1].buf = dest;
|
||||
xfer[1].scl_rate = 200*1000;
|
||||
xfer[1].scl_rate = TPS65910_SPEED;
|
||||
|
||||
ret = i2c_transfer(i2c->adapter, xfer, 2);
|
||||
//for(i=0;i<bytes;i++)
|
||||
@@ -292,7 +292,7 @@ static int tps65910_i2c_probe(struct i2c_client *i2c,
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
printk("%s:irq=%d,irq_base=%d\n",__func__,init_data->irq,init_data->irq_base);
|
||||
printk("%s:irq=%d,irq_base=%d,gpio_base=%d\n",__func__,init_data->irq,init_data->irq_base,pmic_plat_data->gpio_base);
|
||||
return ret;
|
||||
|
||||
err:
|
||||
|
||||
Reference in New Issue
Block a user