void __init *wm8994_platform_data(void *info) { struct i2c_board_info *i2c_info = (struct i2c_board_info *)info; int irq = 0; if ((INTEL_MID_BOARD(1, PHONE, MRFL)) || (INTEL_MID_BOARD(1, TABLET, MRFL)) || (INTEL_MID_BOARD(1, PHONE, MOFD)) || (INTEL_MID_BOARD(1, TABLET, MOFD))) { platform_add_devices(wm8958_reg_devices, ARRAY_SIZE(wm8958_reg_devices)); irq = wm8994_get_irq_data(&wm8994_pdata, i2c_info, "audiocodec_int"); if (irq < 0) return NULL; } else if ((SPID_PRODUCT(INTEL, CLVTP, PHONE, RHB)) || (SPID_PRODUCT(INTEL, CLVT, TABLET, TBD))) { platform_add_devices(wm1811a_reg_devices, ARRAY_SIZE(wm1811a_reg_devices)); i2c_info->addr = 0x1a; } else { pr_err("Not supported....\n"); return NULL; } return &wm8994_pdata; }
void __init *wm8994_platform_data(void *info) { struct i2c_board_info *i2c_info = (struct i2c_board_info *)info; int irq = 0, ret = 0; struct wm8994_pdata *pdata = &wm8994_pdata; if ((INTEL_MID_BOARD(1, PHONE, MRFL)) || (INTEL_MID_BOARD(1, TABLET, MRFL))) { platform_add_devices(wm8958_reg_devices, ARRAY_SIZE(wm8958_reg_devices)); irq = wm8994_get_irq_data(pdata, i2c_info, "audiocodec_int"); if (irq < 0) return NULL; } else if ((INTEL_MID_BOARD(1, PHONE, MOFD)) || (INTEL_MID_BOARD(1, TABLET, MOFD))) { platform_add_devices(wm8958_reg_devices, ARRAY_SIZE(wm8958_reg_devices)); /* if it is not VV, then use PR pdata */ if (!(SPID_PRODUCT(INTEL, MOFD, PHONE, MP))) { pdata = &wm8994_mofd_pr_pdata; ret = wm8994_fill_mofd_pr_data(pdata); if (ret < 0) return NULL; } irq = wm8994_get_irq_data(pdata, i2c_info, "audiocodec_int"); if (irq < 0) return NULL; } else if ((SPID_PRODUCT(INTEL, CLVTP, PHONE, RHB)) || (SPID_PRODUCT(INTEL, CLVT, TABLET, TBD))) { platform_add_devices(wm1811a_reg_devices, ARRAY_SIZE(wm1811a_reg_devices)); i2c_info->addr = 0x1a; } else { pr_err("Not supported....\n"); return NULL; } return pdata; }