<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/modules/gpio, branch releng/12.2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2019-12-22T18:51:05Z</updated>
<entry>
<title>MFC r355467, r355499, r355531-r355533, r355535, r355540, r355548-r355551, r355565</title>
<updated>2019-12-22T18:51:05Z</updated>
<author>
<name>Ian Lepore</name>
<email>ian@FreeBSD.org</email>
</author>
<published>2019-12-22T18:51:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=58784a4befd4b4860a14d230e8daebb9554f2d99'/>
<id>urn:sha1:58784a4befd4b4860a14d230e8daebb9554f2d99</id>
<content type='text'>
r355467:
Implement bus_rescan for gpiobus(4).  This allows on-the-fly reconfiguration
of gpio devices by using kenv to add hints for a new device and then do
'devctl rescan gpiobus4' to make the new device(s) attach.

It's not particularly easy to detect whether the 'at' hint has been deleted
for a child device that's currently attached, so this doesn't handle that.
But the user can use devctl commands to manually detach an existing device.

r355499:
Add module build stuff for gpioths(4), a driver for DHT11/DHT22 sensors.

r355531:
Several small fixes for the gpioths (temp/humidity sensor) driver.

At the end of a read cycle, set the gpio pin to INPUT rather than OUTPUT.
The state of the single-wire "bus" when idle should be high; setting the
pin to input allows the external pullup to pull the line high.  Setting it
to output (and leaving it driving low) was leading a good read cycle followed
by one that would fail, and it just continued like that forever, effectively
reading the sensor once every 10 seconds instead of 5.

In the attach function, do an initial read from the device before registering
the sysctls for accessing the last-read values, to prevent reading spurious
values for the first 5 seconds after the driver attaches.

Do a callout_drain() in the detach function to prevent crashes after
unloading the module.

r355532:
Simplify sysctl stuff in the gpioths driver.  There is no need to use local
functions to handle the sysctls, they all just access simple readonly
integer variables.  There's no need to track the oids of the ones we add,
since the teardown is done by newbus code, not the driver itself.

Also remove the DDB code, because it just provides access to the same data
that the sysctls already provide.

r355533:
Add support for more chips to the gpioths driver.

Previously the driver supported the DHT11 sensor.  Now it supports

 DHT11, DHT12, DHT21, DHT22, AM3201, AM3202.

All these chips are similar, differing primarily in supported temperature
and humidity ranges and accuracy (and, presumably, cost).  There are two
basic data formats reported by the various chips, and it is possible to
figure out at runtime which format to use for decoding the data based on
the range of values in a single byte of the humidity measurement. (which
is detailed in a comment block, so I won't recapitulate it here).

r355535:
Add a MODULE_DEPEND() for the gpioths driver. Also, note that the prior commit
changed the sysctl format for the temperature from "I" to "IK", and
correspondingly changed the units from integer degrees C to decikelvin.
For access via sysctl(8) the output will be the same except that now
decimal fractions will be shown when available.

r355540:
Add FDT support to the gpioths driver.  It now uses the newer gpio_pin_*()
API and can attach based on either hints or fdt data.

r355548:
Add a man page for the gpioths(4) driver.

r355549:
Add myself to the copyright list.  Also add an SPDX tag.  And finally, fix
a missing word and a spelling error in a comment.

r355550:
Paste things correctly so that I'm added to the *end* of the copyright list.

r355551:
Connect the gpioths(4) manpage to the build.

r355565:
Switch gpioths(4) from using a callout to a taskqueue for periodic polling
of the sensor hardware.  Part of the polling process involves signalling
the chip then waiting 20 milliseconds.  This was being done with DELAY(),
which is a pretty rude thing to do in a callout.  Now a taskqueue_thread
task is scheduled to do the polling, and because sleeping is allowed in
the task context, pause_sbt() replaces DELAY() for the 20ms wait.
</content>
</entry>
<entry>
<title>Add missing file to gpiobus module</title>
<updated>2018-01-07T20:28:17Z</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2018-01-07T20:28:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f1a48eaf0dc620729bca82c109c36fcbfe9c0482'/>
<id>urn:sha1:f1a48eaf0dc620729bca82c109c36fcbfe9c0482</id>
<content type='text'>
ofw_gpiobus.c is needed when FDT is used.

MFC after:	2 weeks
</content>
</entry>
<entry>
<title>sys/modules: normalize .CURDIR-relative paths to SRCTOP</title>
<updated>2017-03-04T10:10:17Z</updated>
<author>
<name>Enji Cooper</name>
<email>ngie@FreeBSD.org</email>
</author>
<published>2017-03-04T10:10:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=193d9e768ba63fcfb187cfd17f461f7d41345048'/>
<id>urn:sha1:193d9e768ba63fcfb187cfd17f461f7d41345048</id>
<content type='text'>
This simplifies make output/logic

Tested with:	`cd sys/modules; make ALL_MODULES=` on amd64
MFC after:	1 month
Sponsored by:	Dell EMC Isilon
</content>
</entry>
<entry>
<title>Refactor FDT part of gpioled driver</title>
<updated>2016-11-07T21:15:39Z</updated>
<author>
<name>Oleksandr Tymoshenko</name>
<email>gonzo@FreeBSD.org</email>
</author>
<published>2016-11-07T21:15:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=aabc5ce043340c18d7bc7f7ca956724c66583625'/>
<id>urn:sha1:aabc5ce043340c18d7bc7f7ca956724c66583625</id>
<content type='text'>
- Split driver in two parts: FDT and non-FDT
- Instead of reattach gpioled nodes to GPIO bus use
    gpio_pin_get_by_ofw_idx and add ofwbus and simplebus as parrent buses

Reviewed by:	loos
Differential Revision:	https://reviews.freebsd.org/D8233
</content>
</entry>
<entry>
<title>- Add required header for fixing `make` in sys/modules/gpio</title>
<updated>2016-10-21T03:23:17Z</updated>
<author>
<name>Li-Wen Hsu</name>
<email>lwhsu@FreeBSD.org</email>
</author>
<published>2016-10-21T03:23:17Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=90ea06dd8af1b96288d9526d6c1dad57cead33c9'/>
<id>urn:sha1:90ea06dd8af1b96288d9526d6c1dad57cead33c9</id>
<content type='text'>
Reviewed by:	imp, loos
Differential Revision:	https://reviews.freebsd.org/D7815
</content>
</entry>
<entry>
<title>Add gpiokeys to the list of GPIO modules built only if FDT is enabled</title>
<updated>2016-05-28T00:22:39Z</updated>
<author>
<name>Oleksandr Tymoshenko</name>
<email>gonzo@FreeBSD.org</email>
</author>
<published>2016-05-28T00:22:39Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=12889df73f046d2525b75797c23e8fc2809dc6d1'/>
<id>urn:sha1:12889df73f046d2525b75797c23e8fc2809dc6d1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>When building modules, define make variable OPT_FDT if the kernel config</title>
<updated>2016-05-27T17:40:29Z</updated>
<author>
<name>Ian Lepore</name>
<email>ian@FreeBSD.org</email>
</author>
<published>2016-05-27T17:40:29Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=99819ca00cb3f5377353364a78bff362b0c562a3'/>
<id>urn:sha1:99819ca00cb3f5377353364a78bff362b0c562a3</id>
<content type='text'>
includes the FDT option.  Use OPT_FDT to conditionally compile modules
that require FDT support.

In the past we've gotten away with using the arch name as a proxy for FDT
support in makefile conditional logic, but now mips has some platforms with
fdt support and some without and we need a more direct test.
</content>
</entry>
<entry>
<title>Fix parallel builds by specifying *all* required headers in SRCS.</title>
<updated>2016-05-27T04:34:42Z</updated>
<author>
<name>Ian Lepore</name>
<email>ian@FreeBSD.org</email>
</author>
<published>2016-05-27T04:34:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=606efbc7337d2068c2436e05284113fb7a8330f7'/>
<id>urn:sha1:606efbc7337d2068c2436e05284113fb7a8330f7</id>
<content type='text'>
Submitted by:	manu
Pointy hat:	ian
</content>
</entry>
<entry>
<title>[gpio] add gpiospi to the gpio module.</title>
<updated>2016-05-27T01:42:55Z</updated>
<author>
<name>Adrian Chadd</name>
<email>adrian@FreeBSD.org</email>
</author>
<published>2016-05-27T01:42:55Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b4c5dea65c9cb6e9f66f2fbe65f9043758b4e75a'/>
<id>urn:sha1:b4c5dea65c9cb6e9f66f2fbe65f9043758b4e75a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add a PPS driver that takes the timing pulse from a gpio pin.  Currently</title>
<updated>2016-05-26T23:56:12Z</updated>
<author>
<name>Ian Lepore</name>
<email>ian@FreeBSD.org</email>
</author>
<published>2016-05-26T23:56:12Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=128e3872b90b0da81dc8340f720c87d18955895e'/>
<id>urn:sha1:128e3872b90b0da81dc8340f720c87d18955895e</id>
<content type='text'>
supports only ofw/fdt systems.  Some day, hinted attachment for non-fdt
systems should be possible too.
</content>
</entry>
</feed>
