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Y2luZyB0aG9zZSBwbGF0Zm9y bSBkYXRhLCB0aGF0IHlvdQp3aWxsIGhhdmUgdG8gcmVnaXN0ZXIgb24gdGhlIHBsYXRmb3JtIGJ1 cyB1c2luZyBwbGF0Zm9ybV9hZGRfZGV2aWNlcygpCm9yIGVxdWl2YWxlbnQ6Cgogc3RhdGljIHN0 cnVjdCBwbGF0Zm9ybV9kZXZpY2Ugc2h0MTUgPSB7CiAgICAgICAgLm5hbWUgPSAic2h0MTUiLAog ICAgICAgIC5pZCA9IC0xLAogICAgICAgIC5kZXYgPSB7CiAgICAgICAgICAgICAgICAucGxhdGZv cm1fZGF0YSA9ICZwbGF0Zm9ybV9kYXRhX3NodDE1LAogICAgICAgIH0sCiB9OwoKIC4uLgoKIHBs YXRmb3JtX2FkZF9kZXZpY2VzKC4uLik7CgoKCkNoZWVycywKLS0gCkrDqXLDtG1lIE91ZmVsbGEK QDogamVyb21lLm91ZmVsbGFAc2F2b2lyZmFpcmVsaW51eC5jb20KVDogNTE0LTI3Ni01NDY4IGV4 dC4gMTI1CgpfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwps bS1zZW5zb3JzIG1haWxpbmcgbGlzdApsbS1zZW5zb3JzQGxtLXNlbnNvcnMub3JnCmh0dHA6Ly9s aXN0cy5sbS1zZW5zb3JzLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2xtLXNlbnNvcnM
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
Quoted 36 lines · Jerome Oufella
Quoted 7 lines
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.caround 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, }, };
Quoted 7 lines
...
platform_add_devices(...);Cheers,
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 8 lines · Chris Rodley
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
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 8 lines · Jerome Oufella
Quoted 6 lines · Chris Rodley
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.
Quoted 8 lines
Quoted 2 lines
Many thanks again for your help!
ChrisGood 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
Quoted 10 lines
If your sensor is populated on the board you shouldn't have problems though.
Jerome
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 11 lines · Jerome Oufella
Quoted 8 lines · Chris Rodley
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!
ChrisGood to know Chris!
Quoted 7 lines
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
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors