2019-01-07 |
state: refactor variable type
...
This ports the following barebox commits and adjusts the handling of type
information of state variables in barebox-state:
| commit 7b3d284
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Mon Apr 3 22:51:58 2017 +0200
|
| state: remove unused variable type
|
| enum state_variable_type is never used. Remove it.
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| commit 7126dff
| Author: Daniel Schultz <d.schultz@phytec.de>
| Date: Fri Nov 3 11:48:26 2017 +0100
|
| common: state: Add variable_type to state_variable
|
| Add a pointer in state_variable to the corresponding variable_type array
| element.
|
| Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| commit dc74265
| Author: Daniel Schultz <d.schultz@phytec.de>
| Date: Fri Nov 3 11:48:27 2017 +0100
|
| common: state: Add variable type as enum
|
| The variable_type struct holds a name of its type. Checking the type of
| a variable with this string needs much resources.
|
| This patch introduce a enum of the variable type for better type
| checking.
|
| Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
[rhi: fixed function parameter alignment in common/state/state_variables.c,
and submitted those changes as patches for barebox:
https://www.mail-archive.com/barebox@lists.infradead.org/msg29427.html
https://www.mail-archive.com/barebox@lists.infradead.org/msg29462.html ]
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Ulrich Ölmann
authored
on 18 Dec 2018
Roland Hieber
committed
on 7 Jan 2019
|
state: make parameter functions more consistent
...
This replaces a dummy version dev_add_param_int() by a dummy version of
dev_add_param_uint32() to make the compiler happy and ports the following
barebox commit:
| commit c5d95eb
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Fri Apr 7 11:57:08 2017 +0200
|
| 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>
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Ulrich Ölmann
authored
on 18 Dec 2018
Roland Hieber
committed
on 7 Jan 2019
|
treewide: Use of_property_write_string() where appropriate
...
This ports the following barebox commit:
| commit b608918
| Author: Sascha Hauer <s.hauer@pengutronix.de>
| Date: Thu Mar 30 10:38:19 2017 +0200
|
| treewide: Use of_property_write_string() where appropriate
|
| Replace users which use of_set_property() to set a property to a string
| with of_property_write_string().
|
| Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Ulrich Ölmann
authored
on 18 Dec 2018
Roland Hieber
committed
on 7 Jan 2019
|
2017-03-31 |
barebox-state: Sync pieces with barebox
...
dev_add_param_bool are no-ops, save_on_shutdown is irrelevant for the
userspace part. Sync with barebox as of v2017.03.0
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: make locally used function static
...
state_set_dirty() is only used in one file, make it static.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: consistently pass one type as private data to dev_add_param_*
...
The different dev_add_param_* calls all use different types as private
data. This is unnecessary, use struct state_variable * for all of them.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
state: Add state to state_variable
...
A state variable should know which state it belongs to. Add field
for it to struct state_variable.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 31 Mar 2017
|
2017-03-21 |
state: Whitespace cleanup
...
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Sascha Hauer
committed
on 21 Mar 2017
|
2016-05-27 |
barebox-state: Import updated state code
...
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Markus Pargmann
committed
on 27 May 2016
|