mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] Add device parameter convenience helpers
@ 2013-04-07 14:00 Sascha Hauer
  2013-04-07 14:00 ` [PATCH 01/21] param: Add dev member to struct param_d Sascha Hauer
                   ` (20 more replies)
  0 siblings, 21 replies; 25+ messages in thread
From: Sascha Hauer @ 2013-04-07 14:00 UTC (permalink / raw)
  To: barebox


This series adds device parameter convenience helpers and uses them
where appropriate. We provide a helper for integers, bools and read
only integers.

The idea is to provide parameter functions which are passed a pointer
to the actual integer value and a printf format string. The get/set
callbacks are optional and are only used as a notifier for the driver
if a parameter is about to be read or written. The actual parameter
value is stored in the integer pointer provided to the parameter functions.
This way drivers no longer have to to integer <-> string conversions
and can be much simpler.

Sascha

----------------------------------------------------------------
Sascha Hauer (21):
      param: Add dev member to struct param_d
      param: refactor __dev_add_param
      param: Add integer and boolean parameter helpers
      param: Add ip address convenience function
      net: ksz8864: Use dev_add_param_bool for enable parameter
      net: store ethernet device parameters in device
      netconsole: use dev_add_param_* helpers
      param: remove now unused dev_[gs]et_param_ip
      treewide: Use dev_add_param_int_ro where possible
      mci: Use dev_add_param_int for probe parameter
      ata: Use dev_add_param_bool for probe parameter
      fb: Use dev_add_param_bool for enable parameter
      fb: imxfb: Use dev_add_param_int for alpha parameter
      fb: imx-ipu-fb: Use dev_add_param_int for alpha parameter
      param: pass param to dev_remove_param
      pwm: Use dev_add_param_int for pwm parameters
      ARM: i.MX: iim: Use dev_add_param_bool for parameters
      console: Use dev_add_param_int for baudrate parameter
      mtd: Nand: Use dev_add_param_bool for erasebad parameter
      USB gadget at91: Use dev_add_param_bool for vbus parameter
      ARM: MXS: ocotp: Use dev_add_param_bool for parameter

 arch/arm/boards/at91sam9m10ihd/hw_version.c |   6 +-
 arch/arm/boards/at91sam9x5ek/hw_version.c   |   6 +-
 arch/arm/boards/sama5d3xek/hw_version.c     |   6 +-
 arch/arm/mach-imx/iim.c                     |  65 ++----
 arch/arm/mach-mxs/ocotp.c                   |  34 +---
 common/console.c                            |  26 +--
 drivers/amba/bus.c                          |   9 +-
 drivers/ata/disk_ata_drive.c                |  21 +-
 drivers/input/qt1070.c                      |   6 +-
 drivers/mci/mci-core.c                      |  43 ++--
 drivers/mtd/core.c                          |  13 +-
 drivers/mtd/nand/nand_base.c                |  22 +-
 drivers/net/ksz8864rmn.c                    |  30 +--
 drivers/net/phy/mdio_bus.c                  |   8 +-
 drivers/pwm/core.c                          |  89 +++------
 drivers/usb/core/usb.c                      |  19 +-
 drivers/usb/gadget/at91_udc.c               |  23 +--
 drivers/video/fb.c                          |  33 ++-
 drivers/video/imx-ipu-fb.c                  |  27 +--
 drivers/video/imx.c                         |  26 +--
 include/ata_drive.h                         |   1 +
 include/console.h                           |   2 +
 include/fb.h                                |   1 +
 include/linux/mtd/mtd.h                     |   1 +
 include/mci.h                               |   2 +
 include/net.h                               |   7 +-
 include/param.h                             |  66 ++++--
 lib/parameter.c                             | 300 ++++++++++++++++++++++++----
 net/eth.c                                   |  40 +---
 net/net.c                                   |  80 +++-----
 net/netconsole.c                            |  50 +----
 31 files changed, 536 insertions(+), 526 deletions(-)

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2013-04-08 10:13 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-07 14:00 [PATCH] Add device parameter convenience helpers Sascha Hauer
2013-04-07 14:00 ` [PATCH 01/21] param: Add dev member to struct param_d Sascha Hauer
2013-04-07 14:00 ` [PATCH 02/21] param: refactor __dev_add_param Sascha Hauer
2013-04-07 14:00 ` [PATCH 03/21] param: Add integer and boolean parameter helpers Sascha Hauer
2013-04-07 14:00 ` [PATCH 04/21] param: Add ip address convenience function Sascha Hauer
2013-04-07 14:00 ` [PATCH 05/21] net: ksz8864: Use dev_add_param_bool for enable parameter Sascha Hauer
2013-04-07 14:00 ` [PATCH 06/21] net: store ethernet device parameters in device Sascha Hauer
2013-04-07 14:00 ` [PATCH 07/21] netconsole: use dev_add_param_* helpers Sascha Hauer
2013-04-07 14:00 ` [PATCH 08/21] param: remove now unused dev_[gs]et_param_ip Sascha Hauer
2013-04-07 14:00 ` [PATCH 09/21] treewide: Use dev_add_param_int_ro where possible Sascha Hauer
2013-04-07 14:00 ` [PATCH 10/21] mci: Use dev_add_param_int for probe parameter Sascha Hauer
2013-04-07 14:00 ` [PATCH 11/21] ata: Use dev_add_param_bool " Sascha Hauer
2013-04-07 14:00 ` [PATCH 12/21] fb: Use dev_add_param_bool for enable parameter Sascha Hauer
2013-04-07 14:00 ` [PATCH 13/21] fb: imxfb: Use dev_add_param_int for alpha parameter Sascha Hauer
2013-04-07 14:00 ` [PATCH 14/21] fb: imx-ipu-fb: " Sascha Hauer
2013-04-07 14:00 ` [PATCH 15/21] param: pass param to dev_remove_param Sascha Hauer
2013-04-07 14:00 ` [PATCH 16/21] pwm: Use dev_add_param_int for pwm parameters Sascha Hauer
2013-04-07 14:00 ` [PATCH 17/21] ARM: i.MX: iim: Use dev_add_param_bool for parameters Sascha Hauer
2013-04-07 14:00 ` [PATCH 18/21] console: Use dev_add_param_int for baudrate parameter Sascha Hauer
2013-04-07 14:00 ` [PATCH 19/21] mtd: Nand: Use dev_add_param_bool for erasebad parameter Sascha Hauer
2013-04-07 22:35   ` Alexander Aring
2013-04-08  8:11     ` Sascha Hauer
2013-04-08 10:15       ` Alexander Aring
2013-04-07 14:00 ` [PATCH 20/21] USB gadget at91: Use dev_add_param_bool for vbus parameter Sascha Hauer
2013-04-07 14:00 ` [PATCH 21/21] ARM: MXS: ocotp: Use dev_add_param_bool for parameter Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox