On Mon, Apr 19, 2021 at 08:37:57PM +0200, Johan Jonker wrote:
Hi Chris,
Never use hotmail.com for sending patches. They corrupt Message-ID, so use for example Gmail.
Understood. I'll get a gmail set up as soon as possible. Sorry if this message comes through funky (still on Hotmail, been using it since 96).
X-Microsoft-Original-Message-ID: 20210419155718.17348-3-macromorgan@hotmail.com
Message-ID: SN6PR06MB53420A0E831C17342A73188BA5499@SN6PR06MB5342.namprd06.prod.outlook.com
====
If you like rk817.txt should be converted to YAML, which is beyond your serie, so move these changes to rk817.txt instead for now if rob+dt agrees. ;)
Will do, assuming everyone agrees.
====
Include the dts patch back in, so we can compare it with the documentation changes.
Acknowledged.
On 4/19/21 5:57 PM, Chris Morgan wrote:
Create dt-binding documentation to document rk817 codec.
Signed-off-by: Chris Morgan macromorgan@hotmail.com
Changes in v6:
- Included additional project maintainers for correct subsystems.
 - Removed unneeded compatible from DT documentation.
 - Removed binding update for Odroid Go Advance (will do in seperate series).
 Changes in v5:
- Move register definitions from rk817_codec.h to main rk808.h register definitions.
 - Add volatile register for codec bits.
 - Add default values for codec bits.
 - Removed of_compatible from mtd driver (not necessary).
 - Switched to using parent regmap instead of private regmap for codec.
 Changes in v4:
- Created set_pll() call.
 - Created user visible gain control in mic.
 - Check for return value of clk_prepare_enable().
 - Removed duplicate clk_prepare_enable().
 - Split DT documentation to separate commit.
 Changes in v3:
- Use DAPM macros to set audio path.
 - Updated devicetree binding (as every rk817 has this codec chip).
 - Changed documentation to yaml format.
 - Split MFD changes to separate commit.
 Changes in v2:
- Fixed audio path registers to solve some bugs.
 .../bindings/sound/rockchip,rk817-codec.yaml | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk817-codec.yaml
diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk817-codec.yaml b/Documentation/devicetree/bindings/sound/rockchip,rk817-codec.yaml new file mode 100644 index 000000000000..0059ef54d6b5 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/rockchip,rk817-codec.yaml @@ -0,0 +1,57 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.o... +$schema: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdevicetree.o...
+title: Rockchip rk817 audio codec
+description:
- The rk817 codec is an I2C codec integrated with every Rockchip
 - rk817 PMIC MFD.
 If you want to convert rk817.txt to rockchip,rk817.yaml then add
maintainers:
- Heiko Stuebner heiko@sntech.de
 
Heiko is on here anyway as I believe he has one of these devices to test and asked previously that I include him as I upstream things for the Odroid Go Advance.
+properties:
- "#sound-dai-cells":
 - const: 1
 Move things with "#" below as much as possible.
Ack
- clocks:
 - maxItems: 1
 - clock-names:
 - const: "mclk"
 
Ack
- mic-in-differential:
 - description: the microphone is in differential mode.
 - $ref: /schemas/types.yaml#/definitions/flag
 This is part of a sub node now.
Correct, will update this when I move it to the rk808 documentation.
+required:
- compatible
 Add compatible "rockchip,rk817" to properties
Will make sure I note these updates as "optional for the rk817" in the MFD devicetree bindings. The "compatible" is listed there.
- clocks
 
- clock-names
 +additionalProperties: false
+examples:
- |
 +rk817: pmic@20 {
- compatible = "rockchip,rk817";
 Without rockchip,rk817.yaml this example will generate notifications.
I'm afraid I don't understand. I'll update the rk808 documentation to show the correct bindings, if it's still incorrect please let me know.
- reg = <0x20>;
 - interrupt-parent = <&gpio0>;
 
- interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
 add include for IRQ_TYPE_LEVEL_LOW
I do not understand, I'll update the rk808, if it's still wrong please let me know.
- pinctrl-names = "default";
 - pinctrl-0 = <&pmic_int>, <&i2s_8ch_mclk>;
 
- #sound-dai-cells = <0>;
 Move things with "#" down below the list in possible.
Acknowledged.
- clocks = <&cru SCLK_I2S_8CH_OUT>;
 add include for SCLK_I2S_8CH_OUT
- clock-names = "mclk";
 
Heiko's sort rules:
compatible reg interrupts [alphabetical] status [if needed]
- ........
 remove
- rk817_codec: codec {
 Move to rk817.txt example.
mic-in-differential;
status = "okay";Never use status in examples.
Acknowledged.
- };
 
- ........
 remove
+};