Example #1
0
void *max17042_platform_data(void *info)
{
	static struct max17042_platform_data platform_data;

	init_tgain_toff(&platform_data);
	init_callbacks(&platform_data);
	init_platform_params(&platform_data);
	init_platform_thresholds(&platform_data);

	if (smip)
		iounmap(smip);
	return &platform_data;
}
void *max17042_platform_data(void *info)
{
	static struct max17042_platform_data platform_data;
	struct i2c_board_info *i2c_info = (struct i2c_board_info *)info;
	int intr = get_gpio_by_name("max_fg_alert");

	if (!INTEL_MID_BOARD(1, TABLET, BYT))
		i2c_info->irq = intr + INTEL_MID_IRQ_OFFSET;

	init_tgain_toff(&platform_data);
	init_callbacks(&platform_data);
	init_platform_params(&platform_data);
	init_platform_thresholds(&platform_data);

	if (smip)
		iounmap(smip);
	return &platform_data;
}
void *max17042_platform_data(void *info)
{
	static struct max17042_platform_data platform_data;
	struct i2c_board_info *i2c_info = (struct i2c_board_info *)info;
	int intr = get_gpio_by_name("max_fg_alert");

#ifndef CONFIG_ACPI
	if (i2c_info)
		i2c_info->irq = intr + INTEL_MID_IRQ_OFFSET;
#endif

	init_tgain_toff(&platform_data);
	init_callbacks(&platform_data);
	init_platform_params(&platform_data);
	init_platform_thresholds(&platform_data);

	if (smip)
		iounmap(smip);
	return &platform_data;
}