On Sat, 9 Nov 2024 06:53:28 -0800 Guenter Roeck <linux@xxxxxxxxxxxx> wrote: > On 11/9/24 05:16, Jonathan Cameron wrote: > > On Fri, 08 Nov 2024 17:26:57 -0500 > > Frank Li <Frank.Li@xxxxxxx> 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@xxxxxxx> > >> --- > >> 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() ? > Indeed! :( > 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. Excellent. > > Thanks, > Guenter >