[PATCH v2 3/4] hwmon: tmp108: Add support for I3C device
Guenter Roeck
linux at roeck-us.net
Sat Nov 9 06:53:28 PST 2024
On 11/9/24 05:16, Jonathan Cameron wrote:
> On Fri, 08 Nov 2024 17:26:57 -0500
> Frank Li <Frank.Li at nxp.com> wrote:
>
>> Add support for I3C device in the tmp108 driver to handle the P3T1085
>> sensor. Register the I3C device driver to enable I3C functionality for the
>> sensor.
>>
>> Signed-off-by: Frank Li <Frank.Li at nxp.com>
>> ---
>> drivers/hwmon/tmp108.c | 31 +++++++++++++++++++++++++++++++
>> 1 file changed, 31 insertions(+)
>>
>> diff --git a/drivers/hwmon/tmp108.c b/drivers/hwmon/tmp108.c
>> index bfbea6349a95f..83d6847cb542c 100644
>> --- a/drivers/hwmon/tmp108.c
>> +++ b/drivers/hwmon/tmp108.c
>> @@ -13,6 +13,8 @@
>> #include <linux/mutex.h>
>> #include <linux/of.h>
>> #include <linux/i2c.h>
>> +#include <linux/i3c/device.h>
>> +#include <linux/i3c/master.h>
>
> Seems odd you need master.h in a device driver.
> I'll guess that's because you should be using i3cdev_to_device()
I assume you mean i3cdev_to_dev() ?
Good point, but there are not many examples to draw from. The one
existing iio driver (st_lsm6dsx) doesn't use it either. I'll send
a patch shortly to fix that to prevent others from making the same
mistake.
Thanks,
Guenter
More information about the linux-arm-kernel
mailing list