All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: MCP9808 iio or hwmon
       [not found] ` <CAEnQRZBZcQZRYGbk-6Eh5sN7_D90HTZPPo=uOSSZF2obB5VD+w@mail.gmail.com>
@ 2016-06-14  8:22   ` Daniel Baluta
  2016-06-14 13:27     ` Guenter Roeck
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Baluta @ 2016-06-14  8:22 UTC (permalink / raw)
  To: Alison Schofield
  Cc: Daniel Baluta, linux-iio, linux-hwmon, Jonathan Cameron, Guenter Roeck

[fixing IIO, hwmon lists emails]

On Tue, Jun 14, 2016 at 11:20 AM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
> On Tue, Jun 14, 2016 at 1:08 AM, Alison Schofield <amsfield22@gmail.com> wrote:
>>
>> I was working on an iio driver for MCP9808 when Jonathan took notice
>> and suggested we have the iio or hwmon discussion.
>>
>> So, where should this sensor driver reside?
>>
>> http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf
>>
>> It's a digital temp sensor with user programmable registers for
>> sensing applications.  Supports shutdown, low power modes,
>> specifying of event & critical output boundaries.  Can support
>> 8 sensors on a single serial bus. Touted as 'ideal for sophisticated
>> multi-zone temperature-monitoring applications.'
>
> This is debatable, looking to the datasheet this driver could reside
> in both places.
>
> Because this sensor has Industrial utility (e.g freezers, refrigerators) I
> am inclined to say we should support it in IIO.
>
> Any other opinions?
>
> thanks,
> Daniel.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MCP9808 iio or hwmon
  2016-06-14  8:22   ` MCP9808 iio or hwmon Daniel Baluta
@ 2016-06-14 13:27     ` Guenter Roeck
  2016-06-21 22:26       ` Alison Schofield
  0 siblings, 1 reply; 8+ messages in thread
From: Guenter Roeck @ 2016-06-14 13:27 UTC (permalink / raw)
  To: Daniel Baluta, Alison Schofield; +Cc: linux-iio, linux-hwmon, Jonathan Cameron

On 06/14/2016 01:22 AM, Daniel Baluta wrote:
> [fixing IIO, hwmon lists emails]
>
> On Tue, Jun 14, 2016 at 11:20 AM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
>> On Tue, Jun 14, 2016 at 1:08 AM, Alison Schofield <amsfield22@gmail.com> wrote:
>>>
>>> I was working on an iio driver for MCP9808 when Jonathan took notice
>>> and suggested we have the iio or hwmon discussion.
>>>
>>> So, where should this sensor driver reside?
>>>
>>> http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf
>>>
>>> It's a digital temp sensor with user programmable registers for
>>> sensing applications.  Supports shutdown, low power modes,
>>> specifying of event & critical output boundaries.  Can support
>>> 8 sensors on a single serial bus. Touted as 'ideal for sophisticated
>>> multi-zone temperature-monitoring applications.'
>>
>> This is debatable, looking to the datasheet this driver could reside
>> in both places.
>>
>> Because this sensor has Industrial utility (e.g freezers, refrigerators) I
>> am inclined to say we should support it in IIO.
>>

Literally every sensor has that utility.

Alternatively, you might consider adding its device ID to the jc42 driver.
If you want to be fancy, you could add optional support for resolution
selection to the driver.

