I am working on integrating TPS695190 regulator code into kernel version 4.4.16. The regulator powers MMC card slot using Designware MMC controller. I have declared the necessary code in my board.c file. The MMC card slot is powered by ldo8 supply declared as
-----------------------------------------------------------------------------Code---------------------------------------------------------------------------------
static struct regulator_consumer_supply opv5xc_ldo8_supply[] = {
REGULATOR_SUPPLY("sd_vdd", NULL),
};
static struct regulator_init_data opv5xc_ldo8 = {
.constraints = {
.min_uV = 1000000,
.max_uV = 3300000,
.valid_ops_mask = (REGULATOR_CHANGE_VOLTAGE |
REGULATOR_CHANGE_STATUS),
.boot_on = 1,
},
.num_consumer_supplies = ARRAY_SIZE(opv5xc_ldo8_supply),
.consumer_supplies = opv5xc_ldo8_supply,
};
static struct tps65910_board tps65910_pdata = {
.tps65910_pmic_init_data[TPS65911_REG_LDO8] = &opv5xc_ldo8,
};
static struct i2c_board_info __initdata opv5xc_i2c1_devs[] = {
{
I2C_BOARD_INFO ("tps65911", TPS65910_I2C_ID1),
.platform_data = &tps65910_pdata,
},
};
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
When I call regulator_get struct regulator *sd_vdd = regulator_get(NULL, "sd_vdd"); function from the Designware MMC driver code function the kernel panics.
I have attached the log file for reference. Can somebody please let me know what I am doing wrong here?
Regards,
Amit.