hwspinlock changes for v6.3

This updates the sun6i DT binding, to allow (and require) #hwlock-cells,
 and it makes use of device_match_of_node() to slightly clean up the
 condition in of_hwspin_lock_get_id().
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmP7ihsVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FoJcQAMfD/H7wvS5eKnDVnsmNE9czbJxm
 mMuU3P5YRApS39i3ysYUrwRb/BOYVPIMDCz7delVzZJbCGjM8oJwWnY9nFp4+dyb
 T1GUorEGbrz8dmOzO8Rf41JT5TByuOceJq2RsWMefwXuzM/WV4jyfkz9ZoVYaIAR
 YCzwGbBM0n6MVnJDNeympUfzPueONPChQGasw0LwXsdVBjNPUelE1BgEU69QM/iw
 a/Qq914KzMwwIGzShmaRjG2NVrKW9VnKQeCLoPglKVPJKqsYGjA3w4BUunbLwcc9
 L+Ci38g/aVx6Zcd3GoJlh+dQubz4W6cCPZRBONvhTsZUH5pAzrTh2skhXUAAQ8ic
 K30JGYP7a28Ls5KiSAhzZqD1Kz45u2J4vJ2SddRyhKfR3/QNHtPk1Qqp0A7QZFyV
 cBcACfUE7dHk3DMdndC4iJ+RNmfd6kWMXQCqpvD46KunVw0rkyTl4WaWJA3FgDhb
 P03HG+fRIamICN/J5JU3jOGrgUG0K/RnEIAQB4f3ubjzoWdLf18QAG75D8st8wGU
 nlQ9ABdTvna1lYXbh70+lzqBh+UO2ZB8M/ySubzdHny6TXg4NFTpjhNxgmVD3m0p
 hgAoewR13uoRkytThXzK1kwkV2z5yjB8uUj0Jmn1uiv0RwLhvA+PzWd8e6EXqbgx
 yR52u8z8z/YgWDRz
 =kzef
 -----END PGP SIGNATURE-----

Merge tag 'hwlock-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux

Pull hwspinlock updates from Bjorn Andersson:
 "This updates the sun6i DT binding to allow (and require) #hwlock-cells
  and makes use of device_match_of_node() to slight clean up the
  condition in of_hwspin_lock_get_id()"

* tag 'hwlock-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
  dt-bindings: hwlock: sun6i: Add #hwlock-cells to example
  dt-bindings: hwlock: sun6i: Add missing #hwlock-cells
  hwspinlock: Use device_match_of_node()
This commit is contained in:
Linus Torvalds 2023-02-26 12:05:38 -08:00
commit 9b0b0dd857
2 changed files with 6 additions and 1 deletions

View File

@ -26,11 +26,15 @@ properties:
resets:
maxItems: 1
'#hwlock-cells':
const: 1
required:
- compatible
- reg
- clocks
- resets
- "#hwlock-cells"
additionalProperties: false
@ -44,5 +48,6 @@ examples:
reg = <0x01c18000 0x1000>;
clocks = <&ccu CLK_BUS_SPINLOCK>;
resets = <&ccu RST_BUS_SPINLOCK>;
#hwlock-cells = <1>;
};
...

View File

@ -367,7 +367,7 @@ int of_hwspin_lock_get_id(struct device_node *np, int index)
continue;
}
if (hwlock->bank->dev->of_node == args.np) {
if (device_match_of_node(hwlock->bank->dev, args.np)) {
ret = 0;
break;
}