Skip to content

Commit

Permalink
Merge tag 'devicetree-for-4.17' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/kernel/git/robh/linux

Pull DeviceTree updates from Rob Herring:

 - Sync dtc to upstream version v1.4.6-9-gaadd0b65c987. This adds a
   bunch more warnings (hidden behind W=1).

 - Build dtc lexer and parser files instead of using shipped versions.

 - Rework overlay apply API to take an FDT as input and apply overlays
   in a single step.

 - Add a phandle lookup cache. This improves boot time by hundreds of
   msec on systems with large DT.

 - Add trivial mcp4017/18/19 potentiometers bindings.

 - Remove VLA stack usage in DT code.

* tag 'devicetree-for-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (26 commits)
  of: unittest: fix an error code in of_unittest_apply_overlay()
  of: unittest: move misplaced function declaration
  of: unittest: Remove VLA stack usage
  of: overlay: Fix forgotten reference to of_overlay_apply()
  of: Documentation: Fix forgotten reference to of_overlay_apply()
  of: unittest: local return value variable related cleanups
  of: unittest: remove unneeded local return value variables
  dt-bindings: trivial: add various mcp4017/18/19 potentiometers
  of: unittest: fix an error test in of_unittest_overlay_8()
  of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
  dt-bindings: rockchip-dw-mshc: use consistent clock names
  MAINTAINERS: Add linux/of_*.h headers to appropriate subsystems
  scripts: turn off some new dtc warnings by default
  scripts/dtc: Update to upstream version v1.4.6-9-gaadd0b65c987
  scripts/dtc: generate lexer and parser during build instead of shipping
  powerpc: boot: add strrchr function
  of: overlay: do not include path in full_name of added nodes
  of: unittest: clean up changeset test
  arm64/efi: Make strrchr() available to the EFI namespace
  ARM: boot: add strrchr function
  ...
  • Loading branch information
torvalds committed Apr 6, 2018
2 parents d66db9f + 8274732 commit 9c2dd84
Show file tree
Hide file tree
Showing 45 changed files with 1,213 additions and 5,169 deletions.
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/mmc/rockchip-dw-mshc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Required Properties:
- "rockchip,rk3399-dw-mshc", "rockchip,rk3288-dw-mshc": for Rockchip RK3399

Optional Properties:
* clocks: from common clock binding: if ciu_drive and ciu_sample are
* clocks: from common clock binding: if ciu-drive and ciu-sample are
specified in clock-names, should contain handles to these clocks.

* clock-names: Apart from the clock-names described in synopsys-dw-mshc.txt
two more clocks "ciu-drive" and "ciu-sample" are supported. They are used
to control the clock phases, "ciu-sample" is required for tuning high-
speed modes.

* rockchip,default-sample-phase: The default phase to set ciu_sample at
* rockchip,default-sample-phase: The default phase to set ciu-sample at
probing, low speeds or in case where all phases work at tuning time.
If not specified 0 deg will be used.

Expand Down
12 changes: 12 additions & 0 deletions Documentation/devicetree/bindings/trivial-devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,18 @@ maxim,max6621 PECI-to-I2C translator for PECI-to-SMBus/I2C protocol conversion
maxim,max6625 9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface
mcube,mc3230 mCube 3-axis 8-bit digital accelerometer
memsic,mxc6225 MEMSIC 2-axis 8-bit digital accelerometer
microchip,mcp4017-502 Microchip 7-bit Single I2C Digital POT (5k)
microchip,mcp4017-103 Microchip 7-bit Single I2C Digital POT (10k)
microchip,mcp4017-503 Microchip 7-bit Single I2C Digital POT (50k)
microchip,mcp4017-104 Microchip 7-bit Single I2C Digital POT (100k)
microchip,mcp4018-502 Microchip 7-bit Single I2C Digital POT (5k)
microchip,mcp4018-103 Microchip 7-bit Single I2C Digital POT (10k)
microchip,mcp4018-503 Microchip 7-bit Single I2C Digital POT (50k)
microchip,mcp4018-104 Microchip 7-bit Single I2C Digital POT (100k)
microchip,mcp4019-502 Microchip 7-bit Single I2C Digital POT (5k)
microchip,mcp4019-103 Microchip 7-bit Single I2C Digital POT (10k)
microchip,mcp4019-503 Microchip 7-bit Single I2C Digital POT (50k)
microchip,mcp4019-104 Microchip 7-bit Single I2C Digital POT (100k)
microchip,mcp4531-502 Microchip 7-bit Single I2C Digital Potentiometer (5k)
microchip,mcp4531-103 Microchip 7-bit Single I2C Digital Potentiometer (10k)
microchip,mcp4531-503 Microchip 7-bit Single I2C Digital Potentiometer (50k)
Expand Down
4 changes: 2 additions & 2 deletions Documentation/devicetree/overlay-notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ The API is quite easy to use.
return value is an error or a cookie identifying this overlay.

2. Call of_overlay_remove() to remove and cleanup the overlay changeset
previously created via the call to of_overlay_apply(). Removal of an overlay
changeset that is stacked by another will not be permitted.
previously created via the call to of_overlay_fdt_apply(). Removal of an
overlay changeset that is stacked by another will not be permitted.

Finally, if you need to remove all overlays in one-go, just call
of_overlay_remove_all() which will remove every single one in the correct
Expand Down
4 changes: 4 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4287,6 +4287,7 @@ Q: https://patchwork.kernel.org/project/linux-dmaengine/list/
S: Maintained
F: drivers/dma/
F: include/linux/dmaengine.h
F: include/linux/of_dma.h
F: Documentation/devicetree/bindings/dma/
F: Documentation/driver-api/dmaengine/
T: git git://git.infradead.org/users/vkoul/slave-dma.git
Expand Down Expand Up @@ -5986,6 +5987,7 @@ F: Documentation/ABI/obsolete/sysfs-gpio
F: drivers/gpio/
F: include/linux/gpio/
F: include/linux/gpio.h
F: include/linux/of_gpio.h
F: include/asm-generic/gpio.h
F: include/uapi/linux/gpio.h
F: tools/gpio/
Expand Down Expand Up @@ -7295,6 +7297,7 @@ S: Maintained
F: Documentation/devicetree/bindings/iommu/
F: drivers/iommu/
F: include/linux/iommu.h
F: include/linux/of_iommu.h
F: include/linux/iova.h

IP MASQUERADING
Expand Down Expand Up @@ -10785,6 +10788,7 @@ F: drivers/acpi/pci*
F: drivers/pci/
F: include/asm-generic/pci*
F: include/linux/pci*
F: include/linux/of_pci.h
F: include/uapi/linux/pci*
F: lib/pci*
F: arch/x86/pci/
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/boot/compressed/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ char *strchr(const char *s, int c)
return (char *)s;
}

char *strrchr(const char *s, int c)
{
const char *last = NULL;
do {
if (*s == (char)c)
last = s;
} while (*s++);
return (char *)last;
}

#undef memset

void *memset(void *s, int c, size_t count)
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/kernel/image.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ __efistub_strlen = KALLSYMS_HIDE(__pi_strlen);
__efistub_strnlen = KALLSYMS_HIDE(__pi_strnlen);
__efistub_strcmp = KALLSYMS_HIDE(__pi_strcmp);
__efistub_strncmp = KALLSYMS_HIDE(__pi_strncmp);
__efistub_strrchr = KALLSYMS_HIDE(__pi_strrchr);
__efistub___flush_dcache_area = KALLSYMS_HIDE(__pi___flush_dcache_area);

#ifdef CONFIG_KASAN
Expand Down
2 changes: 1 addition & 1 deletion arch/arm64/lib/strrchr.S
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ ENTRY(strrchr)
b 1b
2: mov x0, x3
ret
ENDPROC(strrchr)
ENDPIPROC(strrchr)
10 changes: 10 additions & 0 deletions arch/powerpc/boot/stdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ size_t strnlen(const char * s, size_t count)
return sc - s;
}

char *strrchr(const char *s, int c)
{
const char *last = NULL;
do {
if (*s == (char)c)
last = s;
} while (*s++);
return (char *)last;
}

#ifdef __powerpc64__

# define do_div(n, base) ({ \
Expand Down
1 change: 1 addition & 0 deletions arch/powerpc/boot/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ extern char *strcpy(char *dest, const char *src);
extern char *strncpy(char *dest, const char *src, size_t n);
extern char *strcat(char *dest, const char *src);
extern char *strchr(const char *s, int c);
extern char *strrchr(const char *s, int c);
extern int strcmp(const char *s1, const char *s2);
extern int strncmp(const char *s1, const char *s2, size_t n);
extern size_t strlen(const char *s);
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpio/gpiolib-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,
struct gpio_desc *desc;
int ret;

ret = of_parse_phandle_with_args(np, propname, "#gpio-cells", index,
&gpiospec);
ret = of_parse_phandle_with_args_map(np, propname, "gpio", index,
&gpiospec);
if (ret) {
pr_debug("%s: can't parse '%s' property of node '%pOF[%d]'\n",
__func__, propname, np, index);
Expand Down
Loading

0 comments on commit 9c2dd84

Please sign in to comment.