Loading asoc/codecs/Kbuild +1 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ ifdef CONFIG_WCD9XXX_CODEC_CORE endif ifdef CONFIG_WCD9XXX_CODEC_CORE_V2 CORE_OBJS += wcd9xxx-core-init.o CORE_OBJS += msm-cdc-pinctrl.o CORE_OBJS += msm-cdc-supply.o endif Loading include/asoc/core.h +116 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2019, The Linux Foundation. All rights reserved. */ #ifndef __MFD_TABLA_CORE_H__ Loading Loading @@ -374,6 +374,7 @@ struct wcd9xxx_reg_val { int bytes; /* number of bytes to be written */ }; #ifdef CONFIG_WCD9XXX_CODEC_CORE int wcd9xxx_interface_reg_read(struct wcd9xxx *wcd9xxx, unsigned short reg); int wcd9xxx_interface_reg_write(struct wcd9xxx *wcd9xxx, unsigned short reg, u8 val); Loading Loading @@ -429,4 +430,118 @@ static inline int __init wcd9xxx_irq_of_init(struct device_node *node, int wcd9xxx_init(void); void wcd9xxx_exit(void); #else int wcd9xxx_interface_reg_read(struct wcd9xxx *wcd9xxx, unsigned short reg) { return 0; } int wcd9xxx_interface_reg_write(struct wcd9xxx *wcd9xxx, unsigned short reg, u8 val) { return 0; } int wcd9xxx_get_logical_addresses(u8 *pgd_la, u8 *inf_la) { return 0; } int wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, int bytes, void *src) { return 0; } int wcd9xxx_slim_reserve_bw(struct wcd9xxx *wcd9xxx, u32 bw_ops, bool commit) { return 0; } int wcd9xxx_set_power_state(struct wcd9xxx *wcd9xxx, enum codec_power_states cdc_power_state, enum wcd_power_regions pwr_region) { return 0; } int wcd9xxx_get_current_power_state(struct wcd9xxx *wcd9xxx, enum wcd_power_regions pwr_region) { return 0; } int wcd9xxx_page_write(struct wcd9xxx *wcd9xxx, unsigned short *reg) { return 0; } int wcd9xxx_slim_bulk_write(struct wcd9xxx *wcd9xxx, struct wcd9xxx_reg_val *bulk_reg, unsigned int size, bool interface) { return 0; } extern int wcd9xxx_core_res_init( struct wcd9xxx_core_resource *wcd9xxx_core_res, int num_irqs, int num_irq_regs, struct regmap *wcd_regmap) { return 0; } extern void wcd9xxx_core_res_deinit( struct wcd9xxx_core_resource *wcd9xxx_core_res) { } extern int wcd9xxx_core_res_suspend( struct wcd9xxx_core_resource *wcd9xxx_core_res, pm_message_t pmesg) { return 0; } extern int wcd9xxx_core_res_resume( struct wcd9xxx_core_resource *wcd9xxx_core_res) { return 0; } extern int wcd9xxx_core_irq_init( struct wcd9xxx_core_resource *wcd9xxx_core_res) { return 0; } extern int wcd9xxx_assign_irq(struct wcd9xxx_core_resource *wcd9xxx_core_res, unsigned int irq, unsigned int irq_base) { return 0; } extern enum wcd9xxx_intf_status wcd9xxx_get_intf_type(void) { return 0; } extern void wcd9xxx_set_intf_type(enum wcd9xxx_intf_status int_state) { } extern enum wcd9xxx_pm_state wcd9xxx_pm_cmpxchg( struct wcd9xxx_core_resource *wcd9xxx_core_res, enum wcd9xxx_pm_state o, enum wcd9xxx_pm_state n) { return 0; } static inline int __init wcd9xxx_irq_of_init(struct device_node *node, struct device_node *parent) { return 0; } int wcd9xxx_init(void) { return 0; } void wcd9xxx_exit(void) { } #endif #endif include/asoc/wcd9xxx-irq.h +54 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2017, 2019, The Linux Foundation. All rights reserved. */ #include <linux/types.h> Loading @@ -7,6 +7,7 @@ #ifndef __MFD_WCD9XXX_IRQ_H #define __MFD_WCD9XXX_IRQ_H #ifdef CONFIG_WCD9XXX_CODEC_CORE bool wcd9xxx_lock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res); void wcd9xxx_unlock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res); void wcd9xxx_nested_irq_lock(struct wcd9xxx_core_resource *wcd9xxx_res); Loading @@ -26,4 +27,56 @@ int wcd9xxx_irq_init(struct wcd9xxx_core_resource *wcd9xxx_res); void wcd9xxx_irq_exit(struct wcd9xxx_core_resource *wcd9xxx_res); int wcd9xxx_irq_drv_init(void); void wcd9xxx_irq_drv_exit(void); #else bool wcd9xxx_lock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res) { return false; } void wcd9xxx_unlock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res) { } void wcd9xxx_nested_irq_lock(struct wcd9xxx_core_resource *wcd9xxx_res) { } void wcd9xxx_nested_irq_unlock(struct wcd9xxx_core_resource *wcd9xxx_res) { } int wcd9xxx_request_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq, irq_handler_t handler, const char *name, void *data) { return 0; } void wcd9xxx_free_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq, void *data) { } void wcd9xxx_enable_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq) { } void wcd9xxx_disable_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq) { } void wcd9xxx_disable_irq_sync(struct wcd9xxx_core_resource *wcd9xxx_res, int irq) { } int wcd9xxx_irq_init(struct wcd9xxx_core_resource *wcd9xxx_res) { return 0; } void wcd9xxx_irq_exit(struct wcd9xxx_core_resource *wcd9xxx_res) { } int wcd9xxx_irq_drv_init(void) { return 0; } void wcd9xxx_irq_drv_exit(void) { } #endif #endif Loading
asoc/codecs/Kbuild +1 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,7 @@ ifdef CONFIG_WCD9XXX_CODEC_CORE endif ifdef CONFIG_WCD9XXX_CODEC_CORE_V2 CORE_OBJS += wcd9xxx-core-init.o CORE_OBJS += msm-cdc-pinctrl.o CORE_OBJS += msm-cdc-supply.o endif Loading
include/asoc/core.h +116 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* Copyright (c) 2011-2018, The Linux Foundation. All rights reserved. /* Copyright (c) 2011-2019, The Linux Foundation. All rights reserved. */ #ifndef __MFD_TABLA_CORE_H__ Loading Loading @@ -374,6 +374,7 @@ struct wcd9xxx_reg_val { int bytes; /* number of bytes to be written */ }; #ifdef CONFIG_WCD9XXX_CODEC_CORE int wcd9xxx_interface_reg_read(struct wcd9xxx *wcd9xxx, unsigned short reg); int wcd9xxx_interface_reg_write(struct wcd9xxx *wcd9xxx, unsigned short reg, u8 val); Loading Loading @@ -429,4 +430,118 @@ static inline int __init wcd9xxx_irq_of_init(struct device_node *node, int wcd9xxx_init(void); void wcd9xxx_exit(void); #else int wcd9xxx_interface_reg_read(struct wcd9xxx *wcd9xxx, unsigned short reg) { return 0; } int wcd9xxx_interface_reg_write(struct wcd9xxx *wcd9xxx, unsigned short reg, u8 val) { return 0; } int wcd9xxx_get_logical_addresses(u8 *pgd_la, u8 *inf_la) { return 0; } int wcd9xxx_slim_write_repeat(struct wcd9xxx *wcd9xxx, unsigned short reg, int bytes, void *src) { return 0; } int wcd9xxx_slim_reserve_bw(struct wcd9xxx *wcd9xxx, u32 bw_ops, bool commit) { return 0; } int wcd9xxx_set_power_state(struct wcd9xxx *wcd9xxx, enum codec_power_states cdc_power_state, enum wcd_power_regions pwr_region) { return 0; } int wcd9xxx_get_current_power_state(struct wcd9xxx *wcd9xxx, enum wcd_power_regions pwr_region) { return 0; } int wcd9xxx_page_write(struct wcd9xxx *wcd9xxx, unsigned short *reg) { return 0; } int wcd9xxx_slim_bulk_write(struct wcd9xxx *wcd9xxx, struct wcd9xxx_reg_val *bulk_reg, unsigned int size, bool interface) { return 0; } extern int wcd9xxx_core_res_init( struct wcd9xxx_core_resource *wcd9xxx_core_res, int num_irqs, int num_irq_regs, struct regmap *wcd_regmap) { return 0; } extern void wcd9xxx_core_res_deinit( struct wcd9xxx_core_resource *wcd9xxx_core_res) { } extern int wcd9xxx_core_res_suspend( struct wcd9xxx_core_resource *wcd9xxx_core_res, pm_message_t pmesg) { return 0; } extern int wcd9xxx_core_res_resume( struct wcd9xxx_core_resource *wcd9xxx_core_res) { return 0; } extern int wcd9xxx_core_irq_init( struct wcd9xxx_core_resource *wcd9xxx_core_res) { return 0; } extern int wcd9xxx_assign_irq(struct wcd9xxx_core_resource *wcd9xxx_core_res, unsigned int irq, unsigned int irq_base) { return 0; } extern enum wcd9xxx_intf_status wcd9xxx_get_intf_type(void) { return 0; } extern void wcd9xxx_set_intf_type(enum wcd9xxx_intf_status int_state) { } extern enum wcd9xxx_pm_state wcd9xxx_pm_cmpxchg( struct wcd9xxx_core_resource *wcd9xxx_core_res, enum wcd9xxx_pm_state o, enum wcd9xxx_pm_state n) { return 0; } static inline int __init wcd9xxx_irq_of_init(struct device_node *node, struct device_node *parent) { return 0; } int wcd9xxx_init(void) { return 0; } void wcd9xxx_exit(void) { } #endif #endif
include/asoc/wcd9xxx-irq.h +54 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0-only */ /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2016-2017, 2019, The Linux Foundation. All rights reserved. */ #include <linux/types.h> Loading @@ -7,6 +7,7 @@ #ifndef __MFD_WCD9XXX_IRQ_H #define __MFD_WCD9XXX_IRQ_H #ifdef CONFIG_WCD9XXX_CODEC_CORE bool wcd9xxx_lock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res); void wcd9xxx_unlock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res); void wcd9xxx_nested_irq_lock(struct wcd9xxx_core_resource *wcd9xxx_res); Loading @@ -26,4 +27,56 @@ int wcd9xxx_irq_init(struct wcd9xxx_core_resource *wcd9xxx_res); void wcd9xxx_irq_exit(struct wcd9xxx_core_resource *wcd9xxx_res); int wcd9xxx_irq_drv_init(void); void wcd9xxx_irq_drv_exit(void); #else bool wcd9xxx_lock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res) { return false; } void wcd9xxx_unlock_sleep(struct wcd9xxx_core_resource *wcd9xxx_res) { } void wcd9xxx_nested_irq_lock(struct wcd9xxx_core_resource *wcd9xxx_res) { } void wcd9xxx_nested_irq_unlock(struct wcd9xxx_core_resource *wcd9xxx_res) { } int wcd9xxx_request_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq, irq_handler_t handler, const char *name, void *data) { return 0; } void wcd9xxx_free_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq, void *data) { } void wcd9xxx_enable_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq) { } void wcd9xxx_disable_irq(struct wcd9xxx_core_resource *wcd9xxx_res, int irq) { } void wcd9xxx_disable_irq_sync(struct wcd9xxx_core_resource *wcd9xxx_res, int irq) { } int wcd9xxx_irq_init(struct wcd9xxx_core_resource *wcd9xxx_res) { return 0; } void wcd9xxx_irq_exit(struct wcd9xxx_core_resource *wcd9xxx_res) { } int wcd9xxx_irq_drv_init(void) { return 0; } void wcd9xxx_irq_drv_exit(void) { } #endif #endif