9
0
Fork 0
Commit Graph

22 Commits

Author SHA1 Message Date
Herve Codina f2e86a2964 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>
2014-06-13 06:27:34 +02:00
Sascha Hauer 1273cc2d47 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>
2014-04-04 09:04:31 +02:00
Sascha Hauer 81ba01fee6 param: dev_add_param_fixed: constify argument
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-28 11:22:57 +01:00
Sascha Hauer a6afae76f1 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>
2013-05-23 15:40:26 +02:00
Sascha Hauer c5fa299862 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>
2013-05-23 15:40:22 +02:00
Sascha Hauer c57fa97ee7 param: pass param to dev_remove_param
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer a280858594 param: remove now unused dev_[gs]et_param_ip
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:35 +02:00
Sascha Hauer f80e7c4920 param: Add ip address convenience function
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-11 11:48:31 +02:00
Sascha Hauer 2df33a69bd 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>
2013-04-11 10:20:56 +02:00
Sascha Hauer f1253fdf8e param: Add dev member to struct param_d
This will make it unnecessary to pass the dev pointer around later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-06 08:23:45 +02:00
Josh Cartwright 74406ae9ad parameter: fix build warning when !CONFIG_PARAMETER
Commit 51f2ded17c ("param: make return
value of param getter function const") made the parameter getter const,
but neglected to change the dev_add_param() function prototype in the
!CONFIG_PARAMETER case.

Fixes the following warning with CONFIG_NAND and !CONFIG_PARAMETER:

drivers/mtd/nand/nand_base.c: In function 'add_mtd_nand_device':
drivers/mtd/nand/nand_base.c:1720:2: warning: passing argument 4 of 'dev_add_param' from incompatible pointer type [enabled by default]
include/param.h:59:19: note: expected 'char * (*)(struct device_d *, struct param_d *)' but argument is of type 'const char * (*)(struct device_d *, struct param_d *)'

Signed-off-by: Josh Cartwright <joshc@eso.teric.us>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-02 08:29:02 +02:00
Jan Luebbe 247022ec92 parameter: support removing named parameters
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 10:02:57 +02:00
Jan Luebbe 1c0b9f3954 parameter: remove unused function global_add_parameter
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-10-12 09:59:25 +02:00
Sascha Hauer c48ca0d70c parameter: remove unused struct member
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-05-13 14:03:07 +02:00
Sascha Hauer 51f2ded17c param: make return value of param getter function const
The string returned by the getter function should not be
changed. Make it const.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-24 11:17:02 +02:00
Jean-Christophe PLAGNIOL-VILLARD 971d164f62 param: add config to disable it
this will allow to save 992 Bytes for TI xlaoder or AT91 bootstrap

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-01-11 21:22:34 +08:00
Sascha Hauer c3789cd49b rework device parameters
Change device parameters so that the memory management is in generic
code. This also removes the need of storing statically initialized
parameters as they are stored in a struct list_head for each device.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-17 08:28:25 +02:00
Sascha Hauer fa668fe184 svn_rev_502
complete multiple console support
2007-07-05 18:01:59 +02:00
Sascha Hauer 7baa6289fe svn_rev_469
- make some more char * const
- dev_add_parameter -> dev_add_param
2007-07-05 18:01:56 +02:00
Sascha Hauer d729a09f52 svn_rev_391
remove different parameter types, all params are strings now
2007-07-05 18:01:49 +02:00
Sascha Hauer e454ad437a svn_rev_377
remove special params, all params are strings now
2007-07-05 18:01:48 +02:00
Sascha Hauer fae2a2bd07 svn_rev_228 2007-07-05 18:01:34 +02:00