Maciej Strozek
78334c343b
mfd: cs42l43: Fix wrong GPIO_FN_SEL and SPI_CLK_CONFIG1 defaults
...
Two regs have wrong values in existing fields, change them to match
the datasheet.
Fixes: ace6d14481 ("mfd: cs42l43: Add support for cs42l43 core driver")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com >
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20240301101547.2136948-1-mstrozek@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org >
2024-03-05 10:40:30 +00:00
Maciej Strozek
c9e1e505cd
mfd: cs42l43: Fix wrong register defaults
...
A few regs have unnecessary values in defaults, change them to match the
datasheet
Fixes: ace6d14481 ("mfd: cs42l43: Add support for cs42l43 core driver")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20240229155616.118457-1-mstrozek@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org >
2024-02-29 17:54:42 +00:00
Charles Keepax
cab2ce7fce
mfd: cs42l43: Handle error from devm_pm_runtime_enable()
...
As it devm_pm_runtime_enable() can fail due to memory allocations, it
is best to handle the error.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20240129152557.3221212-6-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org >
2024-02-23 14:58:02 +00:00
Charles Keepax
ca291ea748
mfd: cs42l43: Add time postfixes on defines
...
Make the defines a little clearer by adding time based postfixes.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20240129152557.3221212-4-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org >
2024-02-23 14:58:02 +00:00
Charles Keepax
de896be80a
mfd: cs42l43: Use __u8 type rather than u8 for firmware interface
...
__xxx is the preferred type for firmware interfaces.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20240129152557.3221212-3-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org >
2024-02-23 14:58:01 +00:00
Charles Keepax
8b9a1f5ef4
mfd: cs42l43: Tidy up header includes
...
Use more forward declarations, move header guards to cover other
includes, and rely less on including headers through other headers.
Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Link: https://lore.kernel.org/r/20240129152557.3221212-2-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org >
2024-02-23 14:58:01 +00:00
Charles Keepax
eb72d52070
mfd: cs42l43: Use correct macro for new-style PM runtime ops
...
The code was accidentally mixing new and old style macros, update the
macros used to remove an unused function warning whilst building with
no PM enabled in the config.
Fixes: ace6d14481 ("mfd: cs42l43: Add support for cs42l43 core driver")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/all/20230822114914.340359-1-ckeepax@opensource.cirrus.com/
Reviewed-by: Nathan Chancellor <nathan@kernel.org >
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org >
Acked-by: Lee Jones <lee@kernel.org >
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2023-09-23 11:10:23 -07:00
Charles Keepax
ace6d14481
mfd: cs42l43: Add support for cs42l43 core driver
...
The CS42L43 is an audio CODEC with integrated MIPI SoundWire interface
(Version 1.2.1 compliant), I2C, SPI, and I2S/TDM interfaces designed
for portable applications. It provides a high dynamic range, stereo
DAC for headphone output, two integrated Class D amplifiers for
loudspeakers, and two ADCs for wired headset microphone input or
stereo line input. PDM inputs are provided for digital microphones.
The MFD component registers and initialises the device and provides
PM/system power management.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com >
Link: https://lore.kernel.org/r/20230804104602.395892-4-ckeepax@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org >
2023-08-17 12:06:11 +01:00