RE: [PATCH v2 2/2] iio: imu: smi240: imu driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
...
>>> +	ret = regmap_read(data->regmap, SMI240_CHIP_ID_REG, &response);
>>> +	if (ret)
>>> +		return dev_err_probe(dev, ret, "Read chip id failed\n");
>>> +
>>> +	if (response != SMI240_CHIP_ID)
>>> +		dev_info(dev, "Unknown chip id: 0x%04x\n", response);
>>> +
>>> +	ret = smi240_init(data);
>>> +	if (ret)
>>> +		return dev_err_probe(dev, ret,
>>> +				     "Device initialization failed\n");
>>> +
>>> +	indio_dev->channels = smi240_channels;
>>> +	indio_dev->num_channels = ARRAY_SIZE(smi240_channels);
>>> +	indio_dev->name = "smi240";
>>> +	indio_dev->modes = INDIO_DIRECT_MODE;
>>> +	indio_dev->info = &smi240_info;
>>> +
>>> +	ret = devm_iio_triggered_buffer_setup(dev, indio_dev,
>>> +					      iio_pollfunc_store_time,
>>> +					      smi240_trigger_handler, NULL);
>>> +	if (ret)
>>> +		return dev_err_probe(dev, ret,
>>> +				     "Setup triggered buffer failed\n");
>>> +
>>> +	ret = devm_iio_device_register(dev, indio_dev);
>>> +	if (ret)
>>> +		return dev_err_probe(dev, ret, "Register IIO device failed\n");
>>> +
>>> +	return 0;
>>> +}
>>> +EXPORT_SYMBOL_GPL(smi240_core_probe);
>>> +
>>> +MODULE_AUTHOR("Markus Lochmann <markus.lochmann@xxxxxxxxxxxx>");
>>> +MODULE_AUTHOR("Stefan Gutmann <stefan.gutmann@xxxxxxxxxxxx>");
>>> +MODULE_DESCRIPTION("Bosch SMI240 driver"); MODULE_LICENSE("Dual
>>> +BSD/GPL");
>>
>> Hm? How many modules do you have here? What are their names?
>>
>> We have one module, named  "Bosch SMI240 driver". Any problem here?
>
>Yes, you put MODULE_* to how many files? Two? Three? Why is it needed
>everywhere?

We put MODULE_* in all the *.c , just like the other IMU drivers already in source tree. They do the same.


Best regards,
Jianping Shen




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux