diff options
| author | Phani Kumar Uppalapati <phaniu@codeaurora.org> | 2016-02-01 17:57:10 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:20:53 -0700 |
| commit | e5998b6308144a5e359ee695c1bc86c39caedfb8 (patch) | |
| tree | 748d9ef3a7492acc6caafa6abf5cb1667f66c00a /include/linux | |
| parent | 6320908170fd317321c38400a186479e40c30501 (diff) | |
drivers: mfd: Move codec reset gpio config to early boot
Codec reset gpio configuration needs to be updated
before slimbus master component is initialized otherwise
codec cannot be enumerated on the bus. Add a new platform
device driver to update the codec reset gpio configuration
to valid state (output, drive-strength) before slimbus
is initialized.
CRs-Fixed: 968161
Change-Id: I7227212e6b846d58196718255aa4b0923352d120
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rwxr-xr-x | include/linux/mfd/wcd9xxx/core.h | 1 | ||||
| -rwxr-xr-x | include/linux/mfd/wcd9xxx/pdata.h | 1 | ||||
| -rw-r--r-- | include/linux/mfd/wcd9xxx/wcd-gpio-ctrl.h | 34 |
3 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/mfd/wcd9xxx/core.h b/include/linux/mfd/wcd9xxx/core.h index 77ed7a86c60d..eed0328b3f59 100755 --- a/include/linux/mfd/wcd9xxx/core.h +++ b/include/linux/mfd/wcd9xxx/core.h @@ -260,6 +260,7 @@ struct wcd9xxx { u8 version; int reset_gpio; + struct device_node *wcd_rst_np; int (*read_dev)(struct wcd9xxx *wcd9xxx, unsigned short reg, int bytes, void *dest, bool interface_reg); diff --git a/include/linux/mfd/wcd9xxx/pdata.h b/include/linux/mfd/wcd9xxx/pdata.h index 7dc7d42013fb..791cb7f1654a 100755 --- a/include/linux/mfd/wcd9xxx/pdata.h +++ b/include/linux/mfd/wcd9xxx/pdata.h @@ -178,6 +178,7 @@ struct wcd9xxx_pdata { int irq_base; int num_irqs; int reset_gpio; + struct device_node *wcd_rst_np; struct wcd9xxx_amic amic_settings; struct slim_device slimbus_slave_device; struct wcd9xxx_micbias_setting micbias; diff --git a/include/linux/mfd/wcd9xxx/wcd-gpio-ctrl.h b/include/linux/mfd/wcd9xxx/wcd-gpio-ctrl.h new file mode 100644 index 000000000000..1260c33d1003 --- /dev/null +++ b/include/linux/mfd/wcd9xxx/wcd-gpio-ctrl.h @@ -0,0 +1,34 @@ +/* Copyright (c) 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 + * only version 2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __MFD_CDC_GPIO_CTRL_H_ +#define __MFD_CDC_GPIO_CTRL_H_ + +#include <linux/types.h> +#include <linux/of.h> + +#ifdef CONFIG_WCD9335_CODEC +extern int wcd_gpio_ctrl_select_sleep_state(struct device_node *); +extern int wcd_gpio_ctrl_select_active_state(struct device_node *); + +#else +int wcd_gpio_ctrl_select_sleep_state(struct device_node *np) +{ + return 0; +} +int wcd_gpio_ctrl_select_active_state(struct device_node *np) +{ + return 0; +} +#endif + +#endif |
