Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 873a055e authored by Viraja Kommaraju's avatar Viraja Kommaraju Committed by Gerrit - the friendly Code Review server
Browse files

drivers: regmap: add regmap support for WCD9306



Add regmap support for WCD9306 codec for codec register
access.

CRs-Fixed: 1017965
Change-Id: Icb5d48f4e9329e23b7b46207f1a8d23ca0c78817
Signed-off-by: default avatarViraja Kommaraju <virajak@codeaurora.org>
parent fb179601
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -1318,6 +1318,18 @@ config MFD_STW481X
	  in various ST Microelectronics and ST-Ericsson embedded
	  Nomadik series.

config WCD9306_CODEC
	tristate "WCD9306 Codec"
	select SLIMBUS
	select MFD_CORE
	select REGMAP_ALLOW_WRITE_DEBUGFS
	help
	  Enables the WCD9xxx codec core driver. The core driver provides
	  read/write capability to registers which are part of the
	  WCD9306 core and gives the ability to use the WCD9306 codec.
	  The WCD9306 codec support either I2C/I2S or Slimbus for
	  control and data exchnage with master processor.

config WCD9320_CODEC
	tristate "WCD9320 Codec"
	select SLIMBUS
+1 −1
Original line number Diff line number Diff line
@@ -178,7 +178,7 @@ obj-$(CONFIG_MFD_HI6421_PMIC) += hi6421-pmic-core.o
intel-soc-pmic-objs		:= intel_soc_pmic_core.o intel_soc_pmic_crc.o
obj-$(CONFIG_INTEL_SOC_PMIC)	+= intel-soc-pmic.o
obj-$(CONFIG_WCD9306_CODEC)	+= wcd9xxx-core.o wcd9xxx-irq.o wcd9xxx-slimslave.o\
						wcd9xxx-core-resource.o
						wcd9xxx-core-resource.o wcd9306-regmap.o
obj-$(CONFIG_WCD9320_CODEC)	+= wcd9xxx-core.o wcd9xxx-irq.o wcd9xxx-slimslave.o\
						wcd9xxx-core-resource.o
obj-$(CONFIG_WCD9330_CODEC)	+= wcd9xxx-core.o wcd9xxx-irq.o wcd9xxx-slimslave.o\
+609 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -2901,6 +2901,7 @@ static void wcd9xxx_set_codec_specific_param(struct wcd9xxx *wcd9xxx)
	switch (wcd9xxx->type) {
	case WCD9335:
	case WCD9330:
	case WCD9306:
		wcd9xxx->using_regmap = true;
		wcd9xxx->prev_pg_valid = false;
		break;
+10 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -29,6 +29,10 @@ extern int wcd9335_regmap_register_patch(struct regmap *regmap,
extern struct regmap_config wcd9330_regmap_config;
#endif

#ifdef CONFIG_WCD9306_CODEC
extern struct regmap_config wcd9306_regmap_config;
#endif

static inline struct regmap_config *wcd9xxx_get_regmap_config(int type)
{
	struct regmap_config *regmap_config;
@@ -43,6 +47,11 @@ static inline struct regmap_config *wcd9xxx_get_regmap_config(int type)
	case WCD9330:
		regmap_config = &wcd9330_regmap_config;
		break;
#endif
#ifdef CONFIG_WCD9306_CODEC
	case WCD9306:
		regmap_config = &wcd9306_regmap_config;
		break;
#endif
	default:
		regmap_config = NULL;
Loading