param: make parameter functions more consistent
This patch creates a consitent set of device parameter functions.

With this we have: dev_add_param_<type><access>

"type" is one of: int32, uint32, int64, uint64, string, mac, ipv4, enum, bitmask
The improvement here is that we now can exactly specify the width of the
int type parameters and also correctly distinguish between signed and
unsigned variables which means that a variable no longer ends up with
INT_MAX when it's assigned -1.

"access" can be empty for regular read/write parameter, "_ro" for readonly
parameters which get their value from a variable pointer in the
background or "_fixed" for parameters which are set to a fixed value
(without a pointer in the background).

Some more exotic types are not (yet) implemented, like
dev_add_param_ip_ro.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent c0511ab commit c5d95eb4c72a2639c10d01a801df00b4c34db315
@Sascha Hauer Sascha Hauer authored on 7 Apr 2017
Showing 20 changed files
View
arch/arm/boards/at91sam9m10ihd/hw_version.c
View
arch/arm/boards/at91sam9x5ek/hw_version.c
View
arch/arm/boards/sama5d3xek/hw_version.c
View
common/console.c
View
common/partitions/dos.c
View
common/state/state_variables.c
View
drivers/amba/bus.c
View
drivers/efi/efi-device.c
View
drivers/input/qt1070.c
View
drivers/mtd/core.c
View
drivers/mtd/ubi/build.c
View
drivers/net/phy/mdio_bus.c
View
drivers/pwm/core.c
View
drivers/usb/core/usb.c
View
drivers/usb/gadget/udc-core.c
View
drivers/video/backlight.c
View
drivers/video/imx-ipu-fb.c
View
drivers/video/imx.c
View
include/param.h
View
lib/parameter.c