Guenter


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MCP9808 iio or hwmon
  2016-06-14 13:27     ` Guenter Roeck
@ 2016-06-21 22:26       ` Alison Schofield
  2016-06-21 23:42         ` Guenter Roeck
  0 siblings, 1 reply; 8+ messages in thread
From: Alison Schofield @ 2016-06-21 22:26 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Daniel Baluta, linux-iio, linux-hwmon, Jonathan Cameron

On Tue, Jun 14, 2016 at 06:27:50AM -0700, Guenter Roeck wrote:
> On 06/14/2016 01:22 AM, Daniel Baluta wrote:
> >[fixing IIO, hwmon lists emails]
> >
> >On Tue, Jun 14, 2016 at 11:20 AM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
> >>On Tue, Jun 14, 2016 at 1:08 AM, Alison Schofield <amsfield22@gmail.com> wrote:
> >>>
> >>>I was working on an iio driver for MCP9808 when Jonathan took notice
> >>>and suggested we have the iio or hwmon discussion.
> >>>
> >>>So, where should this sensor driver reside?
> >>>
> >>>http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf
> >>>
> >>>It's a digital temp sensor with user programmable registers for
> >>>sensing applications.  Supports shutdown, low power modes,
> >>>specifying of event & critical output boundaries.  Can support
> >>>8 sensors on a single serial bus. Touted as 'ideal for sophisticated
> >>>multi-zone temperature-monitoring applications.'
> >>
> >>This is debatable, looking to the datasheet this driver could reside
> >>in both places.
> >>
> >>Because this sensor has Industrial utility (e.g freezers, refrigerators) I
> >>am inclined to say we should support it in IIO.
> >>
> 
> Literally every sensor has that utility.
> 
> Alternatively, you might consider adding its device ID to the jc42 driver.
> If you want to be fancy, you could add optional support for resolution
> selection to the driver.
> 
> Guenter

Hi Guenter,
I'm using the mcp9808 with the jc42 driver by instantiating it.

I've added the device ID info so that the .detect callback can recognize
it, but can't figure out how to test that.  When/how does that .detect
get called?  I am using the Diolan.

Thanks,
alisons

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MCP9808 iio or hwmon
  2016-06-21 22:26       ` Alison Schofield
@ 2016-06-21 23:42         ` Guenter Roeck
  2016-06-25  0:36           ` Alison Schofield
  0 siblings, 1 reply; 8+ messages in thread
From: Guenter Roeck @ 2016-06-21 23:42 UTC (permalink / raw)
  To: Alison Schofield; +Cc: Daniel Baluta, linux-iio, linux-hwmon, Jonathan Cameron

On Tue, Jun 21, 2016 at 03:26:11PM -0700, Alison Schofield wrote:
> On Tue, Jun 14, 2016 at 06:27:50AM -0700, Guenter Roeck wrote:
> > On 06/14/2016 01:22 AM, Daniel Baluta wrote:
> > >[fixing IIO, hwmon lists emails]
> > >
> > >On Tue, Jun 14, 2016 at 11:20 AM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
> > >>On Tue, Jun 14, 2016 at 1:08 AM, Alison Schofield <amsfield22@gmail.com> wrote:
> > >>>
> > >>>I was working on an iio driver for MCP9808 when Jonathan took notice
> > >>>and suggested we have the iio or hwmon discussion.
> > >>>
> > >>>So, where should this sensor driver reside?
> > >>>
> > >>>http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf
> > >>>
> > >>>It's a digital temp sensor with user programmable registers for
> > >>>sensing applications.  Supports shutdown, low power modes,
> > >>>specifying of event & critical output boundaries.  Can support
> > >>>8 sensors on a single serial bus. Touted as 'ideal for sophisticated
> > >>>multi-zone temperature-monitoring applications.'
> > >>
> > >>This is debatable, looking to the datasheet this driver could reside
> > >>in both places.
> > >>
> > >>Because this sensor has Industrial utility (e.g freezers, refrigerators) I
> > >>am inclined to say we should support it in IIO.
> > >>
> > 
> > Literally every sensor has that utility.
> > 
> > Alternatively, you might consider adding its device ID to the jc42 driver.
> > If you want to be fancy, you could add optional support for resolution
> > selection to the driver.
> > 
> > Guenter
> 
> Hi Guenter,
> I'm using the mcp9808 with the jc42 driver by instantiating it.
> 
> I've added the device ID info so that the .detect callback can recognize
> it, but can't figure out how to test that.  When/how does that .detect
> get called?  I am using the Diolan.
> 
Not sure if it works, but try to load the the jc42 driver using modprobe
first, and _then_ insert the diolan adapter.

