[<vendor>,]nr-gpios property is used by some GPIO drivers[0] to indicate
the number of GPIOs present on a system, not define a GPIO. nr-gpios is
not configured by #gpio-cells and can't be parsed along with other
"*-gpios" properties.
scripts/dtc/checks.c also has a special case for nr-gpio{s}. However,
nr-gpio is not really special, so we only need to fix nr-gpios suffix
here.
[0]: nr-gpios is referenced in Documentation/devicetree/bindings/gpio:
- gpio-adnp.txt
- gpio-xgene-sb.txt
- gpio-xlp.txt
- snps,dw-apb-gpio.yaml
Fixes errors such as:
OF: /palmbus@300000/gpio@600: could not find phandle
Call Trace:
of_phandle_iterator_next+0x8c/0x16c
__of_parse_phandle_with_args+0x38/0xb8
of_parse_phandle_with_args+0x28/0x3c
parse_suffix_prop_cells+0x80/0xac
parse_gpios+0x20/0x2c
of_link_to_suppliers+0x18c/0x288
of_link_to_suppliers+0x1fc/0x288
device_add+0x4e0/0x734
of_platform_device_create_pdata+0xb8/0xfc
of_platform_bus_create+0x170/0x214
of_platform_populate+0x88/0xf4
__dt_register_buses+0xbc/0xf0
plat_of_setup+0x1c/0x34
Fixes: 7f00be96f125 ("of: property: Add device link support for interrupt-parent, dmas and -gpio(s)")
Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy(a)gmail.com>
Cc: Saravana Kannan <saravanak(a)google.com>
Cc: <stable(a)vger.kernel.org> # 5.5.x
---
drivers/of/property.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/of/property.c b/drivers/of/property.c
index 2bb3158c9e43..24672c295603 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1271,7 +1271,16 @@ DEFINE_SIMPLE_PROP(pinctrl8, "pinctrl-8", NULL)
DEFINE_SIMPLE_PROP(remote_endpoint, "remote-endpoint", NULL)
DEFINE_SUFFIX_PROP(regulators, "-supply", NULL)
DEFINE_SUFFIX_PROP(gpio, "-gpio", "#gpio-cells")
-DEFINE_SUFFIX_PROP(gpios, "-gpios", "#gpio-cells")
+
+static struct device_node *parse_gpios(struct device_node *np,
+ const char *prop_name, int index)
+{
+ if (!strcmp_suffix(prop_name, "nr-gpios"))
+ return NULL;
+
+ return parse_suffix_prop_cells(np, prop_name, index, "-gpios",
+ "#gpio-cells");
+}
static struct device_node *parse_iommu_maps(struct device_node *np,
const char *prop_name, int index)
--
2.31.1
I'm announcing the release of the 5.11.13 kernel.
All users of the 5.11 kernel series must upgrade.
The updated 5.11.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.11.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/arm64/silicon-errata.rst | 3
Makefile | 15 +++-
arch/arm/boot/dts/am33xx.dtsi | 3
arch/arm64/Kconfig | 10 ++
arch/arm64/include/asm/cpucaps.h | 3
arch/arm64/kernel/cpu_errata.c | 8 ++
arch/arm64/kernel/cpufeature.c | 5 +
arch/ia64/kernel/err_inject.c | 22 +++---
arch/ia64/kernel/mca.c | 2
arch/x86/Makefile | 2
arch/x86/net/bpf_jit_comp.c | 15 +++-
arch/x86/net/bpf_jit_comp32.c | 11 ++-
drivers/bus/ti-sysc.c | 4 -
drivers/gpu/drm/msm/adreno/a5xx_power.c | 2
drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 77 ++++++++++++++++++----
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 12 ++-
drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c | 2
drivers/gpu/drm/msm/msm_fence.c | 2
drivers/isdn/hardware/mISDN/mISDNipac.c | 2
drivers/net/arcnet/com20020-pci.c | 34 +++++----
drivers/net/can/usb/Kconfig | 1
drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c | 4 -
drivers/net/ethernet/marvell/pxa168_eth.c | 2
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 -
drivers/net/ipa/ipa_cmd.c | 50 +++++++++-----
drivers/platform/x86/intel-hid.c | 7 ++
drivers/platform/x86/intel_pmc_core.c | 50 ++++++++++----
drivers/platform/x86/intel_pmt_class.c | 2
drivers/platform/x86/thinkpad_acpi.c | 8 ++
drivers/ptp/ptp_qoriq.c | 13 ++-
drivers/target/target_core_pscsi.c | 8 ++
fs/block_dev.c | 4 -
fs/cifs/file.c | 1
fs/cifs/smb2misc.c | 4 -
fs/io_uring.c | 8 +-
init/Kconfig | 3
lib/math/div64.c | 1
net/mac80211/aead_api.c | 5 -
net/mac80211/aes_gmac.c | 5 -
net/mac80211/main.c | 13 +++
net/netfilter/nf_conntrack_proto_gre.c | 3
net/netfilter/nf_tables_api.c | 3
tools/bpf/resolve_btfids/.gitignore | 3
tools/bpf/resolve_btfids/Makefile | 44 ++++++------
tools/testing/kunit/kunit_config.py | 2
tools/testing/selftests/arm64/fp/sve-test.S | 22 ++++--
tools/testing/selftests/vm/Makefile | 4 -
47 files changed, 356 insertions(+), 153 deletions(-)
Alban Bedel (1):
platform/x86: intel-hid: Support Lenovo ThinkPad X1 Tablet Gen 2
Alex Elder (1):
net: ipa: fix init header command validation
Andre Przywara (1):
kselftest/arm64: sve: Do not use non-canonical FFR register value
Arnd Bergmann (1):
x86/build: Turn off -fcf-protection for realmode targets
Chris Chiu (1):
block: clear GD_NEED_PART_SCAN later in bdev_disk_changed
Daniel Phan (1):
mac80211: Check crypto_aead_encrypt for errors
David E. Box (2):
platform/x86: intel_pmt_class: Initial resource to 0
platform/x86: intel_pmc_core: Ignore GBE LTR on Tiger Lake platforms
David Gow (1):
kunit: tool: Fix a python tuple typing error
David S. Miller (1):
math: Export mul_u64_u64_div_u64
Dmitry Baryshkov (1):
drm/msm/dsi_pll_7nm: Fix variable usage for pll_lockdet_rate
Esteve Varela Colominas (1):
platform/x86: thinkpad_acpi: Allow the FnLock LED to change state
Greg Kroah-Hartman (1):
Linux 5.11.13
Jimmy Assarsson (1):
can: kvaser_usb: Add support for USBcan Pro 4xHS
Jiri Olsa (5):
tools/resolve_btfids: Build libbpf and libsubcmd in separate directories
tools/resolve_btfids: Check objects before removing
tools/resolve_btfids: Set srctree variable unconditionally
kbuild: Add resolve_btfids clean to root clean target
kbuild: Do not clean resolve_btfids if the output does not exist
Jordan Crouse (1):
drm/msm: a6xx: Make sure the SQE microcode is safe
Kalyan Thota (1):
drm/msm/disp/dpu1: icc path needs to be set before dpu runtime resume
Karthikeyan Kathirvel (1):
mac80211: choose first enabled channel for monitor
Konrad Dybcio (1):
drm/msm/adreno: a5xx_power: Don't apply A540 lm_setup to other GPUs
Ludovic Senecaux (1):
netfilter: conntrack: Fix gre tunneling over ipv6
Mans Rullgard (1):
ARM: dts: am33xx: add aliases for mmc interfaces
Martin Wilck (1):
scsi: target: pscsi: Clean up after failure in pscsi_map_sg()
Masahiro Yamada (1):
init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
Pablo Neira Ayuso (1):
netfilter: nftables: skip hook overlap logic if flowtable is stale
Pavel Andrianov (1):
net: pxa168_eth: Fix a potential data race in pxa168_eth_remove
Pavel Begunkov (1):
io_uring: fix timeout cancel return code
Piotr Krysiuk (2):
bpf, x86: Validate computation of branch displacements for x86-64
bpf, x86: Validate computation of branch displacements for x86-32
Rich Wiley (1):
arm64: kernel: disable CNP on Carmel
Rob Clark (1):
drm/msm: Ratelimit invalid-fence message
Rong Chen (1):
selftests/vm: fix out-of-tree build
Ronnie Sahlberg (1):
cifs: revalidate mapping when we open files for SMB1 POSIX
Sergei Trofimovich (2):
ia64: mca: allocate early mca with GFP_ATOMIC
ia64: fix format strings for err_inject
Stanislav Fomichev (1):
tools/resolve_btfids: Add /libbpf to .gitignore
Tariq Toukan (1):
net/mlx5e: Enforce minimum value check for ICOSQ size
Tong Zhang (2):
mISDN: fix crash in fritzpci
net: arcnet: com20020 fix error handling
Tony Lindgren (1):
bus: ti-sysc: Fix warning on unbind if reset is not deasserted
Vincent Whitchurch (1):
cifs: Silently ignore unknown oplock break handle
Yangbo Lu (1):
ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation
Yonghong Song (1):
bpf, x86: Use kvmalloc_array instead kmalloc_array in bpf_jit_comp
I'm announcing the release of the 5.10.29 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 15 +++++-
arch/arm/boot/dts/am33xx.dtsi | 3 +
arch/ia64/kernel/err_inject.c | 22 ++++-----
arch/ia64/kernel/mca.c | 2
arch/x86/Makefile | 2
arch/x86/net/bpf_jit_comp.c | 15 +++++-
arch/x86/net/bpf_jit_comp32.c | 11 ++++
drivers/bus/ti-sysc.c | 4 +
drivers/gpu/drm/msm/adreno/a5xx_power.c | 2
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 12 +++--
drivers/gpu/drm/msm/dsi/pll/dsi_pll_7nm.c | 2
drivers/gpu/drm/msm/msm_fence.c | 2
drivers/isdn/hardware/mISDN/mISDNipac.c | 2
drivers/net/ethernet/marvell/pxa168_eth.c | 2
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +-
drivers/net/ipa/ipa_cmd.c | 50 ++++++++++++++--------
drivers/platform/x86/intel-hid.c | 7 +++
drivers/platform/x86/intel_pmc_core.c | 50 +++++++++++++++-------
drivers/platform/x86/thinkpad_acpi.c | 8 +++
drivers/ptp/ptp_qoriq.c | 13 +++--
drivers/target/target_core_pscsi.c | 8 +++
fs/block_dev.c | 4 -
fs/cifs/file.c | 1
fs/cifs/smb2misc.c | 4 -
fs/io_uring.c | 8 +--
init/Kconfig | 3 -
lib/math/div64.c | 1
net/mac80211/aead_api.c | 5 +-
net/mac80211/aes_gmac.c | 5 +-
net/mac80211/main.c | 13 +++++
net/netfilter/nf_conntrack_proto_gre.c | 3 -
net/netfilter/nf_tables_api.c | 3 +
tools/bpf/resolve_btfids/.gitignore | 3 -
tools/bpf/resolve_btfids/Makefile | 44 +++++++++----------
tools/testing/kunit/kunit_config.py | 2
tools/testing/selftests/arm64/fp/sve-test.S | 22 +++++++--
tools/testing/selftests/vm/Makefile | 4 -
37 files changed, 241 insertions(+), 121 deletions(-)
Alban Bedel (1):
platform/x86: intel-hid: Support Lenovo ThinkPad X1 Tablet Gen 2
Alex Elder (1):
net: ipa: fix init header command validation
Andre Przywara (1):
kselftest/arm64: sve: Do not use non-canonical FFR register value
Arnd Bergmann (1):
x86/build: Turn off -fcf-protection for realmode targets
Chris Chiu (1):
block: clear GD_NEED_PART_SCAN later in bdev_disk_changed
Daniel Phan (1):
mac80211: Check crypto_aead_encrypt for errors
David E. Box (1):
platform/x86: intel_pmc_core: Ignore GBE LTR on Tiger Lake platforms
David Gow (1):
kunit: tool: Fix a python tuple typing error
David S. Miller (1):
math: Export mul_u64_u64_div_u64
Dmitry Baryshkov (1):
drm/msm/dsi_pll_7nm: Fix variable usage for pll_lockdet_rate
Esteve Varela Colominas (1):
platform/x86: thinkpad_acpi: Allow the FnLock LED to change state
Greg Kroah-Hartman (1):
Linux 5.10.29
Heiko Carstens (1):
init/Kconfig: make COMPILE_TEST depend on !S390
Jiri Olsa (5):
tools/resolve_btfids: Build libbpf and libsubcmd in separate directories
tools/resolve_btfids: Check objects before removing
tools/resolve_btfids: Set srctree variable unconditionally
kbuild: Add resolve_btfids clean to root clean target
kbuild: Do not clean resolve_btfids if the output does not exist
Kalyan Thota (1):
drm/msm/disp/dpu1: icc path needs to be set before dpu runtime resume
Karthikeyan Kathirvel (1):
mac80211: choose first enabled channel for monitor
Konrad Dybcio (1):
drm/msm/adreno: a5xx_power: Don't apply A540 lm_setup to other GPUs
Ludovic Senecaux (1):
netfilter: conntrack: Fix gre tunneling over ipv6
Mans Rullgard (1):
ARM: dts: am33xx: add aliases for mmc interfaces
Martin Wilck (1):
scsi: target: pscsi: Clean up after failure in pscsi_map_sg()
Masahiro Yamada (1):
init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
Pablo Neira Ayuso (1):
netfilter: nftables: skip hook overlap logic if flowtable is stale
Pavel Andrianov (1):
net: pxa168_eth: Fix a potential data race in pxa168_eth_remove
Pavel Begunkov (1):
io_uring: fix timeout cancel return code
Piotr Krysiuk (2):
bpf, x86: Validate computation of branch displacements for x86-64
bpf, x86: Validate computation of branch displacements for x86-32
Rob Clark (1):
drm/msm: Ratelimit invalid-fence message
Rong Chen (1):
selftests/vm: fix out-of-tree build
Ronnie Sahlberg (1):
cifs: revalidate mapping when we open files for SMB1 POSIX
Sergei Trofimovich (2):
ia64: mca: allocate early mca with GFP_ATOMIC
ia64: fix format strings for err_inject
Stanislav Fomichev (1):
tools/resolve_btfids: Add /libbpf to .gitignore
Tariq Toukan (1):
net/mlx5e: Enforce minimum value check for ICOSQ size
Tong Zhang (1):
mISDN: fix crash in fritzpci
Tony Lindgren (1):
bus: ti-sysc: Fix warning on unbind if reset is not deasserted
Vincent Whitchurch (1):
cifs: Silently ignore unknown oplock break handle
Yangbo Lu (1):
ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64 calcalation
Yonghong Song (1):
bpf, x86: Use kvmalloc_array instead kmalloc_array in bpf_jit_comp
I'm announcing the release of the 5.4.111 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 +-
arch/arm/boot/dts/am33xx.dtsi | 3 +++
arch/ia64/kernel/err_inject.c | 22 +++++++++++-----------
arch/ia64/kernel/mca.c | 2 +-
arch/x86/Makefile | 2 +-
arch/x86/net/bpf_jit_comp.c | 15 ++++++++++++---
arch/x86/net/bpf_jit_comp32.c | 11 ++++++++++-
drivers/bus/ti-sysc.c | 4 +++-
drivers/gpu/drm/msm/adreno/a5xx_power.c | 2 +-
drivers/gpu/drm/msm/msm_fence.c | 2 +-
drivers/isdn/hardware/mISDN/mISDNipac.c | 2 +-
drivers/net/ethernet/marvell/pxa168_eth.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +++--
drivers/nvme/host/multipath.c | 2 +-
drivers/platform/x86/intel-hid.c | 7 +++++++
drivers/platform/x86/thinkpad_acpi.c | 8 +++++++-
drivers/target/target_core_pscsi.c | 8 ++++++++
fs/cifs/file.c | 1 +
fs/cifs/smb2misc.c | 4 ++--
init/Kconfig | 3 +--
net/mac80211/main.c | 13 ++++++++++++-
net/netfilter/nf_conntrack_proto_gre.c | 3 ---
22 files changed, 88 insertions(+), 35 deletions(-)
Alban Bedel (1):
platform/x86: intel-hid: Support Lenovo ThinkPad X1 Tablet Gen 2
Arnd Bergmann (1):
x86/build: Turn off -fcf-protection for realmode targets
Esteve Varela Colominas (1):
platform/x86: thinkpad_acpi: Allow the FnLock LED to change state
Greg Kroah-Hartman (1):
Linux 5.4.111
Heiko Carstens (1):
init/Kconfig: make COMPILE_TEST depend on !S390
Karthikeyan Kathirvel (1):
mac80211: choose first enabled channel for monitor
Konrad Dybcio (1):
drm/msm/adreno: a5xx_power: Don't apply A540 lm_setup to other GPUs
Ludovic Senecaux (1):
netfilter: conntrack: Fix gre tunneling over ipv6
Mans Rullgard (1):
ARM: dts: am33xx: add aliases for mmc interfaces
Martin Wilck (1):
scsi: target: pscsi: Clean up after failure in pscsi_map_sg()
Masahiro Yamada (1):
init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM
Pavel Andrianov (1):
net: pxa168_eth: Fix a potential data race in pxa168_eth_remove
Piotr Krysiuk (2):
bpf, x86: Validate computation of branch displacements for x86-64
bpf, x86: Validate computation of branch displacements for x86-32
Rob Clark (1):
drm/msm: Ratelimit invalid-fence message
Ronnie Sahlberg (1):
cifs: revalidate mapping when we open files for SMB1 POSIX
Sagi Grimberg (1):
nvme-mpath: replace direct_make_request with generic_make_request
Sergei Trofimovich (2):
ia64: mca: allocate early mca with GFP_ATOMIC
ia64: fix format strings for err_inject
Tariq Toukan (1):
net/mlx5e: Enforce minimum value check for ICOSQ size
Tong Zhang (1):
mISDN: fix crash in fritzpci
Tony Lindgren (1):
bus: ti-sysc: Fix warning on unbind if reset is not deasserted
Vincent Whitchurch (1):
cifs: Silently ignore unknown oplock break handle
Yonghong Song (1):
bpf, x86: Use kvmalloc_array instead kmalloc_array in bpf_jit_comp
The patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From b14d72ac731753708a7c1a6b3657b9312b6f0042 Mon Sep 17 00:00:00 2001
From: Fabrice Gasnier <fabrice.gasnier(a)foss.st.com>
Date: Wed, 3 Mar 2021 18:49:49 +0100
Subject: [PATCH] counter: stm32-timer-cnt: fix ceiling miss-alignment with
reload register
Ceiling value may be miss-aligned with what's actually configured into the
ARR register. This is seen after probe as currently the ARR value is zero,
whereas ceiling value is set to the maximum. So:
- reading ceiling reports zero
- in case the counter gets enabled without any prior configuration,
it won't count.
- in case the function gets set by the user 1st, (priv->ceiling) is used.
Fix it by getting rid of the cached "priv->ceiling" variable. Rather use
the ARR register value directly by using regmap read or write when needed.
There should be no drawback on performance as priv->ceiling isn't used in
performance critical path.
There's also no point in writing ARR while setting function (sms), so
it can be safely removed.
Fixes: ad29937e206f ("counter: Add STM32 Timer quadrature encoder")
Suggested-by: William Breathitt Gray <vilhelm.gray(a)gmail.com>
Signed-off-by: Fabrice Gasnier <fabrice.gasnier(a)foss.st.com>
Acked-by: William Breathitt Gray <vilhelm.gray(a)gmail.com>
Cc: <Stable(a)vger.kernel.org>
Link: https://lore.kernel.org/r/1614793789-10346-1-git-send-email-fabrice.gasnier…
Signed-off-by: Jonathan Cameron <Jonathan.Cameron(a)huawei.com>
diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c
index 2295be3f309a..75bc401fdd18 100644
--- a/drivers/counter/stm32-timer-cnt.c
+++ b/drivers/counter/stm32-timer-cnt.c
@@ -31,7 +31,6 @@ struct stm32_timer_cnt {
struct counter_device counter;
struct regmap *regmap;
struct clk *clk;
- u32 ceiling;
u32 max_arr;
bool enabled;
struct stm32_timer_regs bak;
@@ -75,8 +74,10 @@ static int stm32_count_write(struct counter_device *counter,
const unsigned long val)
{
struct stm32_timer_cnt *const priv = counter->priv;
+ u32 ceiling;
- if (val > priv->ceiling)
+ regmap_read(priv->regmap, TIM_ARR, &ceiling);
+ if (val > ceiling)
return -EINVAL;
return regmap_write(priv->regmap, TIM_CNT, val);
@@ -138,10 +139,6 @@ static int stm32_count_function_set(struct counter_device *counter,
regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_CEN, 0);
- /* TIMx_ARR register shouldn't be buffered (ARPE=0) */
- regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_ARPE, 0);
- regmap_write(priv->regmap, TIM_ARR, priv->ceiling);
-
regmap_update_bits(priv->regmap, TIM_SMCR, TIM_SMCR_SMS, sms);
/* Make sure that registers are updated */
@@ -199,7 +196,6 @@ static ssize_t stm32_count_ceiling_write(struct counter_device *counter,
regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_ARPE, 0);
regmap_write(priv->regmap, TIM_ARR, ceiling);
- priv->ceiling = ceiling;
return len;
}
@@ -374,7 +370,6 @@ static int stm32_timer_cnt_probe(struct platform_device *pdev)
priv->regmap = ddata->regmap;
priv->clk = ddata->clk;
- priv->ceiling = ddata->max_arr;
priv->max_arr = ddata->max_arr;
priv->counter.name = dev_name(dev);