[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<AM8PR10MB472146AA446E64C63DE3BF31CD862@AM8PR10MB4721.EURPRD10.PROD.OUTLOOK.COM>
Date: Tue, 13 Aug 2024 13:54:02 +0000
From: "Shen Jianping (ME-SE/EAD2)" <Jianping.Shen@...bosch.com>
To: Krzysztof Kozlowski <krzk@...nel.org>, "jic23@...nel.org"
<jic23@...nel.org>, "lars@...afoo.de" <lars@...afoo.de>, "robh@...nel.org"
<robh@...nel.org>, "krzk+dt@...nel.org" <krzk+dt@...nel.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>, "dima.fedrau@...il.com"
<dima.fedrau@...il.com>, "marcelo.schmitt1@...il.com"
<marcelo.schmitt1@...il.com>, "linux-iio@...r.kernel.org"
<linux-iio@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "Lorenz Christian (ME-SE/EAD2)"
<Christian.Lorenz3@...bosch.com>, "Frauendorf Ulrike (ME/PJ-SW3)"
<Ulrike.Frauendorf@...bosch.com>, "Dolde Kai (ME-SE/PAE-A3)"
<Kai.Dolde@...bosch.com>
Subject: RE: [PATCH v2 2/2] iio: imu: smi240: imu driver
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@...bosch.com>");
>>> +MODULE_AUTHOR("Stefan Gutmann <stefan.gutmann@...bosch.com>");
>>> +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
Powered by blists - more mailing lists