unbreak allmodconfig KCONFIG_ALLCONFIG=...
[carl9170fw.git] / carlfw / include / gpio.h
index 1ed816c80ff1b1042ffca952d2f99affd7e91f91..56c554a40da4cf938a63e2e43e74cc56c100ca73 100644 (file)
@@ -3,7 +3,7 @@
  *
  * GPIO definitions
  *
- * Copyright 2009, 2010 Christian Lamparter <chunkeey@googlemail.com>
+ * Copyright 2009-2011 Christian Lamparter <chunkeey@googlemail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -16,8 +16,7 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ * with this program; If not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef __CARL9170FW_GPIO_H
@@ -37,6 +36,11 @@ static inline __inline void led_set(const unsigned int ledstate)
        set(AR9170_GPIO_REG_PORT_DATA, ledstate);
 }
 
+static inline __inline u16 get_random_u16(void)
+{
+       return getw(AR9170_RAND_REG_NUM);
+}
+
 #ifdef CONFIG_CARL9170FW_GPIO_INTERRUPT
 
 void gpio_timer(void);