2017-07-06 |
Revert "param: fix stub prototype of dev_add_param"
...
This reverts commit 441941f , which was on
top of the recently reverted nvvar rework, so needs to be reverted, too.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Lucas Stach
committed
on 6 Jul 2017
|
2017-06-13 |
Revert "globalvar: remove code for unqualified globalvars"
...
This reverts commit e4f8105 .
Sascha Hauer
committed
on 13 Jun 2017
|
Revert "param: remove unnecessary device_d * argument"
...
This reverts commit 0071bac .
Sascha Hauer
committed
on 13 Jun 2017
|
2017-05-17 |
param: fix stub prototype of dev_add_param
...
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Lucas Stach
authored
on 11 May 2017
Sascha Hauer
committed
on 17 May 2017
|
2017-05-05 |
Merge branch 'for-next/parameter-types'
Sascha Hauer
committed
on 5 May 2017
|
2017-04-26 |
param: fix stub prototype const annotation
...
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Lucas Stach
authored
on 25 Apr 2017
Sascha Hauer
committed
on 26 Apr 2017
|
2017-04-11 |
param: remove unnecessary device_d * argument
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Apr 2017
|
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>
Sascha Hauer
committed
on 11 Apr 2017
|
2017-04-10 |
parameter: Give device parameters types
...
This adds a variable type enum and adds this to the device parameters.
This information gives the user a hint which values a parameter expects
and also helps to organize the parameters better internally.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 10 Apr 2017
|
2017-04-07 |
globalvar: remove code for unqualified globalvars
...
The globalvar_add_simple_* functions will fail when a globalvar of
the name already exists. This happened when the globalvar was created
previously because a corresponding nvvar existed. For this reason we
removed the globalvars that have been previously created by nvvar
creation (we called these unqualified globalvars). Since we no longer
create the corresponding globalvars on nvvar creation this code is
no longer needed. Remove it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 7 Apr 2017
|
2017-01-09 |
devparam: add static inline dummy for dev_add_param_bitmask
...
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Lucas Stach
authored
on 20 Dec 2016
Sascha Hauer
committed
on 9 Jan 2017
|
2016-09-22 |
param: introduce param_bitmask
...
param_bitmask behaves similar to an enum, except that with a bitmask
multiple values can be specified. On the command line the bits are
represented as a space separated list of strings. In memory a
unsigned long * is used as backend storage, this can be modified
using the regular bitmap functions.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 22 Sep 2016
|
globalvar: sync with nvvars
...
This patch fixes the behaviour when a driver creates a globalvar using
globalvar_add_simple_[string|int|bool|enum|ip]) *after* nvvars are
initialized and this globalvar is overwritten with a nvvar. Currently
this fix is not needed because all globalvars are registered before the
nvvars are initialized.
We have two different typed of globalvars. The first type, here referred
to as qualified globalvars, has a backend variable storage (the ones
created with globalvar_add_simple_[string|int|bool|enum|ip]), the other
created with globalvar_add_simple only has a dynamically allocted string
as backend.
Normally during startup of barebox the qualified globalvars are
registered and during load of nvvars are synced with the values from the
nvvars. Everything works fine in this case. However, when during nvvar
initialisation a globalvar for a nvvar does not exist, then it is
registered as unqualified globalvar. When then later some driver wants
to register a qualified globalvar for which a unqualified globalvar
already exists, it will get a -EEXIST. This is not the expected
behaviour. Instead, the current unqualified globalvar should be removed,
recreated as qualified globalvar and then afterwards synced with the
corresponding nvvar. This behaviour is fixed with this patch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 22 Sep 2016
|
2015-08-26 |
param_enum: Make name strings const
...
Not only the array containing the pointers should be const but
also the strings themselves, so instead of using const char **
use const char * const *.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 26 Aug 2015
|
2015-03-11 |
parameter: include header for ERR_PTR and errno
...
Commit 03b59bdb64e83e (paramter: The dev_add_param_*() return ERR_PTR(),
change no-ops to return ERR_PTR(-ENOSYS) instead of NULL) started using
ERR_PTR and errnos without including the relevant header.
This fixes the build for a lot of configurations.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Lucas Stach
authored
on 10 Mar 2015
Sascha Hauer
committed
on 11 Mar 2015
|
2015-03-10 |
paramter: The dev_add_param_*() return ERR_PTR(), change no-ops to return ERR_PTR(-ENOSYS) instead of NULL
...
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Marc Kleine-Budde
authored
on 9 Mar 2015
Sascha Hauer
committed
on 10 Mar 2015
|
2014-11-28 |
param: make string arguments to dev_add_param_fixed const
...
dev_add_param_fixed does not modify the strings, so make them
const.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Nov 2014
|
2014-10-08 |
param: let dev_add_param return the newly created param
...
dev_add_param creates a new parameter so it makes more sense to
return it than to return an error code. Since the return value
is hardly ever checked this is only a small patch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 8 Oct 2014
|
2014-08-07 |
Merge branch 'for-next/usb-gadget'
...
Conflicts:
commands/Makefile
common/Kconfig
common/Makefile
drivers/usb/gadget/dfu.c
Sascha Hauer
committed
on 7 Aug 2014
|
2014-07-22 |
param: Add dev_add_param_string
...
This function allows drivers to create a string parameter and
provides access to it via a pointer. Using regular dev_add_param
only allows access via dev_get_param().
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 22 Jul 2014
|
2014-07-11 |
Make IPaddr_t a 32bit type
...
unsigned long is 64bit wide on some architectures. Make IPaddr_t a
typedef to uint32_t to make sure it's 32bit wide.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Jul 2014
|
2014-06-13 |
param: Add support for long long read only dev param
...
Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Herve Codina
authored
on 12 Jun 2014
Sascha Hauer
committed
on 13 Jun 2014
|
2014-04-04 |
param: Add dev_add_param_mac
...
This adds a convenience function to register a MAC address device
parameter. The only current user is converted to use it.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 4 Apr 2014
|
2014-02-28 |
param: dev_add_param_fixed: constify argument
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 28 Feb 2014
|
2013-05-23 |
param: Add helpers to provide an enum parameter
...
We recently gained helper functions for different types of
device parameters. One thing missing was a helper for an
enum type parameter. This patch adds this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 May 2013
|
param: Add info function
...
Some parameters may wish to provide some information about their
meaning or possible values. Provide an info callback for parameters.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 23 May 2013
|
2013-04-11 |
param: pass param to dev_remove_param
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Apr 2013
|
param: remove now unused dev_[gs]et_param_ip
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Apr 2013
|
param: Add ip address convenience function
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Apr 2013
|
param: Add integer and boolean parameter helpers
...
This adds convenience functions for directly registering integers
and bools as device parameter. This way driver no longer have to
fiddle with string handling. The format used to print the parameter
is passed to the functions to be able to print parameters in a
flexible way.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 11 Apr 2013
|