Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Mar 2018 20:28:09 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 226787] [new port] misc/raspberrypi-gpioshutdown
Message-ID:  <bug-226787-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226787

            Bug ID: 226787
           Summary: [new port] misc/raspberrypi-gpioshutdown
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: bobf@mrp3.com
 Attachment #191641 text/plain
         mime type:

Created attachment 191641
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D191641&action=
=3Dedit
'shar' archive for port

New port 'misc/raspberrypi-gpioshutdown' provides a kernel module
'gpioshutdown' that effectively 'shuts down' I/O pins at the point where the
operating system is halted, by re-configuring them as input pins with no
pullup/pulldown.  This is similar to the "powerup" state, and somewhat
duplicates what Linux does already.

Additionally, it provides 2 'sysctl' variables "kern.gpioshutdown.led_gpio"=
 and
"kern.gpioshutdown.led_gpio_set" by which you can optionally define the GPIO
pin of an LED that you want kept as an output (instead of changing it to an
input), and its 'on' polarity (0 or 1), which will be set to an 'on' state
before sync'ing the disks, and then to an 'off' when it's safe to power off=
.=20
(This is a workaround due to some odd behavior from the led driver, that se=
ems
to be easier to implement than any other idea I had)

It also includes an rc.d script "gpioshutdown" to generically configure a
Raspberry Pi to use the power LED [or in the case of Model 1, the "ok" LED]=
 as
a shutdown indicator.

By loading this kernel module, all output GPIO pins (other than the one
identified by the sysctl variable) are effectively placed into a high imped=
ance
state once it is safe to turn off the device.  An external hardware 'power
control' device (or an indicator LED) could then be used to determine that =
it
is safe to power off after shutdown, specifically for a headless system.  M=
any
such external devices (such as the ATXRaspi) exist already.  This kernel
driver, or one like it, would be necessary for these external power control
boards to be compatible with FreeBSD.

Additionally this port attempts to correct the issues brought up in problem
report 211979.  Additionally, it is marked for armv6 architecture only, and=
 is
specifically targeted for the Raspberry Pi (and named a such).

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-226787-13>