| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
of gpio pin interrupts by new way.
Note: This removes last consumer of intr_ddata machinery and we remove it
in separate commit.
Notes:
svn path=/head/; revision=301539
|
|
|
|
|
|
|
|
|
|
|
| |
to the framework in OFW (FDT) case.
This is a follow-up to r301451.
Differential Revision: https://reviews.freebsd.org/D6634
Notes:
svn path=/head/; revision=301453
|
|
|
|
|
|
|
|
|
|
|
| |
wrap the implementation so that it returns an error if INTRNG support is
not available. It should be possible to write a non-INTRNG implementation
of this function some day. In the meantime, there is code that contains
calls to this function (so the decl is needed), but have runtime checks to
avoid calling it in the non-INTRNG case.
Notes:
svn path=/head/; revision=300871
|
|
|
|
|
|
|
|
| |
supports only ofw/fdt systems. Some day, hinted attachment for non-fdt
systems should be possible too.
Notes:
svn path=/head/; revision=300811
|
|
|
|
| |
Notes:
svn path=/head/; revision=300787
|
|
|
|
|
|
|
|
| |
fact that the caller is requesting exclusive use of the pin, and also to
better match the inverse operation which is named gpiobus_release_pin().
Notes:
svn path=/head/; revision=300750
|
|
|
|
|
|
|
|
| |
Submitted by: ray
Obtained from: zrouter
Notes:
svn path=/head/; revision=300715
|
|
|
|
| |
Notes:
svn path=/head/; revision=300393
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The GPIO hardware should not be owned by a single device, this defeats any
chance of use of the GPIO controller as an interrupt source.
ow(4) is now the only consumer of this 'feature' before we can remove it
for good.
Discussed with: ian, bsdimp
Notes:
svn path=/head/; revision=300392
|
|
|
|
|
|
|
| |
Refuse to attach if the number of given pins is not enough for our needs.
Notes:
svn path=/head/; revision=300391
|
|
|
|
|
|
|
| |
While here fix a few style(9) issues.
Notes:
svn path=/head/; revision=300390
|
|
|
|
|
|
|
| |
It's needed for binding of gpio controllers.
Notes:
svn path=/head/; revision=299853
|
|
|
|
|
|
|
|
| |
- Release pin only when all per=key callouts are stopped
- Unregister keyboard when detaching device node
Notes:
svn path=/head/; revision=299566
|
|
|
|
| |
Notes:
svn path=/head/; revision=299564
|
|
|
|
|
|
|
|
|
| |
Add gpiobus_release_pin as a counterpart for gpiobus_map_pin. Without it
it's impossible to properly release pin so if kernel module is reloaded
it can't re-use pins again
Notes:
svn path=/head/; revision=299563
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Introduce new OF API function OF_prop_free to free memory allocated by
OF_getprop_alloc and OF_getencprop_alloc. Current code just calls free(9)
with M_OFWPROP memory class which assumes knowledge about OF_*prop_alloc
functions' internals and leads to unneccessary code coupling
- Convert some of the free(..., M_OFWPROP) instances to OF_prop_free
Files affected by this commit are the ones I was able to test on real
hardware. The rest of free(..., M_OFWPROP) instances will be handled with
idividual maintainers
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D6315
Notes:
svn path=/head/; revision=299477
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gpiokey driver implements functional subset of gpiokeys device-tree bindings:
https://www.kernel.org/doc/Documentation/devicetree/bindings/input/gpio-keys.txt
It acts as a virtual keyboard, so keys are visible through kbdmux(4)
Driver maps linux scancodes for most common keys to FreeBSD scancodes and
also extends spec by introducing freebsd,code property to specify
FreeBSD-native scancodes.
Reviewed by: mmel, jmcneill
Differential Revision: https://reviews.freebsd.org/D6279
Notes:
svn path=/head/; revision=299475
|
|
|
|
| |
Notes:
svn path=/head/; revision=299396
|
|
|
|
|
|
|
|
|
| |
- Get rid of hack with re-parenting gpio-leds node to gpiobus
- Use gpio_pin_set_active to enable/disable backlight, it automatically
takes care of active-low pins
Notes:
svn path=/head/; revision=299395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current API assumes that "gpios" property belongs to the device's node but for
some binding it's not true: gpiokeys has set of child nodes with this property.
Patch adds new argument instead of replacing device_t because device_t will be
used to track ownership for allocated pins
Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D6277
Notes:
svn path=/head/; revision=299384
|
|
|
|
|
|
|
| |
as error indicator.
Notes:
svn path=/head/; revision=298739
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new function gpio_alloc_intr_resource(), which allows an allocation
of interrupt resource associated to given gpio pin. It also allows to
specify interrupt configuration.
Note: This functionality is dependent on INTRNG, and must be
implemented in each GPIO controller.
Notes:
svn path=/head/; revision=298738
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"how" argument is passed as value of int* pointer to callback
function but dereferenced as char* so only one byte taken into
into account. On little-endian systems it happens to work because
first byte is LSB that contains actual value, on big-endian it's
MSB and in this case it's always equal zero
PR: 207786
Submitted by: chadf@triularity.org
Notes:
svn path=/head/; revision=297794
|
|
|
|
|
|
|
| |
Missed a bunch from r297000.
Notes:
svn path=/head/; revision=297199
|
|
|
|
|
|
|
|
| |
and ofw_iicbus. This causes enumeration of gpiobus/iicbus at the base driver
attach time. Due to this, childern drivers can be also attached early.
Notes:
svn path=/head/; revision=296901
|
|
|
|
|
|
|
| |
Reviewed by: ian, loos (paritaly)
Notes:
svn path=/head/; revision=296269
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies checking for default resource range for bus_alloc_resource(),
and improves readability.
This is part of, and related to, the migration of rman_res_t from u_long to
uintmax_t.
Discussed with: jhb
Suggested by: marcel
Notes:
svn path=/head/; revision=295832
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Migrate to using the semi-opaque type rman_res_t to specify rman resources. For
now, this is still compatible with u_long.
This is step one in migrating rman to use uintmax_t for resources instead of
u_long.
Going forward, this could feasibly be used to specify architecture-specific
definitions of resource ranges, rather than baking a specific integer type into
the API.
This change has been broken out to facilitate MFC'ing drivers back to 10 without
breaking ABI.
Reviewed By: jhb
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5075
Notes:
svn path=/head/; revision=294883
|
|
|
|
|
|
|
|
| |
PR: kern/206035
Submitted by: Stanislav Galabov <sgalabov@gmail.com>
Notes:
svn path=/head/; revision=293872
|
|
|
|
|
|
|
| |
This should cause no functional change.
Notes:
svn path=/head/; revision=286909
|
|
|
|
|
|
|
|
|
| |
This fixes the loading of gpioled as a module.
Sponsored by: Rubicon Communications (Netgate)
Notes:
svn path=/head/; revision=286847
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Detach the gpiobus and the gpioc devices from the GPIO controller.
- Fix the leak of gpiobus IRQ rman(9) region descriptor.
- Fix the leak of child ivars and IRQ resource list.
While here return NULL (instead of 0) for a device_t that fails to allocate
the ivar memory.
Tested with gpiobus built as a module.
Sponsored by: Rubicon Communications (Netgate)
Notes:
svn path=/head/; revision=286845
|
|
|
|
|
|
|
|
|
|
|
|
| |
Brightness is controlled through sysctl dev.gpiobacklight.X.brightness:
- any value greater than 0: backlight is on
- any value less than or equal to 0: backlight is off
FDT bindings docs in Linux tree:
Documentation/devicetree/bindings/video/backlight/gpio-backlight.txt
Notes:
svn path=/head/; revision=286089
|
|
|
|
|
|
|
| |
indefinitely. Improve error messages from other panics.
Notes:
svn path=/head/; revision=285833
|
|
|
|
|
|
|
|
|
|
| |
only when necessary.
Reported by: Daniel O'Connor <darius@dons.net.au>,
Sulev-Madis Silber (ketas)
Notes:
svn path=/head/; revision=285784
|
|
|
|
|
|
|
|
|
|
|
|
| |
adding already exists and if so just return that. The typical use case
is from identify routines, which shouldn't be adding multiple copies
of the same phandle_t to the gpiobus. Only one per phandle_t is needed
(or expected by the current code).
Differential Revision: https://reviews.freebsd.org/D2871
Notes:
svn path=/head/; revision=284625
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://www.kernel.org/doc/Documentation/devicetree/bindings/leds/leds-gpio.txt
Without this booting the VSATV102 causes the blue "working" led to turn
off when the kernel starts up. With this the led (which is turned on by
the firmware) stays on since that's the default state specified in the FDT.
Expanded the meaning of the led_create_state state parameter in order
to implement support for "keep". The original values were:
== 0 Off
!= 0 On
The new values are:
== -1 don't change / keep current setting
== 0 Off
!= -1 && != 0 On
This should have no effect on acpi_asus_attach which only calls
led_create_state with state set to 1. Updated acpi_ibm_attach
in order to avoid surprises.
Differential Revision: https://reviews.freebsd.org/D2615
Submitted by: John Wehle
Reviewed by: gonzo, loos
Notes:
svn path=/head/; revision=283360
|
|
|
|
|
|
|
| |
by using extra argument, so caller will know that.
Notes:
svn path=/head/; revision=282972
|
|
|
|
|
|
|
|
|
|
| |
There are cases when gpioled nodes in DTS come from different sources
(e.g. standard Beaglebone Black LEDs in main DTS + shield LEDs in
overlay DTS) so instead of handling only first compatible node go
through all child nodes
Notes:
svn path=/head/; revision=280978
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a gpiobus child is added, use its name to identify the mapped pin
names.
Make the respective changes to libgpio.
Add a new '-n' flag to gpioctl(8) to set the pin name.
Differential Revision: https://reviews.freebsd.org/D2002
Reviewed by: rpaulo
Requested by: many
Notes:
svn path=/head/; revision=279761
|
|
|
|
|
|
|
| |
happens, the child device is not yet specified.
Notes:
svn path=/head/; revision=279622
|
|
|
|
|
|
|
|
|
|
|
| |
rework the code a little bit to use this function consistently to cleanup
all the changes made as part of the probe phase.
This fixes an issue where a FDT child node without a matching driver could
leave the GPIO pins mapped and prevent the further use of them.
Notes:
svn path=/head/; revision=279621
|
|
|
|
|
|
|
|
|
|
| |
This prints a warning when your system have a hinted child or a FDT child
node for which you don't have a matching driver:
gpiobus0: <unknown device> at pin(s) 24 irq 24
Notes:
svn path=/head/; revision=279620
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new function can be used by other drivers to reserve the use of GPIO
pins.
Anyway, the use of ofw_gpiobus_parse_gpios() is preferred when possible.
Requested by: Michal Meloun
Notes:
svn path=/head/; revision=279553
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
property for devices that doesn't descend directly from gpiobus.
The parser supports multiple pins, different GPIO controllers and can use
arbitrary names for the property (to match the many linux variants:
cd-gpios, power-gpios, wp-gpios, etc.).
Pass the driver name on ofw_gpiobus_add_fdt_child(). Update gpioled to
match.
An usage example of ofw_gpiobus_parse_gpios() will follow soon.
Notes:
svn path=/head/; revision=279408
|
|
|
|
|
|
|
|
|
|
| |
be used on non FDT systems.
This prevents access to uninitialized memory on drivers that try to access
pin flags on non FDT systems.
Notes:
svn path=/head/; revision=279402
|
|
|
|
| |
Notes:
svn path=/head/; revision=278108
|
|
|
|
|
|
|
|
| |
Add helper routines to deal with attach and detach of gpiobus and gpioc
devices that are common to all drivers.
Notes:
svn path=/head/; revision=277996
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
controller.
The gpiobus is responsible to keep track of the used pins and serialize
the access to pins.
Some of these features are important to devices that do not descend
directly from gpiobus and as such cannot make use of its features (one
classic example is gpioc that is attached to the GPIO controller and could
not, until now, make use of the gpiobus locking).
Notes:
svn path=/head/; revision=277980
|
|
|
|
|
|
|
|
|
|
|
| |
gpio_pin_max must return the maximum supported pin number and not the total
number of pins on the system.
PR: 157070
Submitted by: brix
Notes:
svn path=/head/; revision=276168
|