lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 28 Aug 2013 19:08:42 -0400
From:	Jerome Oufella <jerome.oufella@...oirfairelinux.com>
To:	Chris Rodley <chris@...pithd.com>
Cc:	kernel@...oirfairelinux.com, linux-kernel@...r.kernel.org,
	lm-sensors@...sensors.org
Subject: Re: sht15 kernel driver

Chris Rodley <chris@...pithd.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@...oirfairelinux.com
T: 514-276-5468 ext. 125
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