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

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

 



Hi

On 09/08/2024 13:16, Jianping.Shen@xxxxxxxxxxxx wrote:
> From: "Shen Jianping (ME-SE/EAD2)" <Jianping.Shen@xxxxxxxxxxxx>
> 
> iio: imu: smi240: driver improvements

?????
Did not get your point, what is wrong here? how it shall be?

> Signed-off-by: Shen Jianping (ME-SE/EAD2) <Jianping.Shen@xxxxxxxxxxxx>
> ---
> 


...

> +	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?



> +
> +static const struct spi_device_id smi240_spi_id[] = { { "smi240", 0 
> +}, {} };

Don't wrap it.

We don't , git send-mail did it automatically for us. 


> +MODULE_DEVICE_TABLE(spi, smi240_spi_id);
> +
> +static const struct of_device_id smi240_of_match[] = {
> +	{ .compatible = "bosch,smi240" },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(of, smi240_of_match);
> +
> +static struct spi_driver smi240_spi_driver = {
> +	.probe = smi240_spi_probe,
> +	.id_table = smi240_spi_id,
> +	.driver = {
> +		.of_match_table = of_match_ptr(smi240_of_match),

Why did it appear? You introduce now warnings.

Did not get your point, why we introduce now warnings here ?


Best regards,
Jianping Shen





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux