Re: [PATCH v2 3/4] hwmon: tmp108: Add support for I3C device

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

 



On 11/9/24 07:15, Jonathan Cameron wrote:
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.

In this context, are you by any chance aware of an USB<->I3C adapter
wit decent price point ? With more I3C devices becoming available, I'd
like to be able to test at least some of the code with real hardware.
For I2C I use the Devantech USB-ISS adapter, but I have not yet found
anything comparable for I3C, at least nothing that is affordable.

Thanks,
Guenter





[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