summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* security: keys: Replace time_t/timespec with time64_tBaolin Wang2017-11-158-55/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | The 'struct key' will use 'time_t' which we try to remove in the kernel, since 'time_t' is not year 2038 safe on 32bit systems. Also the 'struct keyring_search_context' will use 'timespec' type to record current time, which is also not year 2038 safe on 32bit systems. Thus this patch replaces 'time_t' with 'time64_t' which is year 2038 safe for 'struct key', and replace 'timespec' with 'time64_t' for the 'struct keyring_search_context', since we only look at the the seconds part of 'timespec' variable. Moreover we also change the codes where using the 'time_t' and 'timespec', and we can get current time by ktime_get_real_seconds() instead of current_kernel_time(), and use 'TIME64_MAX' macro to initialize the 'time64_t' type variable. Especially in proc.c file, we have replaced 'unsigned long' and 'timespec' type with 'u64' and 'time64_t' type to save the timeout value, which means user will get one 'u64' type timeout value by issuing proc_keys_show() function. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: James Morris <james.l.morris@oracle.com>
* KEYS: fix in-kernel documentation for keyctl_read()Eric Biggers2017-11-151-5/+5
| | | | | | | | | | | | | When keyctl_read() is passed a buffer that is too small, the behavior is inconsistent. Some key types will fill as much of the buffer as possible, while others won't copy anything. Moreover, the in-kernel documentation contradicted the man page on this point. Update the in-kernel documentation to say that this point is unspecified. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: David Howells <dhowells@redhat.com>
* Merge tag 'devicetree-for-4.15' of ↵Linus Torvalds2017-11-14237-1439/+3136
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: "A bigger diffstat than usual with the kbuild changes and a tree wide fix in the binding documentation. Summary: - kbuild cleanups and improvements for dtbs - Code clean-up of overlay code and fixing for some long standing memory leak and race condition in applying overlays - Improvements to DT memory usage making sysfs/kobjects optional and skipping unflattening of disabled nodes. This is part of kernel tinification efforts. - Final piece of removing storing the full path for every DT node. The prerequisite conversion of printk's to use device_node format specifier happened in 4.14. - Sync with current upstream dtc. This brings additional checks to dtb compiling. - Binding doc tree wide removal of leading 0s from examples - RTC binding documentation adding missing devices and some consolidation of duplicated bindings - Vendor prefix documentation for nutsboard, Silicon Storage Technology, shimafuji, Tecon Microprocessor Technologies, DH electronics GmbH, Opal Kelly, and Next Thing" * tag 'devicetree-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (55 commits) dt-bindings: usb: add #phy-cells to usb-nop-xceiv dt-bindings: Remove leading zeros from bindings notation kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry kbuild: clean up *.dtb and *.dtb.S patterns from top-level Makefile .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore .gitignore: sort normal pattern rules alphabetically dt-bindings: add vendor prefix for Next Thing Co. scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9 of: dynamic: fix memory leak related to properties of __of_node_dup of: overlay: make pr_err() string unique of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove of: overlay: remove unneeded check for NULL kbasename() of: overlay: remove a dependency on device node full_name of: overlay: simplify applying symbols from an overlay of: overlay: avoid race condition between applying multiple overlays of: overlay: loosen overly strict phandle clash check of: overlay: expand check of whether overlay changeset can be removed of: overlay: detect cases where device tree may become corrupt of: overlay: minor restructuring ...
| * dt-bindings: usb: add #phy-cells to usb-nop-xceivRob Herring2017-11-131-0/+2
| | | | | | | | | | | | | | | | | | Consumers of usb-nop-xceiv use the phy binding, but #phy-cells is missing from the binding. This is probably because this binding predates the common phy binding. So add #phy-cells as a required property. This should not break any users as missing should be treated as 0 cells. Signed-off-by: Rob Herring <robh@kernel.org>
| * Merge branch 'dt/kbuild' into dt/nextRob Herring2017-11-0968-275/+79
| |\
| | * kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.libMasahiro Yamada2017-11-0948-182/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CONFIG_OF_ALL_DTBS is enabled, "make ARCH=arm64 dtbs" compiles each DTB twice; one from arch/arm64/boot/dts/*/Makefile and the other from the dtb-$(CONFIG_OF_ALL_DTBS) line in arch/arm64/boot/dts/Makefile. It could be a race problem when building DTBS in parallel. Another minor issue is CONFIG_OF_ALL_DTBS covers only *.dts in vendor sub-directories, so this broke when Broadcom added one more hierarchy in arch/arm64/boot/dts/broadcom/<soc>/. One idea to fix the issues in a clean way is to move DTB handling to Kbuild core scripts. Makefile.dtbinst already recognizes dtb-y natively, so it should not hurt to do so. Add $(dtb-y) to extra-y, and $(dtb-) as well if CONFIG_OF_ALL_DTBS is enabled. All clutter things in Makefiles go away. As a bonus clean-up, I also removed dts-dirs. Just use subdir-y directly to traverse sub-directories. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Arnd Bergmann <arnd@arndb.de> [robh: corrected BUILTIN_DTB to CONFIG_BUILTIN_DTB] Signed-off-by: Rob Herring <robh@kernel.org>
| | * MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entryMasahiro Yamada2017-11-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arch/mips/boot/dts/brcm/bcm96358nb4ser.dts does not exist, so we cannot build bcm96358nb4ser.dtb . Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Fixes: 695835511f96 ("MIPS: BMIPS: rename bcm96358nb4ser to bcm6358-neufbox4-sercom") Cc: stable@vger.kernel.org # 4.9+ Acked-by: James Hogan <jhogan@kernel.org> Signed-off-by: Rob Herring <robh@kernel.org>
| | * kbuild: clean up *.dtb and *.dtb.S patterns from top-level MakefileMasahiro Yamada2017-11-0854-60/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to add "clean-files" in Makfiles to clean up DT blobs, but we often miss to do so. Since there are no source files that end with .dtb or .dtb.S, so we can clean-up those files from the top-level Makefile. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rob Herring <robh@kernel.org>
| | * .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignoreMasahiro Yamada2017-11-0811-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of DT files are compiled under arch/*/boot/dts/, but we have some other directories, like drivers/of/unittest-data/. We often miss to add gitignore patterns per directory. Since there are no source files that end with .dtb or .dtb.S, we can ignore the patterns globally. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Rob Herring <robh@kernel.org>
| | * .gitignore: sort normal pattern rules alphabeticallyMasahiro Yamada2017-11-081-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | We are having more and more ignore patterns. Sort the list alphabetically. We will easily catch duplicated patterns if any. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | dt-bindings: Remove leading zeros from bindings notationMarco Franchi2017-11-09126-172/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the binding example by removing all the leading zeros to fix the following dtc warnings: Warning (unit_address_format): Node /XXX unit name should not have leading 0s Converted using the following command: perl -p -i -e 's/\@0+([0-9a-f])/\@$1/g' `find ./Documentation/devicetree/bindings "*.txt"` Some unnecessary changes were manually fixed. Signed-off-by: Marco Franchi <marco.franchi@nxp.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | dt-bindings: add vendor prefix for Next Thing Co.Martin Blumenstingl2017-11-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Next Thing Co. is the company behind the C.H.I.P. and C.H.I.P. Pro miniature single board computers. The "nextthing" vendor-prefix is already used for these two board as well as their own "GR8" SoC. Cc: Alexander Kaplan <alex@nextthing.co> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9Rob Herring2017-10-252-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pickup the fix for handling unresolved phandles in overlays. This adds the following commits from upstream: c1e55a5513e9 checks: fix handling of unresolved phandles for dts plugins f8872e29ce06 tests: Avoid 64-bit arithmetic in assembler 48c91c08bcfa libfdt: add stringlist functions to linker script Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: dynamic: fix memory leak related to properties of __of_node_dupLixin Wang2017-10-231-12/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a node with no properties is dynamically added, then a property is dynamically added to the node, then the property is dynamically removed, the result will be node->properties == NULL and node->deadprops != NULL. Add a separate function to release the properties in both lists. Signed-off-by: Lixin Wang <alan.1.wang@nokia-sbell.com> Reviewed-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: make pr_err() string uniqueFrank Rowand2017-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same error string occurs in drivers/of/resolver.c. Change the error here to more precisely describe this case, and avoid the possible confusion of looking in the wrong source location to understand the cause of an error. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: pr_err from return NOTIFY_OK to overlay apply/removeFrank Rowand2017-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A device tree overlay notifier can return NOTIFY_OK, NOTIFY_STOP, or an embedded errno. overlay_notify() incorrectly reports an error for NOTIFY_OK. Reported-by: atull@kernel.org Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: remove unneeded check for NULL kbasename()Frank Rowand2017-10-171-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | kbasename() will not return NULL if passed a valid string. If the parameter passed to kbasename() in this case is already NULL then the devicetree has been corrupted. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: remove a dependency on device node full_nameFrank Rowand2017-10-173-35/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "%pOF" printf format was recently added to print the full name of a device tree node, with the intent of changing the node full_name field to contain only the node name instead of the full path of the node. dup_and_fixup_symbol_prop() duplicates a property from the "/__symbols__" node of an overlay device tree. The value of each duplicated property must be fixed up to include the full path of a node in the live device tree. The current code uses the node's full_name for that purpose. Update the code to use the "%pOF" printf format to determine the node's full path. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: simplify applying symbols from an overlayFrank Rowand2017-10-171-26/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code to apply symbols from an overlay to the live device tree was implemented with the intent to be minimally intrusive on the existing code. After recent restructuring of the overlay apply code, it is easier to disintangle the code that applies the symbols, and to make the overlay changeset creation code more straight forward and understandable. Remove the extra complexity, and make the code more obvious. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: avoid race condition between applying multiple overlaysFrank Rowand2017-10-176-15/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The process of applying an overlay consists of: - unflatten an overlay FDT (flattened device tree) into an EDT (expanded device tree) - fixup the phandle values in the overlay EDT to fit in a range above the phandle values in the live device tree - create the overlay changeset to reflect the contents of the overlay EDT - apply the overlay changeset, to modify the live device tree, potentially changing the maximum phandle value in the live device tree There is currently no protection against two overlay applies concurrently determining what range of phandle values are in use in the live device tree, and subsequently changing that range. Add a mutex to prevent multiple overlay applies from occurring simultaneously. Move of_resolve_phandles() into of_overlay_apply() so that it does not have to be duplicated by each caller of of_overlay_apply(). The test in of_resolve_phandles() that the overlay tree is detached is temporarily disabled so that old style overlay unittests do not fail. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: loosen overly strict phandle clash checkFrank Rowand2017-10-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an overlay contains a node that already exists in the live device tree, the overlay node is not allowed to change the phandle of the existing node. The existing check refused to allow an overlay node to set the node phandle even when the existing node did not have a phandle. Relax the check to allow an overlay node to set the phandle value if the existing node does not have a phandle. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: expand check of whether overlay changeset can be removedFrank Rowand2017-10-171-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test of whether it is safe to remove an overlay changeset looked at whether any node in the overlay changeset was in a subtree rooted at any more recently applied overlay changeset node. The test failed to determine whether any node in the overlay changeset was the root of a subtree that contained a more recently applied overlay changeset node. Add this additional check to the test. The test is still lacking any check for any phandle dependencies. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: detect cases where device tree may become corruptFrank Rowand2017-10-176-96/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an attempt to apply an overlay changeset fails, an effort is made to revert any partial application of the changeset. When an attempt to remove an overlay changeset fails, an effort is made to re-apply any partial reversion of the changeset. The existing code does not check for failure to recover a failed overlay changeset application or overlay changeset revert. Add the missing checks and flag the devicetree as corrupt if the state of the devicetree can not be determined. Improve and expand the returned errors to more fully reflect the result of the effort to undo the partial effects of a failed attempt to apply or remove an overlay changeset. If the device tree might be corrupt, do not allow further attempts to apply or remove an overlay changeset. When creating an overlay changeset from an overlay device tree, add some additional warnings if the state of the overlay device tree is not as expected. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: minor restructuringFrank Rowand2017-10-171-113/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continue improving the readability of overlay.c. The previous patches renamed identifiers. This patch is split out from the previous patches to make the previous patches easier to review. Changes are: - minor code restructuring - some initialization of an overlay changeset occurred outside of init_overlay_changeset(), move that into init_overlay_changeset() - consolidate freeing an overlay changeset into free_overlay_changeset() This patch is intended to not introduce any functional change. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: rename identifiers in dup_and_fixup_symbol_prop()Frank Rowand2017-10-171-6/+18
| | | | | | | | | | | | | | | | | | | | | More renaming of identifiers to better reflect what they do. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: rename identifiers to more reflect what they doFrank Rowand2017-10-176-271/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is aimed primarily at drivers/of/overlay.c, but those changes also have a small impact in a few other files. overlay.c is difficult to read and maintain. Improve readability: - Rename functions, types and variables to better reflect what they do and to be consistent with names in other places, such as the device tree overlay FDT (flattened device tree), and make the algorithms more clear - Use the same names consistently throughout the file - Update comments for name changes - Fix incorrect comments This patch is intended to not introduce any functional change. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay.c: Convert comparisons to zero or NULL to logical expressionsFrank Rowand2017-10-171-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use normal shorthand for comparing a variable to zero. For variable "XXX": convert (XXX == 0) to (!XXX) convert (XXX != 0) to (XXX) Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay.c: Remove comments that state the obvious, to reduce clutterFrank Rowand2017-10-171-29/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follows recommendations in Documentation/process/coding-style.rst, section 8, Commenting. Some in function comments are promoted to function header comments. Signed-off-by: Frank Rowand <frank.rowand@sony.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | dt-bindings: Add vendor prefix for Opal Kelly IncTom McLeod2017-10-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Opal Kelly is a manufacturer of FPGA Integration Modules. Signed-off-by: Tom McLeod <tom.mcleod@opalkelly.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: overlay: fix memory leak related to duplicated propertyLixin Wang2017-10-171-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | Function of_changeset_add_property or of_changeset_update_property may fails. In this case the property just allocated is never deallocated. Signed-off-by: Lixin Wang <alan.1.wang@nokia-sbell.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: unittest: Remove redundant OF_DETACHED flag settingStephen Boyd2017-10-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_fdt_unflatten_tree() already sets the flag on the node to OF_DETACHED, because of_fdt_unflatten_tree() calls __unflatten_device_tree() with the detached bool set to true. Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of/fdt: Document detached argument to __unflatten_device_tree()Stephen Boyd2017-10-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This wasn't documented. Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of/resolver: Replace kmalloc + memcpy with kmemdup()Stephen Boyd2017-10-161-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Save one line. Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of/resolver: Simplify to be32_add_cpu()Stephen Boyd2017-10-161-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same as be32_add_cpu(), so simplify the code and remove the now unused local variable. Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of/fdt: skip unflattening of disabled nodesRob Herring2017-10-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For static DT usecases, we don't need the disabled nodes and can skip unflattening. This saves a significant amount of RAM in memory constrained cases. In one example on STM32F469, the RAM usage goes from 118K to 26K. There are a few cases in the kernel that modify the status property dynamically. These all are changes from enabled to disabled, depend on OF_DYNAMIC or are not FDT based (PDT based). Tested-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of/fdt: add of_fdt_device_is_available functionRob Herring2017-10-161-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add an equivalent function to of_device_is_available for flattened DT, and convert the one existing open coded occurrence. Tested-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: make kobject and bin_attribute support configurableRob Herring2017-10-167-164/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having device_nodes be kobjects is only needed if sysfs or OF_DYNAMIC is enabled. Otherwise, having a kobject in struct device_node is unnecessary bloat in minimal kernel configurations. Likewise, bin_attribute is only needed in struct property when sysfs is enabled, so we can make it configurable too. Tested-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: wrap accesses to device_node kobjectRob Herring2017-10-162-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation to make kobject element in struct device_node optional, provide and use a macro to return the kobject pointer. The only user outside the DT core is the driver core. Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Tested-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: move kobj_to_device_node() into dynamic.cRob Herring2017-10-162-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only user of kobj_to_device_node() is in dynamic.c, so move it there. This avoids having to make it conditional once kobject is configurable. Tested-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: make struct property _flags field configurableRob Herring2017-10-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only Sparc and CONFIG_OF_DYNAMIC use the struct property._flags field, so make it conditional shrinking struct property a bit. Tested-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: remove struct property.unique_id for FDTRob Herring2017-10-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only Sparc uses unique_id, so remove it for FDT builds and shrink struct property a bit making the unflattened DT less of a memory hog. Tested-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <robh@kernel.org>
| * | of: fix missing kobject init for !SYSFS && OF_DYNAMIC configRob Herring2017-10-161-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ref counting is broken for OF_DYNAMIC when sysfs is disabled because the kobject initialization is skipped. Only the properties add/remove/update should be skipped for !SYSFS config. Tested-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <robh@kernel.org>
| * | devicetree: Add vendor-prefix for DH electronics GmbHMarek Vasut2017-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add vendor prefix for DH electronics GmbH, https://www.dh-electronics.com . The company is a SoM and evaluation board manufacturer. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Rob Herring <robh@kernel.org>
| * | dt-bindings: iommu: ipmmu-vmsa: Use generic node nameGeert Uytterhoeven2017-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use the preferred generic node name in the example. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Rob Herring <robh@kernel.org>
| * | dt-bindings: rtc: merge ds1339 in ds1307 documentationAlexandre Belloni2017-10-052-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | Now that there is documentation for the ds1307 and compatible RTCs, merge the ds1339 documentation in it. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | dt-bindings: rtc: Add bindings for m41t80 and compatiblesAlexandre Belloni2017-10-052-2/+31
| | | | | | | | | | | | | | | | | | | | | The ST M41T80 family of RTC are not trivial devices, document them. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | dt-bindings: rtc: DS1307 and compatibles are not trivialAlexandre Belloni2017-10-052-6/+36
| | | | | | | | | | | | | | | | | | | | | Document optional properties for ds1307 and compatible RTCs Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | dt-bindings: rtc: Add sirf,prima2-sysrtc bindingsAlexandre Belloni2017-10-051-0/+13
| | | | | | | | | | | | | | | | | | | | | Add device tree bindings for the SiRFSoC Real Time Clock. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | dt-bindings: rtc: add stericsson,coh901331 bindingsAlexandre Belloni2017-10-051-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add device tree bindings for the ST-Ericsson COH 901 331 Real Time Clock Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Rob Herring <robh@kernel.org>
| * | dt-bindings: trivial: Add RTCsAlexandre Belloni2017-10-051-0/+5
| | | | | | | | | | | | | | | | | | | | | Add remaining trivial RTC bindings. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Rob Herring <robh@kernel.org>