public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: sht15 kernel driver
       [not found] <521E7CA7.5060407@snapithd.com>
@ 2013-08-28 23:08 ` Jerome Oufella
  2013-08-29  3:18   ` Chris Rodley
  0 siblings, 1 reply; 5+ messages in thread
From: Jerome Oufella @ 2013-08-28 23:08 UTC (permalink / raw)
  To: Chris Rodley; +Cc: kernel, linux-kernel, lm-sensors

Chris Rodley <chris@snapithd.com> writes:

> Hi,
>
> I am trying to get a sht75 humidity and temperature sensor working
> with the linux kernel module in 3.2.
> Is there a code example for application code that you have available?
>
> Many thanks,

Hi Chris,

There was much less support for the sht15 back in 3.2 compared to recent
kernel releases. You may want to backport features and/or fixes to suit
your needs.

You can find a usage example for 3.2 in arch/arm/mach-pxa/stargate2.c
around line 140:

First, create a platform data struct and specify which GPIO lines are
hooked to the data and sck lines of your sht-15:
 
 static struct sht15_platform_data platform_data_sht15 = {
        .gpio_data =  100,
        .gpio_sck  =  98,
 };

Then setup a platform device referencing those platform data, that you
will have to register on the platform bus using platform_add_devices()
or equivalent:

 static struct platform_device sht15 = {
        .name = "sht15",
        .id = -1,
        .dev = {
                .platform_data = &platform_data_sht15,
        },
 };

 ...

 platform_add_devices(...);



Cheers,
-- 
Jérôme Oufella
@: jerome.oufella@savoirfairelinux.com
T: 514-276-5468 ext. 125

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

* Re: sht15 kernel driver
  2013-08-28 23:08 ` sht15 kernel driver Jerome Oufella
@ 2013-08-29  3:18   ` Chris Rodley
  2013-08-29 15:02     ` Jerome Oufella
  0 siblings, 1 reply; 5+ messages in thread
From: Chris Rodley @ 2013-08-29  3:18 UTC (permalink / raw)
  To: Jerome Oufella; +Cc: kernel, linux-kernel, lm-sensors

Thanks Jerome!

That was just what I needed to know.
The device is now set up and is working well - I will have a go at back 
porting now.

Many thanks again for your help!
Chris

On 29/08/13 11:08, Jerome Oufella wrote:
>> Hi,
>>
>> I am trying to get a sht75 humidity and temperature sensor working
>> with the linux kernel module in 3.2.
>> Is there a code example for application code that you have available?
>>
>> Many thanks,
> Hi Chris,
>
> There was much less support for the sht15 back in 3.2 compared to recent
> kernel releases. You may want to backport features and/or fixes to suit
> your needs.
>
> You can find a usage example for 3.2 in arch/arm/mach-pxa/stargate2.c
> around line 140:
>
> First, create a platform data struct and specify which GPIO lines are
> hooked to the data and sck lines of your sht-15:
>   
>   static struct sht15_platform_data platform_data_sht15 = {
>          .gpio_data =  100,
>          .gpio_sck  =  98,
>   };
>
> Then setup a platform device referencing those platform data, that you
> will have to register on the platform bus using platform_add_devices()
> or equivalent:
>
>   static struct platform_device sht15 = {
>          .name = "sht15",
>          .id = -1,
>          .dev = {
>                  .platform_data = &platform_data_sht15,
>          },
>   };
>
>   ...
>
>   platform_add_devices(...);
>
>
>
> Cheers,


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

* Re: sht15 kernel driver
  2013-08-29  3:18   ` Chris Rodley
@ 2013-08-29 15:02     ` Jerome Oufella
  2013-08-29 15:28       ` [lm-sensors] " Guenter Roeck
  2013-08-29 21:58       ` Chris Rodley
  0 siblings, 2 replies; 5+ messages in thread
From: Jerome Oufella @ 2013-08-29 15:02 UTC (permalink / raw)
  To: Chris Rodley; +Cc: kernel, linux-kernel, lm-sensors

Chris Rodley <chris@snapithd.com> writes:

> Thanks Jerome!
>
> That was just what I needed to know.
> The device is now set up and is working well - I will have a go at
> back porting now.
>
> Many thanks again for your help!
> Chris

Good to know Chris!

Note, we noticed that the sht15 driver may be sensible to noisy lines,
we suspect a race condition around the interrupt handling code.

If your sensor is populated on the board you shouldn't have problems
though.

Jerome

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

* Re: [lm-sensors] sht15 kernel driver
  2013-08-29 15:02     ` Jerome Oufella
@ 2013-08-29 15:28       ` Guenter Roeck
  2013-08-29 21:58       ` Chris Rodley
  1 sibling, 0 replies; 5+ messages in thread
From: Guenter Roeck @ 2013-08-29 15:28 UTC (permalink / raw)
  To: Jerome Oufella; +Cc: Chris Rodley, kernel, linux-kernel, lm-sensors

On Thu, Aug 29, 2013 at 11:02:16AM -0400, Jerome Oufella wrote:
> Chris Rodley <chris@snapithd.com> writes:
> 
> > Thanks Jerome!
> >
> > That was just what I needed to know.
> > The device is now set up and is working well - I will have a go at
> > back porting now.
> >
> > Many thanks again for your help!
> > Chris
> 
> Good to know Chris!
> 
> Note, we noticed that the sht15 driver may be sensible to noisy lines,
> we suspect a race condition around the interrupt handling code.
> 
Any proposed fixes ?

Guenter

> If your sensor is populated on the board you shouldn't have problems
> though.
> 
> Jerome
> 
> _______________________________________________
> lm-sensors mailing list
> lm-sensors@lm-sensors.org
> http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
> 

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

* Re: sht15 kernel driver
  2013-08-29 15:02     ` Jerome Oufella
  2013-08-29 15:28       ` [lm-sensors] " Guenter Roeck
@ 2013-08-29 21:58       ` Chris Rodley
  1 sibling, 0 replies; 5+ messages in thread
From: Chris Rodley @ 2013-08-29 21:58 UTC (permalink / raw)
  To: Jerome Oufella; +Cc: kernel, linux-kernel, lm-sensors

On 30/08/13 03:02, Jerome Oufella wrote:
> Chris Rodley <chris@snapithd.com> writes:
>> Thanks Jerome!
>>
>> That was just what I needed to know.
>> The device is now set up and is working well - I will have a go at
>> back porting now.
>>
>> Many thanks again for your help!
>> Chris
> Good to know Chris!
>
> Note, we noticed that the sht15 driver may be sensible to noisy lines,
> we suspect a race condition around the interrupt handling code.
>
> If your sensor is populated on the board you shouldn't have problems
> though.
>
> Jerome

Hi,

We have it working really well .. not noticing any issues - so far at least.
It is being populated more or less directly on the board - just via a 
daughter board in the prototype phase.
So I might not see the same issues.

If we find anything I will submit it back to you.

Many thanks again for your advice!
Chris

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

end of thread, other threads:[~2013-08-29 21:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <521E7CA7.5060407@snapithd.com>
2013-08-28 23:08 ` sht15 kernel driver Jerome Oufella
2013-08-29  3:18   ` Chris Rodley
2013-08-29 15:02     ` Jerome Oufella
2013-08-29 15:28       ` [lm-sensors] " Guenter Roeck
2013-08-29 21:58       ` Chris Rodley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox