summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
Commit message (Collapse)AuthorAgeFilesLines
* commands: regulator: add option to list provider devicesAhmad Fatoum2023-12-051-7/+20
| | | | | | | | | | | | Especially on SCMI boards, it isn't immediately clear if e.g. reg11 is supplied by a directly accessed regulator or by the secure world. Give the regulator command a -D option to list devices that the regulator is associated with as well. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20231128153020.669750-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: regulator: add support for enabling/disabling regulatorsAhmad Fatoum2023-11-241-0/+8
| | | | | | | | | For testing regulator drivers, it can be handy to enable/disable them from the shell prompt. Extend the regulator command to support this. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120336.1729791-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: replace _internal suffix by _rdevSascha Hauer2023-09-201-13/+13
| | | | | | | Rename functions to better align with the Linux Kernel. Link: https://lore.barebox.org/20230920121708.2818143-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: print regulator treeSascha Hauer2023-09-201-9/+21
| | | | | | | | Regulators have a tree structure, so print them as a tree to show the users their dependencies. Link: https://lore.barebox.org/20230920103316.2758383-12-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: drop struct regulator_dev::supply_nameSascha Hauer2023-09-201-5/+3
| | | | | | | | | The supply name can be set in struct regulator_desc, no need to have it in struct regulator_dev also, so drop it there. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20230920103316.2758383-11-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Set initial voltageSascha Hauer2023-09-201-0/+60
| | | | | | | | | | When voltage constraints are given in the device tree then we should set the regulator to a valid voltage before enabling it. Without it we can end up with invalid voltages. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20230920103316.2758383-10-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: register regulator as last step in of_regulator_register()Sascha Hauer2023-09-201-4/+4
| | | | | | | | | | | In of_regulator_register() call __regulator_register as last step after all fields have been initialized. This was not possible before as __regulator_register() returned the struct regulator_internal * which contained the remaining fields. Now that struct regulator_internal is gone we can restore the natural initialization order. Link: https://lore.barebox.org/20230920103316.2758383-9-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Add missing cases in regulator_map_voltage()Sascha Hauer2023-09-201-1/+4
| | | | | | | | | regulator_map_voltage() misses to handle some cases, sync this with the kernel. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20230920103316.2758383-6-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: add regulator_get_voltage_internal()Sascha Hauer2023-09-201-25/+27
| | | | | | | | | regulator_get_voltage() works on struct regulator * which may not always be available internally, so add a regulator_get_voltage_internal() and use it from regulator_get_voltage(). Link: https://lore.barebox.org/20230920103316.2758383-5-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: introduce regulator logging functions.Sascha Hauer2023-09-201-2/+10
| | | | | | | | | | | dev_* functions only print the struct device * as context, but often a single struct device * implements multiple regulators. Add rdev_* logging functions which allow to to print one specific regulator as context. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20230920103316.2758383-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: merge struct regulator_internal fields into struct regulator_devSascha Hauer2023-09-201-117/+97
| | | | | | | | | | | | | | Each struct regulator_dev instance has a struct regulator_internal associated with it. The idea was that core internal fields are seen by the core only. In the end this is more confusing than helpful. We have a ri->rdev link, but no rdev->ri link so that we can't get a rdev from a ri pointer. We could add that link, but instead make the whole stuff a bit easier by just merging everything from struct regulator_internal to struct regulator_dev. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20230920103316.2758383-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: rename variable rd to rdevSascha Hauer2023-09-201-16/+16
| | | | | | | | | the struct regulator_dev * variable is mostly named 'rdev', but sometimes 'rd' is used. Rename to 'rdev' consistently. Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20230920103316.2758383-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: Print device nodes with %pOFSascha Hauer2023-07-031-2/+2
| | | | | | | We have the %pOF format specifier for printing device nodes. Use it where appropriate. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: core: add debug print for regulator_resolve_supplyAhmad Fatoum2023-06-011-0/+2
| | | | | | | | | | | Starting with commit 324bd9bbe7e8 ("regulator: recursively enable/disable regulator dependency tree"), regulator operations may affect more than just the one regulator being enabled. Place a debug print, so it's easier to follow the dependency chain. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20230531062923.670941-1-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: drop trailing spaceAhmad Fatoum2023-05-021-1/+1
| | | | | | | | | | | | | | Found by manual inspection of the output of: rg '\s+$' | rg -v dts/ Patch can be verified by observing that no diff results from: git show --ignore-space-at-eol Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20230424121805.150434-4-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-101-6/+9
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename device_d::device_node to device_d::of_nodeSascha Hauer2023-01-101-4/+4
| | | | | | | | | | | | | | | | | | | | Linux struct device has the member of_node for the device_node pointer. Rename this in barebox accordingly to minimize the necessary changes when porting Linux code. This was done with the semantic patch: @@ struct device_d E; @@ - E.device_node + E.of_node @@ struct device_d *E; @@ - E->device_node + E->of_node Plus some manual adjustments. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: core: don't call of_regulator_get with NULL argumentAhmad Fatoum2022-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | regulator_get calls either of_regulator_get or dev_regulator_get, both of which accept a supply parameter. Only dev_regulator_get gracefully handles a NULL supply by considering all registered regulators. of_regulator_get on the other hand, will complain at debug level, before returning NULL: uart-pl011 fe201000.serial@7e201000.of: No <NULL>-supply node found, using dummy regulator Avoid this message by skipping of_regulator_get if no supply was found and directly call dev_regulator_get. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221201133853.639287-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/rk808'Sascha Hauer2022-08-111-4/+63
|\
| * regulator: recursively enable/disable regulator dependency treeAhmad Fatoum2022-08-111-3/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regulators may themself have other regulators supplying them. The regulators need to be enabled recursively for proper operation. Linux handles this by allows drivers to provide struct regulator_desc::supply_name, which will be requested when the regulator itself is requested and enabled/disabled as necessary. As no driver yet uses this new member, this should introduce no functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220724190006.2160802-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * regulator: consult min_uv, max_uv for regulator_get_voltageAhmad Fatoum2022-08-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Fixed regulators currently always end up in the return -EINVAL else branch. In Linux, the fixed regulator driver parses the DT and will populate fixed_uV if min_uv and max_uv are equal. For barebox, it's easier to do this in the core, but the result is the same: We now can call regulator_get_voltage for fixed regulators. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220724190006.2160802-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2022-08-111-2/+7
|\ \ | |/ |/|
| * regulator: fixed: remove duplicate always-on handlingAhmad Fatoum2022-07-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | Regulator core already handles always-on property by enabling always-on regulators at registration time, so we can remove duplicate handling in the fixed-regulator driver. To avoid regressions due to previously unnoticed unbalanced regulator usage, maintain a positive use count always like Linux does and additionally warn on violation attempt. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Link: https://lore.barebox.org/20220708061539.1193059-1-ahmad@a3f.at Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | regulator: handle regulator_get_voltage(NULL) gracefullyAhmad Fatoum2022-08-081-1/+6
|/ | | | | | | | | | | | | | | | | Unlike recent versions of Linux, barebox represents the dummy regulator as a NULL pointer and regulator API is supposed to anticipate operation on a NULL pointer. When regulator_get_voltage was ported from Linux, this was not taken into consideration, which leads to regulator_get_voltage(NULL) crashing with a NULL pointer dereference. Fix this by returning -EINVAL for dummy regulators. This aligns us with how Linux would behave in this situation. Fixes: 6ee83ce08b24 ("regulator: add regulator_get_voltage() to API") Reported-by: Johannes Zink <j.zink@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220718114824.2632364-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/stm32'Sascha Hauer2022-03-141-0/+2
|\
| * regulator: core: fall back to node name if no regulator-name propertyAhmad Fatoum2022-03-081-0/+2
| | | | | | | | | | | | | | | | | | So far, the regulator was created anyway, but attempting to print the name by the regulator command just output a "<NULL>" string. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220220124736.3052502-23-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2022-03-141-3/+4
|\ \
| * | regulator: fix memory leak #2Sascha Hauer2022-03-011-2/+2
| | | | | | | | | | | | | | | | | | Fix memory leak of propname. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | regulator: fix memory leakAndrej Picej2022-03-011-1/+2
| |/ | | | | | | | | | | | | Fix memory leak of propname. Signed-off-by: Andrej Picej <andrej.picej@norik.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / regulator: fix enabling of always-on regulatorsAhmad Fatoum2022-03-011-1/+1
|/ | | | | | | | | We need to enable on either case, not if both are given. Fixes: 9f542bd73948 ("regulator: respect "regulator-always-on" property") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220228145612.867073-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: respect "regulator-always-on" propertyEnrico Jorns2022-01-051-1/+2
| | | | | | | | | | | | As barebox ignored this property, a regulator could have been disabled even if it should not have been. By taking the same path as for 'regulator-boot-on', we ensure always holding an enable count > 0 on the regulator. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103115718.1723730-6-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: fix broken reference counting on disableAhmad Fatoum2022-01-051-0/+5
| | | | | | | | | | | | Reference count is maintained correctly when enabling, but the very first disable will ignore the reference count and disable the regulator unconditionally. Make disable with an enable_count > 1 a no-op to fix this. Reported-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103115718.1723730-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/misc'Sascha Hauer2021-12-151-1/+1
|\
| * drivers: migrate "GPL-2.0" license identifiers to SPDX 2.0Roland Hieber2021-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | "GPL-2.0-only" was introduced in SPDX 2.0, and the old identifier "GPL-2.0" is now considered deprecated; see <https://spdx.org/licenses>. Fixes: 28f4a6a4df76f0f1581d (2021-10-30, "drivers: add missing SPDX-License-Identifier") Signed-off-by: Roland Hieber <rhi@pengutronix.de> Link: https://lore.barebox.org/20211117113851.2022669-2-rhi@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | regulator: allow use of dummy regulatorAndrej Picej2021-11-251-2/+18
|/ | | | | | | | | | | | | | | | The idea of devicetree property which allows use of dummy regulator is not new but has not been implemented until now. This implementation uses barebox specific devicetree property "barebox,allow-dummy-supply" to allow switching to a dummy power regulator in cases where proper regulator driver is not available. This property can be set for regulator or for PMIC regulators nodes, which then allow use of dummy regulator for all its child nodes. Basically just catch the regulators ensure_probed error, if "barebox,allow-dummy-supply" property is set and return dummy regulator. Signed-off-by: Andrej Picej <andrej.picej@norik.com> Link: https://lore.barebox.org/20211119095429.1905473-5-andrej.picej@norik.com Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/spdx'Sascha Hauer2021-11-151-10/+1
|\
| * drivers: add missing SPDX-License-IdentifierAhmad Fatoum2021-11-011-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the suitable SPDX-License-Identifier to all files in drivers/ that previously lacked one. To aid manual inspection, following heuristics can be used: * No changes outside of comments/whitespace: git show -U0 HEAD | rg -v '^(@@|diff|index)|[-+]([-+]|//|#|[\s/]\*)' * -or-later come in pairs: git show --inter-hunk-context=19 HEAD | \ perl -0777 -F'/^@/gm' -ne 'for (@F) { @m = /later/g; print if @m & 1 }' Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030175632.2276077-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | regulator: fix bitrotted EXPORT_SYMBOL_GPLAhmad Fatoum2021-11-011-1/+1
|/ | | | | | | | | Build with module support enabled rightfully complains about the unknown symbol. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20211030175812.2276705-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* common: add initial barebox deep-probe supportMarco Felsch2021-06-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The barebox 'deep probe' or 'probe on demand' mechanism is the answer of unwanted -EPROBE_DEFER failures. The EPROBE_DEFER error code was introduced by commit ab3da15bc14c ("base: Introduce deferred probing") and since then it causes a few problems. The error is returned if either the device is not yet present or the driver is not yet registered. This makes sense on linux systems where modules and hot-plug devices are used very often but not for barebox. The module support is rarely used and devices aren't hot pluggable. The current barebox behaviour populates all devices before the drivers are registered so all devices are present during the driver registration. So the driver probe() function gets called immediately after the driver registration and causes the -EPROBE_DEFER error if this driver depends on an other not yet registered driver. To get rid of the EPROBE_DEFER error code we need to reorder the device population and the driver registration. All drivers must be registered first. In an ideal world all driver can be registered by the same initcall level. Then devices are getting populated which causes calling the driver probe() function but this time resources/devices are created on demand if not yet available. Dependencies between devices are normally expressed as references to other device nodes. With deep probe barebox provides helper functions which take a device node and probe the device behind that node if necessary. This means instead of returning -EPROBE_DEFER, we can now make the desired resources available once we need them. If the resource can't be created we are returning -ENODEV since we are not supporting hot-plugging. Dropping EPROBE_DEFER is the long-term goal, avoid initcall shifting is the short-term goal. Call it deep-probe since the on-demand device creation can create very deep stacks. This commit adds the initial support for: spi, i2c, reset, regulator, gpio and clk resource on-demand creation. The deep-probe mechanism must be enabled for each board to avoid breaking changes using deep_probe_enable(). This can be changed later after all boards are converted to the new mechanism. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.pengutronix.de/20201021115813.31645-8-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210625072540.32717-10-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: add support for struct regulator_desc::off_on_delayAhmad Fatoum2021-02-101-0/+3
| | | | | | | | We already honour the enable time in the device tree, read it out of a new regulator_desc::off_on_delay as well, same as Linux does. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: add regulator_get_voltage() to APIAhmad Fatoum2021-02-101-0/+27
| | | | | | | | | | | ADC drivers need to query their reference regulator's voltage to format their raw readings. Provide regulator_get_voltage() so ADC drivers need not hardcode a reference voltage. Regulator drivers that don't support this (i.e. nearly everything in-tree) will have the function return with -EINVAL. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: test of_regulator_register input before accessing itMarco Felsch2020-09-291-0/+3
| | | | | | | Add simple parameter check to avoid possible NULL pointer dereferences. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: improve of_regulator_register error handlingMarco Felsch2020-09-291-0/+3
| | | | | | | Don't ignore errors from __regulator_register(). Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: remove references to CREDITSUwe Kleine-König2020-04-271-3/+0
| | | | | | | | The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97 ("Remove the CREDITS file"). Remove references to it from several files. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: import Linux regulator_bulk APIAhmad Fatoum2020-02-251-0/+139
| | | | | | | | | Linux v5.6-rc1 contains 168 references to regultor_bulk_get, which allows getting multiple regulators to set at once. Instead of open coding them when porting code, port over the helpers to barebox. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: add function to get regulator by its nameSascha Hauer2019-12-201-1/+29
| | | | | | | Useful for getting regulators that are not correctly associated with a device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Assume probe deferral instead of missing regulatorAndrey Smirnov2019-01-181-1/+6
| | | | | | | | | | Don't report requested regulator (via of_regulator_get()) as non-existent if said regulator is missing from regulator list. Instead report it as probe deferral to give other, unprobed, drivers a chance to resolve this. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Add support for setting regulator's voltageAndrey Smirnov2019-01-181-0/+44
| | | | | | | | | Add code needed to implement regulator_set_voltage(). Currently only bare minmum needed for ANATOP driver (added in follow up commit) is supported. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* regulator: Convert drivers to use struct regulator_descAndrey Smirnov2019-01-181-4/+4
| | | | | | | | To simplify porting kernel code, port a very basic struct regulator_desc and convert all of the code to use it. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* string: Fix (v)asprintf prototypesSascha Hauer2016-04-151-1/+1
| | | | | | | | | | Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>