nvmem: patches (set 1) for 6.20
[email protected]
maintainercover nvmem: patches (set 1) for 6.20
From: Srinivas Kandagatla <[email protected]>
Hi Greg,
Here are few nvmem patches for 6.20, Could you please queue these for 6.20.
Patches include
- of node cleanups
- unused Kconfig cleanup.
- new sm8750 qfprom support
Thanks,
Srini
Komal Bajaj (1):
dt-bindings: nvmem: qfprom: Add sm8750 compatible
Krzysztof Kozlowski (2):
nvmem: Drop OF node reference on nvmem_add_one_cell() failure
nvmem: Simplify with scoped for each OF child loop
Randy Dunlap (1):
nvmem: an8855: drop an unused Kconfig symbol
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + drivers/nvmem/Kconfig | 2 +- drivers/nvmem/core.c | 7 ++----- 3 files changed, 4 insertions(+), 6 deletions(-)
Signature · 1 line
2.51.0
[email protected]
maintainerPATCH 1/4 nvmem: Drop OF node reference on nvmem_add_one_cell() failure
From: Krzysztof Kozlowski <[email protected]>
If nvmem_add_one_cell() failed, the ownership of "child" (or "info.np"), thus its OF reference, is not passed further and function should clean up by putting the reference it got via earlier of_node_get(). Note that this is independent of references obtained via for_each_child_of_node() loop.
--- drivers/nvmem/core.c | 1 + 1 file changed, 1 insertion(+)
drivers/nvmem/core.c +1 -0
@@ -831,6 +831,7 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nodkfree (info.name);if (ret) {of_node_put (child); +of_node_put (info.np);return ret; } }
Signature · 1 line
2.51.0
[email protected]
maintainerPATCH 2/4 nvmem: Simplify with scoped for each OF child loop
In reply to [email protected]From: Krzysztof Kozlowski <[email protected]>
Use scoped for-each loop when iterating over device nodes to make code a bit simpler.
--- drivers/nvmem/core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/nvmem/core.c +1 -5
@@ -789,11 +789,10 @@ static int nvmem_validate_keepouts(struct nvmem_device *nvmem)static int nvmem_add_cells_from_dt (struct nvmem_device *nvmem,struct device_node *np) {struct device *dev = &nvmem->dev; -struct device_node *child;const __be32 *addr;int len, ret; -for_each_child_of_node (np, child) { +for_each_child_of_node_scoped (np, child) {struct nvmem_cell_info info = {0 }; addr =of_get_property (child,"reg" , &len);
@@ -801,7 +800,6 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nodcontinue ;if (len <2 *sizeof (u32)) {dev_err (dev,"nvmem: invalid reg on %pOF\n" , child); -of_node_put (child);return -EINVAL ; }
@@ -817,7 +815,6 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nod info.nbits < 1 || info.bit_offset + info.nbits > BITS_PER_BYTE * info.bytes) {dev_err (dev,"nvmem: invalid bits on %pOF\n" , child); -of_node_put (child);return -EINVAL ; } }
@@ -830,7 +827,6 @@ static int nvmem_add_cells_from_dt(struct nvmem_device *nvmem, struct device_nod ret =nvmem_add_one_cell (nvmem, &info);kfree (info.name);if (ret) { -of_node_put (child);of_node_put (info.np);return ret; }
Signature · 1 line
2.51.0
[email protected]
maintainerPATCH 3/4 nvmem: an8855: drop an unused Kconfig symbol
In reply to [email protected]From: Randy Dunlap <[email protected]>
MFD_AIROHA_AN8855 is referenced here but never defined, so drop it from the Kconfig file.
--- drivers/nvmem/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvmem/Kconfig +1 -1
@@ -30,7 +30,7 @@ source "drivers/nvmem/layouts/Kconfig" config NVMEM_AN8855_EFUSE tristate "Airoha AN8855 eFuse support" - depends on MFD_AIROHA_AN8855 || COMPILE_TEST + depends on COMPILE_TEST help Say y here to enable support for reading eFuses on Airoha AN8855 Switch. These are e.g. used to store factory programmed
Signature · 1 line
2.51.0
[email protected]
maintainerPATCH 4/4 dt-bindings: nvmem: qfprom: Add sm8750 compatible
In reply to [email protected]From: Komal Bajaj <[email protected]>
Document compatible string for the QFPROM on SM8750 platform.
--- Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml +1 -0
@@ -55,6 +55,7 @@ properties: - qcom,sm8450-qfprom - qcom,sm8550-qfprom - qcom,sm8650-qfprom + - qcom,sm8750-qfprom - qcom,x1e80100-qfprom - const: qcom,qfprom
Signature · 1 line
2.51.0