* IIO Driver for TMP117 Temperature sensor @ 2020-12-08 16:06 Puranjay Mohan 2020-12-09 8:11 ` Alexandru Ardelean 0 siblings, 1 reply; 10+ messages in thread From: Puranjay Mohan @ 2020-12-08 16:06 UTC (permalink / raw) To: linux-iio I have this TI's TMP117 sensor with me and I was thinking about writing an IIO driver for it as a hobby project. Is the IIO subsystem the correct place for this driver? if yes, can someone help me get started with this, I haven't written an IIO driver before. I have this sensor and also a raspberry pi with me for testing. -- Thanks and Regards Yours Truly, Puranjay Mohan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IIO Driver for TMP117 Temperature sensor 2020-12-08 16:06 IIO Driver for TMP117 Temperature sensor Puranjay Mohan @ 2020-12-09 8:11 ` Alexandru Ardelean 2020-12-09 19:48 ` Guenter Roeck 0 siblings, 1 reply; 10+ messages in thread From: Alexandru Ardelean @ 2020-12-09 8:11 UTC (permalink / raw) To: Puranjay Mohan; +Cc: linux-iio, linux-hwmon, Guenter Roeck On Tue, Dec 8, 2020 at 6:10 PM Puranjay Mohan <puranjay12@gmail.com> wrote: > > I have this TI's TMP117 sensor with me and I was thinking about writing an > IIO driver for it as a hobby project. Is the IIO subsystem the correct > place for this driver? if yes, can someone help me get started with this, > I haven't written an IIO driver before. I have this sensor and also a > raspberry pi with me for testing. This could also fit into drivers/hwmon. Looking at the HWMON subsystem there are more TMP drivers there (TMP102/103/108/401/513). The first 3 seem a bit more similar to TMP117 (in terms of register map). Let's see what others have to add. But, all-in-all whatever driver you end up writing, the easiest method is to copy an existing similar driver and extend it. Sometimes, a part can be added to an existing driver. At a quick scan through existing drivers, it doesn't look like TMP117 is similar to existing drivers, so it may require a new driver altogether. I may have missed something though. Thanks Alex > > -- > Thanks and Regards > > Yours Truly, > > Puranjay Mohan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IIO Driver for TMP117 Temperature sensor 2020-12-09 8:11 ` Alexandru Ardelean @ 2020-12-09 19:48 ` Guenter Roeck 2020-12-13 15:12 ` Jonathan Cameron 0 siblings, 1 reply; 10+ messages in thread From: Guenter Roeck @ 2020-12-09 19:48 UTC (permalink / raw) To: Alexandru Ardelean, Puranjay Mohan; +Cc: linux-iio, linux-hwmon On 12/9/20 12:11 AM, Alexandru Ardelean wrote: > On Tue, Dec 8, 2020 at 6:10 PM Puranjay Mohan <puranjay12@gmail.com> wrote: >> >> I have this TI's TMP117 sensor with me and I was thinking about writing an >> IIO driver for it as a hobby project. Is the IIO subsystem the correct >> place for this driver? if yes, can someone help me get started with this, >> I haven't written an IIO driver before. I have this sensor and also a >> raspberry pi with me for testing. > > This could also fit into drivers/hwmon. > Looking at the HWMON subsystem there are more TMP drivers there > (TMP102/103/108/401/513). > The first 3 seem a bit more similar to TMP117 (in terms of register map). > It would probably be better suited for hwmon (it has limit registers, suggesting a common use as hardware monitoring device). > Let's see what others have to add. > But, all-in-all whatever driver you end up writing, the easiest method > is to copy an existing similar driver and extend it. > Sometimes, a part can be added to an existing driver. > At a quick scan through existing drivers, it doesn't look like TMP117 > is similar to existing drivers, so it may require a new driver > altogether. I don't see an immediate match either, but the tmp102 hwmon driver might be a good start. Guenter > I may have missed something though. > > Thanks > Alex > >> >> -- >> Thanks and Regards >> >> Yours Truly, >> >> Puranjay Mohan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IIO Driver for TMP117 Temperature sensor 2020-12-09 19:48 ` Guenter Roeck @ 2020-12-13 15:12 ` Jonathan Cameron 2020-12-13 16:08 ` Guenter Roeck 0 siblings, 1 reply; 10+ messages in thread From: Jonathan Cameron @ 2020-12-13 15:12 UTC (permalink / raw) To: Guenter Roeck; +Cc: Alexandru Ardelean, Puranjay Mohan, linux-iio, linux-hwmon On Wed, 9 Dec 2020 11:48:40 -0800 Guenter Roeck <linux@roeck-us.net> wrote: > On 12/9/20 12:11 AM, Alexandru Ardelean wrote: > > On Tue, Dec 8, 2020 at 6:10 PM Puranjay Mohan <puranjay12@gmail.com> wrote: > >> > >> I have this TI's TMP117 sensor with me and I was thinking about writing an > >> IIO driver for it as a hobby project. Is the IIO subsystem the correct > >> place for this driver? if yes, can someone help me get started with this, > >> I haven't written an IIO driver before. I have this sensor and also a > >> raspberry pi with me for testing. > > > > This could also fit into drivers/hwmon. > > Looking at the HWMON subsystem there are more TMP drivers there > > (TMP102/103/108/401/513). > > The first 3 seem a bit more similar to TMP117 (in terms of register map). > > > > It would probably be better suited for hwmon (it has limit registers, > suggesting a common use as hardware monitoring device). It is a curious part. I suspect TI based their design for a medical grade digital thermometer chip on an existing hwmon part. The limit registers are very simple so could be supported by IIO. This sits somewhere in the middle of high end thermocouple chips which tend to be in IIO and typically lower accuracy / range hwmon parts. It's in the fuzzy borderline region so I doubt anyone would raise strong objections to which subsystem it was in. Guenter has fallen on the hwmon side of things and I'm fine with that. Jonathan > > > Let's see what others have to add. > > But, all-in-all whatever driver you end up writing, the easiest method > > is to copy an existing similar driver and extend it. > > Sometimes, a part can be added to an existing driver. > > At a quick scan through existing drivers, it doesn't look like TMP117 > > is similar to existing drivers, so it may require a new driver > > altogether. > > I don't see an immediate match either, but the tmp102 hwmon driver > might be a good start. > > Guenter > > > I may have missed something though. > > > > Thanks > > Alex > > > >> > >> -- > >> Thanks and Regards > >> > >> Yours Truly, > >> > >> Puranjay Mohan > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IIO Driver for TMP117 Temperature sensor 2020-12-13 15:12 ` Jonathan Cameron @ 2020-12-13 16:08 ` Guenter Roeck 2020-12-13 16:50 ` Jonathan Cameron 2020-12-13 20:10 ` Puranjay Mohan 0 siblings, 2 replies; 10+ messages in thread From: Guenter Roeck @ 2020-12-13 16:08 UTC (permalink / raw) To: Jonathan Cameron Cc: Alexandru Ardelean, Puranjay Mohan, linux-iio, linux-hwmon On 12/13/20 7:12 AM, Jonathan Cameron wrote: > On Wed, 9 Dec 2020 11:48:40 -0800 > Guenter Roeck <linux@roeck-us.net> wrote: > >> On 12/9/20 12:11 AM, Alexandru Ardelean wrote: >>> On Tue, Dec 8, 2020 at 6:10 PM Puranjay Mohan <puranjay12@gmail.com> wrote: >>>> >>>> I have this TI's TMP117 sensor with me and I was thinking about writing an >>>> IIO driver for it as a hobby project. Is the IIO subsystem the correct >>>> place for this driver? if yes, can someone help me get started with this, >>>> I haven't written an IIO driver before. I have this sensor and also a >>>> raspberry pi with me for testing. >>> >>> This could also fit into drivers/hwmon. >>> Looking at the HWMON subsystem there are more TMP drivers there >>> (TMP102/103/108/401/513). >>> The first 3 seem a bit more similar to TMP117 (in terms of register map). >>> >> >> It would probably be better suited for hwmon (it has limit registers, >> suggesting a common use as hardware monitoring device). > It is a curious part. I suspect TI based their design for a medical grade > digital thermometer chip on an existing hwmon part. > > The limit registers are very simple so could be supported by IIO. > This sits somewhere in the middle of high end thermocouple chips which > tend to be in IIO and typically lower accuracy / range hwmon parts. > > It's in the fuzzy borderline region so I doubt anyone would raise strong > objections to which subsystem it was in. Guenter has fallen on the > hwmon side of things and I'm fine with that. > On the other side, it turns out that there is already tmp107 support in iio, and tmp107 is pretty much the spi equivalent of the same chip. So it really depends on the use case. If the user wants to use the iio subsystem, I am fine with it. We just need to remind people that this implies no or only limited hwmon support. [ I really need to spend the time to write a hwmon->iio bridge. The iio->hwmon bridge is a bit limited - I have not been able to figure out how to support limit registers (or event values) and events, and I don't think it is possible. ] Guenter > Jonathan > >> >>> Let's see what others have to add. >>> But, all-in-all whatever driver you end up writing, the easiest method >>> is to copy an existing similar driver and extend it. >>> Sometimes, a part can be added to an existing driver. >>> At a quick scan through existing drivers, it doesn't look like TMP117 >>> is similar to existing drivers, so it may require a new driver >>> altogether. >> >> I don't see an immediate match either, but the tmp102 hwmon driver >> might be a good start. >> >> Guenter >> >>> I may have missed something though. >>> >>> Thanks >>> Alex >>> >>>> >>>> -- >>>> Thanks and Regards >>>> >>>> Yours Truly, >>>> >>>> Puranjay Mohan >> > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IIO Driver for TMP117 Temperature sensor 2020-12-13 16:08 ` Guenter Roeck @ 2020-12-13 16:50 ` Jonathan Cameron 2020-12-13 20:14 ` Puranjay Mohan 2020-12-13 20:10 ` Puranjay Mohan 1 sibling, 1 reply; 10+ messages in thread From: Jonathan Cameron @ 2020-12-13 16:50 UTC (permalink / raw) To: Guenter Roeck; +Cc: Alexandru Ardelean, Puranjay Mohan, linux-iio, linux-hwmon On Sun, 13 Dec 2020 08:08:26 -0800 Guenter Roeck <linux@roeck-us.net> wrote: > On 12/13/20 7:12 AM, Jonathan Cameron wrote: > > On Wed, 9 Dec 2020 11:48:40 -0800 > > Guenter Roeck <linux@roeck-us.net> wrote: > > > >> On 12/9/20 12:11 AM, Alexandru Ardelean wrote: > >>> On Tue, Dec 8, 2020 at 6:10 PM Puranjay Mohan <puranjay12@gmail.com> wrote: > >>>> > >>>> I have this TI's TMP117 sensor with me and I was thinking about writing an > >>>> IIO driver for it as a hobby project. Is the IIO subsystem the correct > >>>> place for this driver? if yes, can someone help me get started with this, > >>>> I haven't written an IIO driver before. I have this sensor and also a > >>>> raspberry pi with me for testing. > >>> > >>> This could also fit into drivers/hwmon. > >>> Looking at the HWMON subsystem there are more TMP drivers there > >>> (TMP102/103/108/401/513). > >>> The first 3 seem a bit more similar to TMP117 (in terms of register map). > >>> > >> > >> It would probably be better suited for hwmon (it has limit registers, > >> suggesting a common use as hardware monitoring device). > > It is a curious part. I suspect TI based their design for a medical grade > > digital thermometer chip on an existing hwmon part. > > > > The limit registers are very simple so could be supported by IIO. > > This sits somewhere in the middle of high end thermocouple chips which > > tend to be in IIO and typically lower accuracy / range hwmon parts. > > > > It's in the fuzzy borderline region so I doubt anyone would raise strong > > objections to which subsystem it was in. Guenter has fallen on the > > hwmon side of things and I'm fine with that. > > > > On the other side, it turns out that there is already tmp107 support > in iio, and tmp107 is pretty much the spi equivalent of the same chip. > So it really depends on the use case. If the user wants to use the iio > subsystem, I am fine with it. We just need to remind people that this > implies no or only limited hwmon support. > > [ I really need to spend the time to write a hwmon->iio bridge. > The iio->hwmon bridge is a bit limited - I have not been able to > figure out how to support limit registers (or event values) > and events, and I don't think it is possible. ] So far IIO doesn't have an in kernel consumer interface for events. It shouldn't be that hard to add one though and it has been on the todo list for a very long time. We've discussed it a few times and concluded that there are some short cuts such as sending all events to all consumers and relying on the receiver to do any necessary filtering. It's a bit messy but it makes for much simpler core code. Maybe I'll get bored enough over xmas to look at it... Jonathan > > Guenter > > > Jonathan > > > >> > >>> Let's see what others have to add. > >>> But, all-in-all whatever driver you end up writing, the easiest method > >>> is to copy an existing similar driver and extend it. > >>> Sometimes, a part can be added to an existing driver. > >>> At a quick scan through existing drivers, it doesn't look like TMP117 > >>> is similar to existing drivers, so it may require a new driver > >>> altogether. > >> > >> I don't see an immediate match either, but the tmp102 hwmon driver > >> might be a good start. > >> > >> Guenter > >> > >>> I may have missed something though. > >>> > >>> Thanks > >>> Alex > >>> > >>>> > >>>> -- > >>>> Thanks and Regards > >>>> > >>>> Yours Truly, > >>>> > >>>> Puranjay Mohan > >> > > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IIO Driver for TMP117 Temperature sensor 2020-12-13 16:50 ` Jonathan Cameron @ 2020-12-13 20:14 ` Puranjay Mohan 2020-12-14 15:10 ` Jonathan Cameron 0 siblings, 1 reply; 10+ messages in thread From: Puranjay Mohan @ 2020-12-13 20:14 UTC (permalink / raw) To: Jonathan Cameron Cc: Guenter Roeck, Alexandru Ardelean, linux-iio, linux-hwmon On Sun, Dec 13, 2020 at 10:20 PM Jonathan Cameron <jic23@kernel.org> wrote: > > On Sun, 13 Dec 2020 08:08:26 -0800 > Guenter Roeck <linux@roeck-us.net> wrote: > > > On 12/13/20 7:12 AM, Jonathan Cameron wrote: > > > On Wed, 9 Dec 2020 11:48:40 -0800 > > > Guenter Roeck <linux@roeck-us.net> wrote: > > > > > >> On 12/9/20 12:11 AM, Alexandru Ardelean wrote: > > >>> On Tue, Dec 8, 2020 at 6:10 PM Puranjay Mohan <puranjay12@gmail.com> wrote: > > >>>> > > >>>> I have this TI's TMP117 sensor with me and I was thinking about writing an > > >>>> IIO driver for it as a hobby project. Is the IIO subsystem the correct > > >>>> place for this driver? if yes, can someone help me get started with this, > > >>>> I haven't written an IIO driver before. I have this sensor and also a > > >>>> raspberry pi with me for testing. > > >>> > > >>> This could also fit into drivers/hwmon. > > >>> Looking at the HWMON subsystem there are more TMP drivers there > > >>> (TMP102/103/108/401/513). > > >>> The first 3 seem a bit more similar to TMP117 (in terms of register map). > > >>> > > >> > > >> It would probably be better suited for hwmon (it has limit registers, > > >> suggesting a common use as hardware monitoring device). > > > It is a curious part. I suspect TI based their design for a medical grade > > > digital thermometer chip on an existing hwmon part. > > > > > > The limit registers are very simple so could be supported by IIO. > > > This sits somewhere in the middle of high end thermocouple chips which > > > tend to be in IIO and typically lower accuracy / range hwmon parts. > > > > > > It's in the fuzzy borderline region so I doubt anyone would raise strong > > > objections to which subsystem it was in. Guenter has fallen on the > > > hwmon side of things and I'm fine with that. > > > > > > > On the other side, it turns out that there is already tmp107 support > > in iio, and tmp107 is pretty much the spi equivalent of the same chip. > > So it really depends on the use case. If the user wants to use the iio > > subsystem, I am fine with it. We just need to remind people that this > > implies no or only limited hwmon support. > > > > [ I really need to spend the time to write a hwmon->iio bridge. > > The iio->hwmon bridge is a bit limited - I have not been able to > > figure out how to support limit registers (or event values) > > and events, and I don't think it is possible. ] > > So far IIO doesn't have an in kernel consumer interface for > events. It shouldn't be that hard to add one though and it > has been on the todo list for a very long time. We've discussed > it a few times and concluded that there are some short cuts such > as sending all events to all consumers and relying on the receiver > to do any necessary filtering. It's a bit messy but it makes for > much simpler core code. > > Maybe I'll get bored enough over xmas to look at it... > Hi Jonathan, Where can I access this TODO list, I would like to do some tasks on it. I am a novice but I might be able to solve the easier tasks. > Jonathan > > > > > Guenter > > > > > Jonathan > > > > > >> > > >>> Let's see what others have to add. > > >>> But, all-in-all whatever driver you end up writing, the easiest method > > >>> is to copy an existing similar driver and extend it. > > >>> Sometimes, a part can be added to an existing driver. > > >>> At a quick scan through existing drivers, it doesn't look like TMP117 > > >>> is similar to existing drivers, so it may require a new driver > > >>> altogether. > > >> > > >> I don't see an immediate match either, but the tmp102 hwmon driver > > >> might be a good start. > > >> > > >> Guenter > > >> > > >>> I may have missed something though. > > >>> > > >>> Thanks > > >>> Alex > > >>> > > >>>> > > >>>> -- > > >>>> Thanks and Regards > > >>>> > > >>>> Yours Truly, > > >>>> > > >>>> Puranjay Mohan > > >> > > > > > > -- Thanks and Regards Yours Truly, Puranjay Mohan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IIO Driver for TMP117 Temperature sensor 2020-12-13 20:14 ` Puranjay Mohan @ 2020-12-14 15:10 ` Jonathan Cameron 0 siblings, 0 replies; 10+ messages in thread From: Jonathan Cameron @ 2020-12-14 15:10 UTC (permalink / raw) To: Puranjay Mohan Cc: Jonathan Cameron, Guenter Roeck, Alexandru Ardelean, linux-iio, linux-hwmon On Mon, 14 Dec 2020 01:44:20 +0530 Puranjay Mohan <puranjay12@gmail.com> wrote: > On Sun, Dec 13, 2020 at 10:20 PM Jonathan Cameron <jic23@kernel.org> wrote: > > > > On Sun, 13 Dec 2020 08:08:26 -0800 > > Guenter Roeck <linux@roeck-us.net> wrote: > > > > > On 12/13/20 7:12 AM, Jonathan Cameron wrote: > > > > On Wed, 9 Dec 2020 11:48:40 -0800 > > > > Guenter Roeck <linux@roeck-us.net> wrote: > > > > > > > >> On 12/9/20 12:11 AM, Alexandru Ardelean wrote: > > > >>> On Tue, Dec 8, 2020 at 6:10 PM Puranjay Mohan <puranjay12@gmail.com> wrote: > > > >>>> > > > >>>> I have this TI's TMP117 sensor with me and I was thinking about writing an > > > >>>> IIO driver for it as a hobby project. Is the IIO subsystem the correct > > > >>>> place for this driver? if yes, can someone help me get started with this, > > > >>>> I haven't written an IIO driver before. I have this sensor and also a > > > >>>> raspberry pi with me for testing. > > > >>> > > > >>> This could also fit into drivers/hwmon. > > > >>> Looking at the HWMON subsystem there are more TMP drivers there > > > >>> (TMP102/103/108/401/513). > > > >>> The first 3 seem a bit more similar to TMP117 (in terms of register map). > > > >>> > > > >> > > > >> It would probably be better suited for hwmon (it has limit registers, > > > >> suggesting a common use as hardware monitoring device). > > > > It is a curious part. I suspect TI based their design for a medical grade > > > > digital thermometer chip on an existing hwmon part. > > > > > > > > The limit registers are very simple so could be supported by IIO. > > > > This sits somewhere in the middle of high end thermocouple chips which > > > > tend to be in IIO and typically lower accuracy / range hwmon parts. > > > > > > > > It's in the fuzzy borderline region so I doubt anyone would raise strong > > > > objections to which subsystem it was in. Guenter has fallen on the > > > > hwmon side of things and I'm fine with that. > > > > > > > > > > On the other side, it turns out that there is already tmp107 support > > > in iio, and tmp107 is pretty much the spi equivalent of the same chip. > > > So it really depends on the use case. If the user wants to use the iio > > > subsystem, I am fine with it. We just need to remind people that this > > > implies no or only limited hwmon support. > > > > > > [ I really need to spend the time to write a hwmon->iio bridge. > > > The iio->hwmon bridge is a bit limited - I have not been able to > > > figure out how to support limit registers (or event values) > > > and events, and I don't think it is possible. ] > > > > So far IIO doesn't have an in kernel consumer interface for > > events. It shouldn't be that hard to add one though and it > > has been on the todo list for a very long time. We've discussed > > it a few times and concluded that there are some short cuts such > > as sending all events to all consumers and relying on the receiver > > to do any necessary filtering. It's a bit messy but it makes for > > much simpler core code. > > > > Maybe I'll get bored enough over xmas to look at it... > > > > Hi Jonathan, > Where can I access this TODO list, I would like to do some tasks on it. > I am a novice but I might be able to solve the easier tasks. Sadly I'm rubbish at keeping an up to date list. So this tends to be scattered across numerous ancient discussions. I do occasionally send out such a document, though I haven't done so for some time. I'll see if I can do a refresh sometime in next month or so. Thanks, Jonathan > > > Jonathan > > > > > > > > Guenter > > > > > > > Jonathan > > > > > > > >> > > > >>> Let's see what others have to add. > > > >>> But, all-in-all whatever driver you end up writing, the easiest method > > > >>> is to copy an existing similar driver and extend it. > > > >>> Sometimes, a part can be added to an existing driver. > > > >>> At a quick scan through existing drivers, it doesn't look like TMP117 > > > >>> is similar to existing drivers, so it may require a new driver > > > >>> altogether. > > > >> > > > >> I don't see an immediate match either, but the tmp102 hwmon driver > > > >> might be a good start. > > > >> > > > >> Guenter > > > >> > > > >>> I may have missed something though. > > > >>> > > > >>> Thanks > > > >>> Alex > > > >>> > > > >>>> > > > >>>> -- > > > >>>> Thanks and Regards > > > >>>> > > > >>>> Yours Truly, > > > >>>> > > > >>>> Puranjay Mohan > > > >> > > > > > > > > > > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IIO Driver for TMP117 Temperature sensor 2020-12-13 16:08 ` Guenter Roeck 2020-12-13 16:50 ` Jonathan Cameron @ 2020-12-13 20:10 ` Puranjay Mohan 2020-12-14 15:11 ` Jonathan Cameron 1 sibling, 1 reply; 10+ messages in thread From: Puranjay Mohan @ 2020-12-13 20:10 UTC (permalink / raw) To: Guenter Roeck Cc: Jonathan Cameron, Alexandru Ardelean, linux-iio, linux-hwmon On Sun, Dec 13, 2020 at 9:38 PM Guenter Roeck <linux@roeck-us.net> wrote: > > On 12/13/20 7:12 AM, Jonathan Cameron wrote: > > On Wed, 9 Dec 2020 11:48:40 -0800 > > Guenter Roeck <linux@roeck-us.net> wrote: > > > >> On 12/9/20 12:11 AM, Alexandru Ardelean wrote: > >>> On Tue, Dec 8, 2020 at 6:10 PM Puranjay Mohan <puranjay12@gmail.com> wrote: > >>>> > >>>> I have this TI's TMP117 sensor with me and I was thinking about writing an > >>>> IIO driver for it as a hobby project. Is the IIO subsystem the correct > >>>> place for this driver? if yes, can someone help me get started with this, > >>>> I haven't written an IIO driver before. I have this sensor and also a > >>>> raspberry pi with me for testing. > >>> > >>> This could also fit into drivers/hwmon. > >>> Looking at the HWMON subsystem there are more TMP drivers there > >>> (TMP102/103/108/401/513). > >>> The first 3 seem a bit more similar to TMP117 (in terms of register map). > >>> > >> > >> It would probably be better suited for hwmon (it has limit registers, > >> suggesting a common use as hardware monitoring device). > > It is a curious part. I suspect TI based their design for a medical grade > > digital thermometer chip on an existing hwmon part. > > > > The limit registers are very simple so could be supported by IIO. > > This sits somewhere in the middle of high end thermocouple chips which > > tend to be in IIO and typically lower accuracy / range hwmon parts. > > > > It's in the fuzzy borderline region so I doubt anyone would raise strong > > objections to which subsystem it was in. Guenter has fallen on the > > hwmon side of things and I'm fine with that. > > > > On the other side, it turns out that there is already tmp107 support > in iio, and tmp107 is pretty much the spi equivalent of the same chip. Yes, you are right, tmp107 is very similar to tmp117, but it is less accurate and it doesn't include the OFFSET functionality. Actually, I had seen the tmp107 register in IIO and thought that tmp117 should go in IIO, hence, I wrote this email. So, is it fine if I write the IIO driver for this sensor? Actually, this will just be a hobby project for me so It doesn't bother me if it goes in hwmon or IIO. > So it really depends on the use case. If the user wants to use the iio > subsystem, I am fine with it. We just need to remind people that this > implies no or only limited hwmon support. > > [ I really need to spend the time to write a hwmon->iio bridge. > The iio->hwmon bridge is a bit limited - I have not been able to > figure out how to support limit registers (or event values) > and events, and I don't think it is possible. ] > > Guenter > > > Jonathan > > > >> > >>> Let's see what others have to add. > >>> But, all-in-all whatever driver you end up writing, the easiest method > >>> is to copy an existing similar driver and extend it. > >>> Sometimes, a part can be added to an existing driver. > >>> At a quick scan through existing drivers, it doesn't look like TMP117 > >>> is similar to existing drivers, so it may require a new driver > >>> altogether. > >> > >> I don't see an immediate match either, but the tmp102 hwmon driver > >> might be a good start. > >> > >> Guenter > >> > >>> I may have missed something though. > >>> > >>> Thanks > >>> Alex > >>> > >>>> > >>>> -- > >>>> Thanks and Regards > >>>> > >>>> Yours Truly, > >>>> > >>>> Puranjay Mohan > >> > > > -- Thanks and Regards Yours Truly, Puranjay Mohan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: IIO Driver for TMP117 Temperature sensor 2020-12-13 20:10 ` Puranjay Mohan @ 2020-12-14 15:11 ` Jonathan Cameron 0 siblings, 0 replies; 10+ messages in thread From: Jonathan Cameron @ 2020-12-14 15:11 UTC (permalink / raw) To: Puranjay Mohan Cc: Guenter Roeck, Jonathan Cameron, Alexandru Ardelean, linux-iio, linux-hwmon On Mon, 14 Dec 2020 01:40:32 +0530 Puranjay Mohan <puranjay12@gmail.com> wrote: > On Sun, Dec 13, 2020 at 9:38 PM Guenter Roeck <linux@roeck-us.net> wrote: > > > > On 12/13/20 7:12 AM, Jonathan Cameron wrote: > > > On Wed, 9 Dec 2020 11:48:40 -0800 > > > Guenter Roeck <linux@roeck-us.net> wrote: > > > > > >> On 12/9/20 12:11 AM, Alexandru Ardelean wrote: > > >>> On Tue, Dec 8, 2020 at 6:10 PM Puranjay Mohan <puranjay12@gmail.com> wrote: > > >>>> > > >>>> I have this TI's TMP117 sensor with me and I was thinking about writing an > > >>>> IIO driver for it as a hobby project. Is the IIO subsystem the correct > > >>>> place for this driver? if yes, can someone help me get started with this, > > >>>> I haven't written an IIO driver before. I have this sensor and also a > > >>>> raspberry pi with me for testing. > > >>> > > >>> This could also fit into drivers/hwmon. > > >>> Looking at the HWMON subsystem there are more TMP drivers there > > >>> (TMP102/103/108/401/513). > > >>> The first 3 seem a bit more similar to TMP117 (in terms of register map). > > >>> > > >> > > >> It would probably be better suited for hwmon (it has limit registers, > > >> suggesting a common use as hardware monitoring device). > > > It is a curious part. I suspect TI based their design for a medical grade > > > digital thermometer chip on an existing hwmon part. > > > > > > The limit registers are very simple so could be supported by IIO. > > > This sits somewhere in the middle of high end thermocouple chips which > > > tend to be in IIO and typically lower accuracy / range hwmon parts. > > > > > > It's in the fuzzy borderline region so I doubt anyone would raise strong > > > objections to which subsystem it was in. Guenter has fallen on the > > > hwmon side of things and I'm fine with that. > > > > > > > On the other side, it turns out that there is already tmp107 support > > in iio, and tmp107 is pretty much the spi equivalent of the same chip. > > Yes, you are right, tmp107 is very similar to tmp117, but it is less accurate > and it doesn't include the OFFSET functionality. Actually, I had seen the > tmp107 register in IIO and thought that tmp117 should go in IIO, > hence, I wrote this email. > > So, is it fine if I write the IIO driver for this sensor? Actually, > this will just > be a hobby project for me so It doesn't bother me if it goes in hwmon or IIO. Sounds good to me. Jonathan > > > So it really depends on the use case. If the user wants to use the iio > > subsystem, I am fine with it. We just need to remind people that this > > implies no or only limited hwmon support. > > > > [ I really need to spend the time to write a hwmon->iio bridge. > > The iio->hwmon bridge is a bit limited - I have not been able to > > figure out how to support limit registers (or event values) > > and events, and I don't think it is possible. ] > > > > Guenter > > > > > Jonathan > > > > > >> > > >>> Let's see what others have to add. > > >>> But, all-in-all whatever driver you end up writing, the easiest method > > >>> is to copy an existing similar driver and extend it. > > >>> Sometimes, a part can be added to an existing driver. > > >>> At a quick scan through existing drivers, it doesn't look like TMP117 > > >>> is similar to existing drivers, so it may require a new driver > > >>> altogether. > > >> > > >> I don't see an immediate match either, but the tmp102 hwmon driver > > >> might be a good start. > > >> > > >> Guenter > > >> > > >>> I may have missed something though. > > >>> > > >>> Thanks > > >>> Alex > > >>> > > >>>> > > >>>> -- > > >>>> Thanks and Regards > > >>>> > > >>>> Yours Truly, > > >>>> > > >>>> Puranjay Mohan > > >> > > > > > > > ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-12-14 15:12 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-12-08 16:06 IIO Driver for TMP117 Temperature sensor Puranjay Mohan 2020-12-09 8:11 ` Alexandru Ardelean 2020-12-09 19:48 ` Guenter Roeck 2020-12-13 15:12 ` Jonathan Cameron 2020-12-13 16:08 ` Guenter Roeck 2020-12-13 16:50 ` Jonathan Cameron 2020-12-13 20:14 ` Puranjay Mohan 2020-12-14 15:10 ` Jonathan Cameron 2020-12-13 20:10 ` Puranjay Mohan 2020-12-14 15:11 ` Jonathan Cameron
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).