Message ID | 20210515025749.11291-1-macroalpha82@gmail.com |
---|---|
Headers | show |
Series | ASoC: codecs: add rk817 support | expand |
On Fri, 14 May 2021, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > Add rk817 codec support cell to rk808 mfd driver. > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com> > --- > drivers/mfd/rk808.c | 83 +++++++++++++++++++++++++++++++++++++++ > include/linux/mfd/rk808.h | 81 ++++++++++++++++++++++++++++++++++++++ > 2 files changed, 164 insertions(+) > > diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c > index ad923dd4e007..b94f805719a6 100644 > --- a/drivers/mfd/rk808.c > +++ b/drivers/mfd/rk808.c > @@ -65,6 +65,7 @@ static bool rk817_is_volatile_reg(struct device *dev, unsigned int reg) > switch (reg) { > case RK817_SECONDS_REG ... RK817_WEEKS_REG: > case RK817_RTC_STATUS_REG: > + case RK817_CODEC_DTOP_LPT_SRST: > case RK817_INT_STS_REG0: > case RK817_INT_STS_REG1: > case RK817_INT_STS_REG2: > @@ -163,6 +164,9 @@ static const struct mfd_cell rk817s[] = { > .num_resources = ARRAY_SIZE(rk817_rtc_resources), > .resources = &rk817_rtc_resources[0], > }, > + { > + .name = "rk817-codec", > + }, This should be on a single line please. Once fixed, please apply my: For my own reference (apply this as-is to your sign-off block): Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org> -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
On Fri, 14 May 2021, Chris Morgan wrote: > From: Chris Morgan <macromorgan@hotmail.com> > > Create dt-binding documentation to document rk817 codec. > New property name of rockchip,mic-in-differential added to control if > the microphone is in differential mode or not. > > Signed-off-by: Chris Morgan <macromorgan@hotmail.com> > Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com> > Acked-by: Rob Herring <robh@kernel.org> > --- > .../devicetree/bindings/mfd/rk808.txt | 188 ++++++++++++++++++ > 1 file changed, 188 insertions(+) For my own reference (apply this as-is to your sign-off block): Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org> -- Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
From: Chris Morgan <macromorgan@hotmail.com> This series is to add support for the Rockchip rk817 audio codec which is present in all Rockchip rk817 MFD chips. Changes in v11: - Stopped checking for presence of parent node in codec driver, as driver should never be called if parent device doesn't exist to call it. - Made codec subnode optional and stopped returning errors if it is missing. - Downgraded missing codec clock message from dev_err to dev_dbg. Users who choose to use the rk817 PMIC but do not choose to use the codec will not get an error message unless they have debugging enabled, whereas users who wish to use the codec but don't have the clock defined will not get an error message unless they have debug messages enabled. This seems like a fair compromise between mututally exclusive users. Note that errors with the clock or codec will still result in a dev_err. - Updated DT documentation to note that codec subnode is optional if no properties are to exist beneath it. Changes in v10: - Correct order of test/ack/signed-off to chronological order. - Removed ifdef from mfd driver keep cell from being added when the codec was not to be built. - Changed codec DT parsing messages from error to debug to prevent errors in dmesg log in the rare but valid case a user has the rk817 PMIC but does not use the codec. Changes in v9: - Add cover letter. - Remove documentation for interrupt parent per Rob Herring's request. - Remove unused MODULE_DEVICE_TABLE to fix a bug identified by kernel test robot. Changes in v8: - Added additional documentation for missing properties of #sound-dai-cells, interrupt-parent, and wakeup-source for mfd documentation. - Corrected order of elements descriptions in device tree documentation. - Changed name of "mic-in-differential" to "rockchip,mic-in-differential". - Changed name of sound card from "rockchip,rk817-codec" to "Analog". - Removed unused resets and reset-names from the i2s1_2ch node. Changes in v7: - Removed ifdef around register definitions for MFD. - Replaced codec documentation with updates to MFD documentation. - Reordered elements in example to comply with upstream rules. - Added binding update back for Odroid Go Advance as requested. - Submitting patches from gmail now. 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 separate 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. Chris Morgan (4): mfd: Add Rockchip rk817 audio CODEC support ASoC: Add Rockchip rk817 audio CODEC support dt-bindings: Add Rockchip rk817 audio CODEC support arm64: dts: rockchip: add rk817 codec to Odroid Go .../devicetree/bindings/mfd/rk808.txt | 188 ++++++ .../boot/dts/rockchip/rk3326-odroid-go2.dts | 36 +- drivers/mfd/rk808.c | 83 +++ include/linux/mfd/rk808.h | 81 +++ sound/soc/codecs/Kconfig | 6 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/rk817_codec.c | 539 ++++++++++++++++++ 7 files changed, 933 insertions(+), 2 deletions(-) create mode 100644 sound/soc/codecs/rk817_codec.c