summaryrefslogtreecommitdiffstats
path: root/sys/dev/gpio
Commit message (Collapse)AuthorAgeFilesLines
* Style fixesgonzo2012-11-231-4/+3
| | | | | - Remove C++ - style comments - Use proper device name in panic messages
* Remove extra semicolon which rendered condition uselessgonzo2012-04-021-1/+1
| | | | Submitted by: Stefan Farfelder <stefanf@FreeBSD.org>
* Fix broken locking that I introduced in the previous commit.adrian2011-12-201-0/+2
|
* Remove these locks - they aren't strictly needed and cause measurableadrian2011-12-201-11/+0
| | | | | | | | | | | | | | | | | | | | performance issues. * Access to the GPIO bus is already locked by requesting and releasing the bus - thus the lock isn't really needed for each GPIO pin change. * Don't lock and unlock the GPIO bus for -each- i2c access - the i2c bus code is already doing this by calling the upper layer callback to request/release the bus. This thus locks the bus for the entirety of the transaction. TODO: * Further verify that everything is correctly requesting/ releasing the GPIO bus. * Look at how to lock the GPIO pin configuration stuff, potentially by locking/unlocking the bus at the gpiobus layer.
* Modify the GPIO i2c bus code to allow for arbitrary data/clockadrian2011-12-041-14/+22
| | | | | | | | | pins, rather than defaulting to 0 and 1. This way the pin order can be reversed. It is reversed with the TP-Link TL-WR1043nd. Submitted by: Stefan Bethke <stb@lassitu.de>
* Rename device_delete_all_children() into device_delete_children().hselasky2011-11-221-1/+1
| | | | | Suggested by: jhb @ and marius @ MFC after: 1 week
* - There's no need to overwrite the default device method with the defaultmarius2011-11-221-2/+1
| | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
* Move the device_delete_all_children() function from usb_util.chselasky2011-11-191-7/+4
| | | | | | | | to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Identify a few other places where it makes sense to use device_delete_all_children(). MFC after: 1 week
* Get rid of D_PSEUDO.ed2011-10-181-3/+0
| | | | | | | | | | It seems the D_PSEUDO flag was meant to allow make_dev() to return NULL. Nowadays we have a different interface for that; make_dev_p(). There's no need to keep it there. While there, remove an unneeded D_NEEDMINOR from the gpio driver. Discussed with: gonzo@ (gpio)
* Add a GPIO driver for the Gateworks Cambria platform.thompsa2010-11-112-2/+2
| | | | | | | | | The external gpio pins are connected to a PLD on the i2c bus, unfortunatley this device does not conform by failing to send an ack after each byte written. The iicbb driver will abort the transfer when the address is not ack'd and it would introduce a lot of churn to be able to pass a flag down to iicbb_start/iicbb_write. Instead we do bad things by grabbing the iicbus but then doing our own bit banging.
* Set the pin to output on attach, we can't assume it already is.thompsa2010-11-081-0/+3
| | | | Reviewed by: gonzo
* Fix legal staff in GPIO sources:gonzo2010-09-295-40/+70
| | | | | | | | - license clause now contains "AUTHOR AND CONTRIBUTORS" instead of just "AUTHOR" - Add license/copyright to gpioc.c Spotted by: Edward Tomasz Napierala, Andrew Turner
* Initial GPIO bus support. Includes:gonzo2010-09-287-0/+1332
- 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
OpenPOWER on IntegriCloud