summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-next/parameter-types'Sascha Hauer2017-05-056-57/+252
|\
| * param: remove unnecessary device_d * argumentSascha Hauer2017-04-111-6/+5
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * globalvar: make globalvar functions more consistentSascha Hauer2017-04-111-13/+96
| | | | | | | | | | | | | | | | | | Similar to the device parameter functions also make the globalvar functions more consistent. This also adds support for readonly globalvars and changes several existing globalvars which should really be readonly to readonly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * param: make parameter functions more consistentSascha Hauer2017-04-111-37/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * mtd: use dev_add_param_stringSascha Hauer2017-04-111-0/+1
| | | | | | | | | | | | | | dev_add_param_string allows to pass a priv * so that the device_d * argument is not needed and can be removed later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: nand: use dev_add_param_enumSascha Hauer2017-04-111-0/+1
| | | | | | | | | | | | | | dev_add_param_enum allows to pass a priv * so that the device_d * argument is not needed and can be removed later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * console: Use dev_add_param_stringSascha Hauer2017-04-111-1/+1
| | | | | | | | | | | | | | dev_add_param_string allows to pass a priv * so that the device_d * argument is not needed and can be removed later. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * lib: implement simple_strtollSascha Hauer2017-04-111-0/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * parameter: Give device parameters typesSascha Hauer2017-04-101-0/+15
| | | | | | | | | | | | | | | | 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>
* | Merge branch 'for-next/libgen'Sascha Hauer2017-05-051-0/+1
|\ \
| * | libgen: implement posix_basenameSascha Hauer2017-04-191-0/+1
| |/ | | | | | | | | | | | | | | | | | | There are two different versions of basename(): The GNU version and the POSIX version. The GNU version never modifies its argument and returns the empty string when path has a trailing slash, and in particular also when it is "/". The POSIX version modifies its argument and thus works properly with strings which have a trailing "/". Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/arm'Sascha Hauer2017-05-051-1/+1
|\ \
| * | mtd: spi-nor: cadence: change devicetree bindings to upstreamSteffen Trumtrar2017-04-191-1/+1
| |/ | | | | | | | | | | | | | | | | Upstream devicetree bindings where changed to use "cdns,is-decoded-cs" instead of "external-decoder". Use it. Also, get rid of the clock-names "qspi_clk" dependency. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / param: fix stub prototype const annotationLucas Stach2017-04-261-1/+1
|/ | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/state'Sascha Hauer2017-04-072-0/+5
|\
| * state: Allow to load without authentificationSascha Hauer2017-03-311-0/+1
| | | | | | | | | | | | | | Sometimes it's useful to be able to load a state even when it can't be authentificated. Add an option for this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * keystore: implement forgetting secretsSascha Hauer2017-03-311-0/+4
| | | | | | | | | | | | To be able to change secrets add a function to forget secrets. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/ofpart'Sascha Hauer2017-04-073-1/+19
|\|
| * of: of_path: add of_find_node_by_devpath()Sascha Hauer2017-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already have of_find_path_by_node() which finds a device path for a given device node. This is used by the state framework to find its backend path. This path has to be translated back to a device node when Linux is started. The current approach turned out to be too simple: We assumed that the node path is the same in the tree Linux is started with. This is not true in several cases: - partition nodes should have the name "partition@<offset>", but in several trees they have "partition@<num>" - There are two different partition bindings: The legacy binding and the new one with an additional partitions subnode which has a compatible = "fixed-partitions" property. The node path only stays the same when the internal tree uses the same bindings and node names as the tree Linux is started with. To overcome this limitation we create of_find_node_by_devpath() which converts the device path back to a device node. It does so by finding the device node of the hardware device rather than the partition node. It then parses over the partitions in this device node with the known bindings looking for a partition which matches in offset and size to the barebox partition. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: partitions: flag partitions from a partition tableSascha Hauer2017-03-311-0/+1
| | | | | | | | | | | | | | | | | | We are going to call the of_partition_fixup for regular block devices like MMC/SD aswell. Add a flag to partitions indicating they are instanciated from a on-disk partition table so that they won't be added as device tree partitions during fixup. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fs: devfs-core: replace DEVFS_IS_PARTITION flag with pointer to the master cdevSascha Hauer2017-03-311-1/+1
| | | | | | | | | | | | | | | | Instead of having a flag indicating a cdev is a partition on some master cdev, just add a master pointer to the cdev, so that we can also find out who the master is. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * cdev: Collect partitions on listSascha Hauer2017-03-311-0/+1
| | | | | | | | | | | | | | We currently do not have a way to iterate over all partitions of a cdev. Change this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * mtd: of: Make used partition binding configurableSascha Hauer2017-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we used the legacy partition binding when fixing up the mtd partition nodes. Change this to default to the new binding with a "partitions" submode. Make this behaviour configurable though: This creates a new of_binding device variable for mtd devices. This can be set to: - "new": Use the new partition binding (default) - "legacy": Use the old partition binding - "donttouch": Do not touch the partition node Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: partition: Move of_mtd_fixup to drivers/of/Sascha Hauer2017-03-301-0/+6
| | | | | | | | | | | | | | | | Move the fixup code where the parser code is already. Since the code will not only be used for mtd in the future drivers/of/ is a better place than drivers/mtd/. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * of: Add of_property_write_string()Sascha Hauer2017-03-301-0/+8
| | | | | | | | | | | | | | Setting a property to a string is used many times. Create a convenience function for it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/nvmem'Sascha Hauer2017-04-072-0/+143
|\ \
| * | drivers: add nvmem framework from kernelSteffen Trumtrar2017-03-302-0/+143
| |/ | | | | | | | | | | | | | | | | | | Add the nvmem framework from Linux. Based on the v4.4-rc3 version. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2017-04-078-24/+53
|\ \
| * | globalvar: remove code for unqualified globalvarsSascha Hauer2017-04-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | globalvar: remove unused globalvar_add()Sascha Hauer2017-04-071-12/+0
| | | | | | | | | | | | | | | | | | globalvar_add() is unused in the tree. Remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | bootchooser: export bootchooser_bootSascha Hauer2017-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some boards that boot directly from C code do already know that they want to boot from bootchooser and nothing else. For these it's easiest to call bootchooser_boot directly, so export this function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | bootchooser: register as bootentry providerSascha Hauer2017-04-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Instead of using a global function called by bootentry_create_from_name(), register the bootchooser as bootentry provider. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | boot: Allow to register boot entry providersSascha Hauer2017-04-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bootentry_create_from_name() takes a name and creates bootentries for it. It tries different providers that interpret the name: blspec, bootchooser or script pathes. Instead of hardcoding the different providers in the function, allow the providers to register themselves. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | ata: ide-sff: add LBA48 supportAntony Pavlov2017-03-301-0/+3
| | | | | | | | | | | | | | | | | | | | | See http://wiki.osdev.org/ATA_PIO_Mode#48_bit_PIO for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | clk: No-op CLK_OF_DECLARE if not enabledAndrey Smirnov2017-03-301-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of wrapping each defenition of CLK_OF_DECLARE hook with preprocessor guards, change the definition of CLK_OF_DECLARE to expand into no-op if COMMON_CLK_OF_PROVIDER is not enabled. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | poweroff: Allow to register poweroff handlersSascha Hauer2017-03-302-3/+21
| |/ | | | | | | | | | | | | | | | | | | Allow to register handlers for poweroff. This allows to have multiple poweroff implementations in a single binary. The implementation is close to the restart handlers. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/mips'Sascha Hauer2017-04-071-1/+1
|\ \
| * | gui: image_renderer: fix "no previous prototype for ↵Antony Pavlov2017-03-301-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | 'image_renderer_unregister'" warning The patch fixes this compiler's warning: lib/gui/image_renderer.c:92:6: warning: no previous prototype for 'image_renderer_unregister' [-Wmissing-prototypes] void image_renderer_unregister(struct image_renderer *ir) ^ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/led'Sascha Hauer2017-04-071-1/+16
|\ \
| * | led-trigger: Allow multiple led triggers of the same typeSascha Hauer2017-03-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to have a static array of trigger types which, allows only one led per trigger. While this is enough for panic and heartbeat, it falls short when multiple leds are associated to the default-on trigger. The default-on trigger is used to turn on a led statically from devicetree and may be used multiple times. This patch reworks the led triggers so that a trigger struct is allocated dynamically when needed and put onto a list. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | led: add blinking/flashing and led_blink_pattern interfaceSascha Hauer2017-03-301-0/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far blinking/flashing LEDs is only supported on led-trigger level. Even without triggers it useful to be able to blink/flash LEDs, so add this functionality to the LED core. A led_blink_pattern consists of a number of on and off-periods which are described in an array. Using such an array you can encode nearly every blink pattern you need. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/imx'Sascha Hauer2017-04-071-0/+21
|\ \
| * | i.MX: hab: Add HAB fusebox related convenience functions / commandSascha Hauer2017-04-041-0/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Secure boot with HAB requires handling of the super root key hash and actually locking down the device. The related information is stored in the i.MX fusebox device (IIM on older SoCs, OCOTP on newer SoCs). This patch adds several convenience functions to store and read the super root key hash and to lock down a SoC. Also we add a command to do this from the command line. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/hwrng'Sascha Hauer2017-04-072-0/+48
|\ \
| * | lib: random: add get_crypto_bytes interface and use HWRNG if posssibleOleksij Rempel2017-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | For crypto applications we need to use some thing else as PRNG. So provide get_crypto_bytes() and use HWRNG as main source. PRNG is allowed as fallback if user decided to configure it so. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | drivers: add simple hw_random implementationSteffen Trumtrar2017-03-301-0/+47
| |/ | | | | | | | | | | | | | | | | | | | | | | Add a simple hw_random implementation based on code from Linux v4.5-rc5. All the entropypool initialization stuff is left out and the obsolete data_read/data_present calls are omitted. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | mci: Allow parsing for explicit DT nodeAndrey Smirnov2017-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert mci_of_parse into mci_of_parse_node, a function that takes explicit deivce tree node pointer to be used for SD/MMC related properties extraction. Implement original mci_of_parse as a wrapper around the call to new function. This is useful for controllers who specify parameter like bus witdth and GPIOs as a part of main controller's child nodes (e.g. AT91 SoCs). Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | clk: at91: Port at91 DT clock codeAndrey Smirnov2017-03-301-0/+188
|/ | | | | | | | Port at91 DT clock code from Linux 4.9-rc3. Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/video'Sascha Hauer2017-03-132-1/+11
|\
| * fb: introduce flush for virtual framebufferBastian Stender2017-02-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | Some drivers need an explicit sync method to flush the virtual framebuffer to the display. It is called fb_flush(). fb_flush() gets called on fbc_putc, on fb_close and in the pattern cycle in the fbtest command. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>