Guenter

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MCP9808 iio or hwmon
  2016-06-21 23:42         ` Guenter Roeck
@ 2016-06-25  0:36           ` Alison Schofield
  2016-06-25  2:11             ` Guenter Roeck
  0 siblings, 1 reply; 8+ messages in thread
From: Alison Schofield @ 2016-06-25  0:36 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Daniel Baluta, linux-iio, linux-hwmon, Jonathan Cameron

On Tue, Jun 21, 2016 at 04:42:46PM -0700, Guenter Roeck wrote:
> On Tue, Jun 21, 2016 at 03:26:11PM -0700, Alison Schofield wrote:
> > On Tue, Jun 14, 2016 at 06:27:50AM -0700, Guenter Roeck wrote:
> > > On 06/14/2016 01:22 AM, Daniel Baluta wrote:
> > > >[fixing IIO, hwmon lists emails]
> > > >
> > > >On Tue, Jun 14, 2016 at 11:20 AM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
> > > >>On Tue, Jun 14, 2016 at 1:08 AM, Alison Schofield <amsfield22@gmail.com> wrote:
> > > >>>
> > > >>>I was working on an iio driver for MCP9808 when Jonathan took notice
> > > >>>and suggested we have the iio or hwmon discussion.
> > > >>>
> > > >>>So, where should this sensor driver reside?
> > > >>>
> > > >>>http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf
> > > >>>
> > > >>>It's a digital temp sensor with user programmable registers for
> > > >>>sensing applications.  Supports shutdown, low power modes,
> > > >>>specifying of event & critical output boundaries.  Can support
> > > >>>8 sensors on a single serial bus. Touted as 'ideal for sophisticated
> > > >>>multi-zone temperature-monitoring applications.'
> > > >>
> > > >>This is debatable, looking to the datasheet this driver could reside
> > > >>in both places.
> > > >>
> > > >>Because this sensor has Industrial utility (e.g freezers, refrigerators) I
> > > >>am inclined to say we should support it in IIO.
> > > >>
> > > 
> > > Literally every sensor has that utility.
> > > 
> > > Alternatively, you might consider adding its device ID to the jc42 driver.
> > > If you want to be fancy, you could add optional support for resolution
> > > selection to the driver.
> > > 
> > > Guenter
> > 
> > Hi Guenter,
> > I'm using the mcp9808 with the jc42 driver by instantiating it.
> > 
> > I've added the device ID info so that the .detect callback can recognize
> > it, but can't figure out how to test that.  When/how does that .detect
> > get called?  I am using the Diolan.
> > 
> Not sure if it works, but try to load the the jc42 driver using modprobe
> first, and _then_ insert the diolan adapter.
> 
> Guenter

Finally got it!  I had to add I2C_CLASS_SPD (jc42's class) to Diolan and
then follow the order you suggested.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MCP9808 iio or hwmon
  2016-06-25  0:36           ` Alison Schofield
@ 2016-06-25  2:11             ` Guenter Roeck
  2016-06-27 19:13               ` Alison Schofield
  0 siblings, 1 reply; 8+ messages in thread
From: Guenter Roeck @ 2016-06-25  2:11 UTC (permalink / raw)
  To: Alison Schofield; +Cc: Daniel Baluta, linux-iio, linux-hwmon, Jonathan Cameron

On 06/24/2016 05:36 PM, Alison Schofield wrote:
> On Tue, Jun 21, 2016 at 04:42:46PM -0700, Guenter Roeck wrote:
>> On Tue, Jun 21, 2016 at 03:26:11PM -0700, Alison Schofield wrote:
>>> On Tue, Jun 14, 2016 at 06:27:50AM -0700, Guenter Roeck wrote:
>>>> On 06/14/2016 01:22 AM, Daniel Baluta wrote:
>>>>> [fixing IIO, hwmon lists emails]
>>>>>
>>>>> On Tue, Jun 14, 2016 at 11:20 AM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
>>>>>> On Tue, Jun 14, 2016 at 1:08 AM, Alison Schofield <amsfield22@gmail.com> wrote:
>>>>>>>
>>>>>>> I was working on an iio driver for MCP9808 when Jonathan took notice
>>>>>>> and suggested we have the iio or hwmon discussion.
>>>>>>>
>>>>>>> So, where should this sensor driver reside?
>>>>>>>
>>>>>>> http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf
>>>>>>>
>>>>>>> It's a digital temp sensor with user programmable registers for
>>>>>>> sensing applications.  Supports shutdown, low power modes,
>>>>>>> specifying of event & critical output boundaries.  Can support
>>>>>>> 8 sensors on a single serial bus. Touted as 'ideal for sophisticated
>>>>>>> multi-zone temperature-monitoring applications.'
>>>>>>
>>>>>> This is debatable, looking to the datasheet this driver could reside
>>>>>> in both places.
>>>>>>
>>>>>> Because this sensor has Industrial utility (e.g freezers, refrigerators) I
>>>>>> am inclined to say we should support it in IIO.
>>>>>>
>>>>
>>>> Literally every sensor has that utility.
>>>>
>>>> Alternatively, you might consider adding its device ID to the jc42 driver.
>>>> If you want to be fancy, you could add optional support for resolution
>>>> selection to the driver.
>>>>
>>>> Guenter
>>>
>>> Hi Guenter,
>>> I'm using the mcp9808 with the jc42 driver by instantiating it.
>>>
>>> I've added the device ID info so that the .detect callback can recognize
>>> it, but can't figure out how to test that.  When/how does that .detect
>>> get called?  I am using the Diolan.
>>>
>> Not sure if it works, but try to load the the jc42 driver using modprobe
>> first, and _then_ insert the diolan adapter.
>>
>> Guenter
>
> Finally got it!  I had to add I2C_CLASS_SPD (jc42's class) to Diolan and
> then follow the order you suggested.
>

Great. Can you send a patch for the jc42 driver ?

Thanks,
Guenter



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MCP9808 iio or hwmon
  2016-06-25  2:11             ` Guenter Roeck
@ 2016-06-27 19:13               ` Alison Schofield
  2016-06-27 20:40                 ` Guenter Roeck
  0 siblings, 1 reply; 8+ messages in thread
From: Alison Schofield @ 2016-06-27 19:13 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Daniel Baluta, linux-iio, linux-hwmon, Jonathan Cameron

On Fri, Jun 24, 2016 at 07:11:45PM -0700, Guenter Roeck wrote:
> On 06/24/2016 05:36 PM, Alison Schofield wrote:
> >On Tue, Jun 21, 2016 at 04:42:46PM -0700, Guenter Roeck wrote:
> >>On Tue, Jun 21, 2016 at 03:26:11PM -0700, Alison Schofield wrote:
> >>>On Tue, Jun 14, 2016 at 06:27:50AM -0700, Guenter Roeck wrote:
> >>>>On 06/14/2016 01:22 AM, Daniel Baluta wrote:
> >>>>>[fixing IIO, hwmon lists emails]
> >>>>>
> >>>>>On Tue, Jun 14, 2016 at 11:20 AM, Daniel Baluta <daniel.baluta@gmail.com> wrote:
> >>>>>>On Tue, Jun 14, 2016 at 1:08 AM, Alison Schofield <amsfield22@gmail.com> wrote:
> >>>>>>>
> >>>>>>>I was working on an iio driver for MCP9808 when Jonathan took notice
> >>>>>>>and suggested we have the iio or hwmon discussion.
> >>>>>>>
> >>>>>>>So, where should this sensor driver reside?
> >>>>>>>
> >>>>>>>http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf
> >>>>>>>
> >>>>>>>It's a digital temp sensor with user programmable registers for
> >>>>>>>sensing applications.  Supports shutdown, low power modes,
> >>>>>>>specifying of event & critical output boundaries.  Can support
> >>>>>>>8 sensors on a single serial bus. Touted as 'ideal for sophisticated
> >>>>>>>multi-zone temperature-monitoring applications.'
> >>>>>>
> >>>>>>This is debatable, looking to the datasheet this driver could reside
> >>>>>>in both places.
> >>>>>>
> >>>>>>Because this sensor has Industrial utility (e.g freezers, refrigerators) I
> >>>>>>am inclined to say we should support it in IIO.
> >>>>>>
> >>>>
> >>>>Literally every sensor has that utility.
> >>>>
> >>>>Alternatively, you might consider adding its device ID to the jc42 driver.
> >>>>If you want to be fancy, you could add optional support for resolution
> >>>>selection to the driver.
> >>>>
> >>>>Guenter
> >>>
> >>>Hi Guenter,
> >>>I'm using the mcp9808 with the jc42 driver by instantiating it.
> >>>
> >>>I've added the device ID info so that the .detect callback can recognize
> >>>it, but can't figure out how to test that.  When/how does that .detect
> >>>get called?  I am using the Diolan.
> >>>
> >>Not sure if it works, but try to load the the jc42 driver using modprobe
> >>first, and _then_ insert the diolan adapter.
> >>
> >>Guenter
> >
> >Finally got it!  I had to add I2C_CLASS_SPD (jc42's class) to Diolan and
> >then follow the order you suggested.
> >
> 
> Great. Can you send a patch for the jc42 driver ?
> 
> Thanks,
> Guenter
> 
Guenther,

I have the patch, but am stumbling on the changelog.

I hoped to simply state in the changelog that MCP9808 is a jc-42
compliant sensor, but I don't think it's 100% true, and I'm not
sure of where it falls short of compliance.

jc42 currently supports these Microchip sensors:
MCP9804, MCP9805, MCP98242, MCP98243, MCP98244, MCP9843

All, with the exception of 9804 (and my 9808), clearly state they
are jc-42 compliant in their datasheet.

9804 is 9808's twin and I've tested with 9808.

Wondering if the non-compliance has to do with the lack of a capability
register for 9804 & 9808, which doesn't affect the drivers functioning.

Appreciate your advice on how to submit this correctly. Thanks!

alisons 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: MCP9808 iio or hwmon
  2016-06-27 19:13               ` Alison Schofield
@ 2016-06-27 20:40                 ` Guenter Roeck
  0 siblings, 0 replies; 8+ messages in thread
From: Guenter Roeck @ 2016-06-27 20:40 UTC (permalink / raw)
  To: Alison Schofield; +Cc: Daniel Baluta, linux-iio, linux-hwmon, Jonathan Cameron

On Mon, Jun 27, 2016 at 12:13:19PM -0700, Alison Schofield wrote:

[ ... ]

> > 
> > Great. Can you send a patch for the jc42 driver ?
> > 
> > Thanks,
> > Guenter
> > 
> Guenther,
> 
> I have the patch, but am stumbling on the changelog.
> 
> I hoped to simply state in the changelog that MCP9808 is a jc-42
> compliant sensor, but I don't think it's 100% true, and I'm not
> sure of where it falls short of compliance.
> 
> jc42 currently supports these Microchip sensors:
> MCP9804, MCP9805, MCP98242, MCP98243, MCP98244, MCP9843
> 
> All, with the exception of 9804 (and my 9808), clearly state they
> are jc-42 compliant in their datasheet.
> 
> 9804 is 9808's twin and I've tested with 9808.
> 
> Wondering if the non-compliance has to do with the lack of a capability
> register for 9804 & 9808, which doesn't affect the drivers functioning.
> 

The capabilities register is there, it is just not officially supported.
It does report useful values, though, at least as far as we need it.
The chip does have a resolution register, which doesn't exist in JC-42.

"
hwmon: (jc42) Add support for Microchip MCP9808

MCP9808 is not officially compliant to JC-42, similar to MCP9804,
but its registers are compatible to JC-42.
"

is good enough. If you want to be fancy, add "The sensor resolution
register is not currently supported".

Hope this helps,

Guenter

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-06-27 20:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20160613220843.GA4235@d830.WORKGROUP>
     [not found] ` <CAEnQRZBZcQZRYGbk-6Eh5sN7_D90HTZPPo=uOSSZF2obB5VD+w@mail.gmail.com>
2016-06-14  8:22   ` MCP9808 iio or hwmon Daniel Baluta
2016-06-14 13:27     ` Guenter Roeck
2016-06-21 22:26       ` Alison Schofield
2016-06-21 23:42         ` Guenter Roeck
2016-06-25  0:36           ` Alison Schofield
2016-06-25  2:11             ` Guenter Roeck
2016-06-27 19:13               ` Alison Schofield
2016-06-27 20:40                 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.