bcm53xx: clean up nvram header
[openwrt.git] / target / linux / bcm53xx / files / include / linux / bcm47xx_nvram.h
1 /*
2  *  Copyright (C) 2005, Broadcom Corporation
3  *  Copyright (C) 2006, Felix Fietkau <nbd@openwrt.org>
4  *  Copyright (C) 2014 Hauke Mehrtens <hauke@hauke-m.de>
5  *
6  *  This program is free software; you can redistribute  it and/or modify it
7  *  under  the terms of  the GNU General  Public License as published by the
8  *  Free Software Foundation;  either version 2 of the  License, or (at your
9  *  option) any later version.
10  */
11
12 #ifndef __BCM47XX_NVRAM_H
13 #define __BCM47XX_NVRAM_H
14
15 #include <linux/types.h>
16 #include <linux/kernel.h>
17
18 #ifdef CONFIG_BCM47XX
19 int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len);
20
21 int bcm47xx_nvram_gpio_pin(const char *name);
22 #else
23 static inline int bcm47xx_nvram_getenv(const char *name, char *val,
24                                        size_t val_len)
25 {
26         return -ENXIO;
27 }
28
29 static inline int bcm47xx_nvram_gpio_pin(const char *name)
30 {
31         return -ENXIO;
32 }
33 #endif
34 #endif /* __BCM47XX_NVRAM_H */