#
303975 |
|
11-Aug-2016 |
gjb |
Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, and rename it to RC1.
Update __FreeBSD_version.
Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and the dvd1.iso packages population.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
302408 |
|
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
301539 |
|
07-Jun-2016 |
mmel |
INTRNG: As follow up of r301451, implement mapping and configuration of gpio pin interrupts by new way.
Note: This removes last consumer of intr_ddata machinery and we remove it in separate commit.
|
#
300871 |
|
27-May-2016 |
ian |
Don't wrap the declaration of gpio_alloc_intr_resource() in #ifdef INTRNG, 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.
|
#
300787 |
|
26-May-2016 |
ian |
Add a convenience function to get a gpio pin's capabilties.
|
#
300750 |
|
26-May-2016 |
ian |
Rename gpiobus_map_pin() to gpiobus_acquire_pin(), to better reflect the 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().
|
#
299563 |
|
12-May-2016 |
gonzo |
Add gpiobus_release_pin function to release mapped pin
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
|
#
299384 |
|
10-May-2016 |
gonzo |
Pass device tree node as a part of gpio_pin_get_by_ofw_XXX API
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
|
#
298738 |
|
28-Apr-2016 |
mmel |
GPIO: Add support for gpio pin interrupts. 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.
|
#
296269 |
|
01-Mar-2016 |
mmel |
OFW_GPIOBUS: Add utility functions for easier handling of OFW GPIO pins.
Reviewed by: ian, loos (paritaly)
|
#
279761 |
|
08-Mar-2015 |
loos |
Add a new ioctl to allow the setting of GPIO pin names.
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
|
#
279622 |
|
05-Mar-2015 |
loos |
Use the child device name here is lame because at the point that this happens, the child device is not yet specified.
|
#
279553 |
|
02-Mar-2015 |
loos |
Move duplicate code to a new public function.
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
|
#
279408 |
|
28-Feb-2015 |
loos |
Add ofw_gpiobus_parse_gpios(), a new public function, to parse the gpios 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.
|
#
279402 |
|
28-Feb-2015 |
loos |
Rename and move gpiobus_alloc_ivars() and gpiobus_free_ivars() so they can be used on non FDT systems.
This prevents access to uninitialized memory on drivers that try to access pin flags on non FDT systems.
|
#
278108 |
|
02-Feb-2015 |
loos |
Register the GPIO controller device reference on xref table for FDT systems.
|
#
277996 |
|
31-Jan-2015 |
loos |
Implement GPIO_GET_BUS() method for all GPIO drivers.
Add helper routines to deal with attach and detach of gpiobus and gpioc devices that are common to all drivers.
|
#
274670 |
|
18-Nov-2014 |
loos |
Moves all the duplicate code to a single function.
Verify for invalid modes and unwanted flags before pass the new flags to driver.
|
#
274643 |
|
18-Nov-2014 |
loos |
Fix gpiobus_child_location_str() to return a real string with the mapped pins.
Make gpiobus_print_pins() static again.
|
#
274638 |
|
18-Nov-2014 |
loos |
Add basic interrupt management code to gpiobus and ofw_gpiobus.
This is the general support to allow the use of GPIO pins as interrupt sources for direct gpiobus children.
The use of GPIO pins as generic interrupt sources (for an ethernet driver for example) will only be possible when arm/intrng is complete. Then, most of this code will need to be rewritten, but it works for now, is better than what we have and will allow further developments.
Tested on: ar71xx (RSPRO), am335x (BBB), bcm2835 (Raspberry pi) Differential Revision: https://reviews.freebsd.org/D999 Reviewed by: rpaulo
|
#
273917 |
|
31-Oct-2014 |
loos |
Fix the gpiobus locking by using a more sane model where it isn't necessary hold the gpiobus lock between the gpio calls.
gpiobus_acquire_lock() now accepts a third parameter which tells gpiobus what to do when the bus is already busy.
When GPIOBUS_WAIT wait is used, the calling thread will be put to sleep until the bus became free.
With GPIOBUS_DONTWAIT the calling thread will receive EWOULDBLOCK right away and then it can act upon.
This fixes the gpioiic(4) locking issues that arises when doing multiple concurrent access on the bus.
|
#
273569 |
|
23-Oct-2014 |
loos |
Move the duplicated code to a single function.
No functional changes.
|
#
273566 |
|
23-Oct-2014 |
loos |
Provide a working GPIOBUS_IVAR() macro for FDT systems.
|
#
265310 |
|
04-May-2014 |
loos |
Move gpiobus routines to dev/gpio. Avoid polluting ofw_bus with bus specific parts.
Requested by: nwhitehorn
|
#
265289 |
|
03-May-2014 |
loos |
Really sort out the headers.
sys/systm.h must always come after sys/param.h.
Remove sys/types.h which should never be included together with sys/param.h.
Add sys/malloc.h for correctness even if it seems to don't be needed.
Remove more unused headers found by unusedinc (from bde@) and tested with a universe build.
Reported by: bde
|
#
265012 |
|
27-Apr-2014 |
loos |
Fix the gpio-specifier decoding by respecting the GPIO controller's #gpio-cells property.
Add a new ofw_bus method (OFW_BUS_MAP_GPIOS()) that allows the GPIO controller to implement its own mapping to deal with gpio-specifiers, allowing the decoding of gpio-specifiers to be controller specific.
The default ofw_bus_map_gpios() decodes the linux standard (#gpio-cells = <2>) and the FreeBSD standard (#gpio-cells = <3>).
It pass the gpio-specifier flag field to the children as an ivar variable so they can act upon.
|
#
261842 |
|
13-Feb-2014 |
loos |
Add an OFW GPIO compatible bus. This allows the use of the DTS files to describe GPIO bindings in the system.
Move the GPIOBUS lock macros to gpiobusvar.h as they are now shared between the OFW and the non OFW versions of GPIO bus.
Export gpiobus_print_pins() so it can also be used on the OFW GPIO bus.
Approved by: adrian (mentor, implicit)
|
#
213277 |
|
29-Sep-2010 |
gonzo |
Fix legal staff in GPIO sources: - license clause now contains "AUTHOR AND CONTRIBUTORS" instead of just "AUTHOR" - Add license/copyright to gpioc.c
Spotted by: Edward Tomasz Napierala, Andrew Turner
|
#
213237 |
|
28-Sep-2010 |
gonzo |
Initial GPIO bus support. Includes: - GPIO bus controller interface - GPIO bus interface - Implementation of GPIO led(4) compatible device - Implementation of iic(4) bus over GPIO (author: Luiz Otavio O Souza)
Tested by: Luiz Otavio O Souza, Alexandr Rybalko
|