summaryrefslogtreecommitdiffstats
path: root/include/param.h
Commit message (Collapse)AuthorAgeFilesLines
* parameter: include header for ERR_PTR and errnoLucas Stach2015-03-111-0/+1
| | | | | | | | | | | 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>
* paramter: The dev_add_param_*() return ERR_PTR(), change no-ops to return ↵Marc Kleine-Budde2015-03-101-9/+9
| | | | | | | ERR_PTR(-ENOSYS) instead of NULL Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: make string arguments to dev_add_param_fixed constSascha Hauer2014-11-281-2/+2
| | | | | | | dev_add_param_fixed does not modify the strings, so make them const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: let dev_add_param return the newly created paramSascha Hauer2014-10-081-2/+2
| | | | | | | | 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>
* Merge branch 'for-next/usb-gadget'Sascha Hauer2014-08-071-0/+13
|\ | | | | | | | | | | | | | | Conflicts: commands/Makefile common/Kconfig common/Makefile drivers/usb/gadget/dfu.c
| * param: Add dev_add_param_stringSascha Hauer2014-07-221-0/+13
| | | | | | | | | | | | | | | | 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>
* | Make IPaddr_t a 32bit typeSascha Hauer2014-07-111-1/+1
|/ | | | | | | 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>
* param: Add support for long long read only dev paramHerve Codina2014-06-131-0/+9
| | | | | Signed-off-by: Herve Codina <Herve.CODINA@celad.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: Add dev_add_param_macSascha Hauer2014-04-041-0/+13
| | | | | | | 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>
* param: dev_add_param_fixed: constify argumentSascha Hauer2014-02-281-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: Add helpers to provide an enum parameterSascha Hauer2013-05-231-0/+14
| | | | | | | | 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>
* param: Add info functionSascha Hauer2013-05-231-0/+1
| | | | | | | 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>
* param: pass param to dev_remove_paramSascha Hauer2013-04-111-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: remove now unused dev_[gs]et_param_ipSascha Hauer2013-04-111-15/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: Add ip address convenience functionSascha Hauer2013-04-111-0/+13
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: Add integer and boolean parameter helpersSascha Hauer2013-04-111-0/+37
| | | | | | | | | | 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>
* param: Add dev member to struct param_dSascha Hauer2013-04-061-0/+1
| | | | | | This will make it unnecessary to pass the dev pointer around later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* parameter: fix build warning when !CONFIG_PARAMETERJosh Cartwright2013-04-021-1/+1
| | | | | | | | | | | | | | | | Commit 51f2ded17c35c146488f6f3b697764bb2953a156 ("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>
* parameter: support removing named parametersJan Luebbe2012-10-121-0/+4
| | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* parameter: remove unused function global_add_parameterJan Luebbe2012-10-121-7/+0
| | | | | Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* parameter: remove unused struct memberSascha Hauer2012-05-131-1/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: make return value of param getter function constSascha Hauer2012-04-241-3/+3
| | | | | | | The string returned by the getter function should not be changed. Make it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* param: add config to disable itJean-Christophe PLAGNIOL-VILLARD2012-01-111-0/+53
| | | | | | this will allow to save 992 Bytes for TI xlaoder or AT91 bootstrap Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rework device parametersSascha Hauer2010-06-171-1/+14
| | | | | | | | 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>
* svn_rev_502Sascha Hauer2007-07-051-1/+4
| | | | complete multiple console support
* svn_rev_469Sascha Hauer2007-07-051-3/+4
| | | | | - make some more char * const - dev_add_parameter -> dev_add_param
* svn_rev_391Sascha Hauer2007-07-051-0/+2
| | | | remove different parameter types, all params are strings now
* svn_rev_377Sascha Hauer2007-07-051-25/+8
| | | | remove special params, all params are strings now
* svn_rev_228Sascha Hauer2007-07-051-0/+43