Beispiel #1
0
int32_t s5k6a1gx_i2c_probe(struct i2c_client *client,
	const struct i2c_device_id *id)
{
	int	rc = 0;
	pr_info("%s\n", __func__);
	rc = msm_sensor_i2c_probe(client, id);
	if(rc >= 0)
		s5k6a1gx_sysfs_init();
	pr_info("%s: rc(%d)\n", __func__, rc);
	return rc;
}
static int __init s5k6a1gx_init_module(void)
{
	int32_t rc = 0;
	pr_info("%s:%d\n", __func__, __LINE__);
	pr_info("s5k6a1gx_init_module");
	rc = platform_driver_probe(&s5k6a1gx_platform_driver,
		s5k6a1gx_platform_probe);
	if (!rc) {
		s5k6a1gx_sysfs_init();
		return rc;
	}
	pr_err("%s:%d rc %d\n", __func__, __LINE__, rc);
	return i2c_add_driver(&s5k6a1gx_i2c_driver);
}