Loading drivers/platform/msm/ipa/ipa_v3/ipa_odl.c +6 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #include "ipa_i.h" Loading Loading @@ -418,6 +418,7 @@ static int ipa_adpl_open(struct inode *inode, struct file *filp) int ret = 0; IPADBG("Called the function :\n"); mutex_lock(&ipa3_odl_ctx->pipe_lock); if (ipa3_odl_ctx->odl_state.odl_init && !ipa3_odl_ctx->odl_state.adpl_open) { /* Activate ipa_pm*/ Loading @@ -431,6 +432,7 @@ static int ipa_adpl_open(struct inode *inode, struct file *filp) print_ipa_odl_state_bit_mask(); ret = -ENODEV; } mutex_unlock(&ipa3_odl_ctx->pipe_lock); return ret; } Loading @@ -439,6 +441,7 @@ static int ipa_adpl_release(struct inode *inode, struct file *filp) { int ret = 0; /* Deactivate ipa_pm */ mutex_lock(&ipa3_odl_ctx->pipe_lock); ret = ipa_pm_deactivate_sync(ipa3_odl_ctx->odl_pm_hdl); if (ret) IPAERR("failed to activate pm\n"); Loading @@ -451,6 +454,7 @@ static int ipa_adpl_release(struct inode *inode, struct file *filp) IPAERR("mpm failed to disable ADPL over ODL\n"); } mutex_unlock(&ipa3_odl_ctx->pipe_lock); return ret; } Loading Loading @@ -667,6 +671,7 @@ int ipa_odl_init(void) odl_cdev = ipa3_odl_ctx->odl_cdev; INIT_LIST_HEAD(&ipa3_odl_ctx->adpl_msg_list); mutex_init(&ipa3_odl_ctx->adpl_msg_lock); mutex_init(&ipa3_odl_ctx->pipe_lock); odl_cdev[loop].class = class_create(THIS_MODULE, "ipa_adpl"); Loading drivers/platform/msm/ipa/ipa_v3/ipa_odl.h +2 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #ifndef _IPA3_ODL_H_ Loading Loading @@ -51,6 +51,7 @@ struct ipa_odl_context { struct ipa3_odl_char_device_context odl_cdev[2]; struct list_head adpl_msg_list; struct mutex adpl_msg_lock; struct mutex pipe_lock; struct ipa_sys_connect_params odl_sys_param; u32 odl_client_hdl; struct odl_state_bit_mask odl_state; Loading Loading
drivers/platform/msm/ipa/ipa_v3/ipa_odl.c +6 −1 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #include "ipa_i.h" Loading Loading @@ -418,6 +418,7 @@ static int ipa_adpl_open(struct inode *inode, struct file *filp) int ret = 0; IPADBG("Called the function :\n"); mutex_lock(&ipa3_odl_ctx->pipe_lock); if (ipa3_odl_ctx->odl_state.odl_init && !ipa3_odl_ctx->odl_state.adpl_open) { /* Activate ipa_pm*/ Loading @@ -431,6 +432,7 @@ static int ipa_adpl_open(struct inode *inode, struct file *filp) print_ipa_odl_state_bit_mask(); ret = -ENODEV; } mutex_unlock(&ipa3_odl_ctx->pipe_lock); return ret; } Loading @@ -439,6 +441,7 @@ static int ipa_adpl_release(struct inode *inode, struct file *filp) { int ret = 0; /* Deactivate ipa_pm */ mutex_lock(&ipa3_odl_ctx->pipe_lock); ret = ipa_pm_deactivate_sync(ipa3_odl_ctx->odl_pm_hdl); if (ret) IPAERR("failed to activate pm\n"); Loading @@ -451,6 +454,7 @@ static int ipa_adpl_release(struct inode *inode, struct file *filp) IPAERR("mpm failed to disable ADPL over ODL\n"); } mutex_unlock(&ipa3_odl_ctx->pipe_lock); return ret; } Loading Loading @@ -667,6 +671,7 @@ int ipa_odl_init(void) odl_cdev = ipa3_odl_ctx->odl_cdev; INIT_LIST_HEAD(&ipa3_odl_ctx->adpl_msg_list); mutex_init(&ipa3_odl_ctx->adpl_msg_lock); mutex_init(&ipa3_odl_ctx->pipe_lock); odl_cdev[loop].class = class_create(THIS_MODULE, "ipa_adpl"); Loading
drivers/platform/msm/ipa/ipa_v3/ipa_odl.h +2 −1 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. */ #ifndef _IPA3_ODL_H_ Loading Loading @@ -51,6 +51,7 @@ struct ipa_odl_context { struct ipa3_odl_char_device_context odl_cdev[2]; struct list_head adpl_msg_list; struct mutex adpl_msg_lock; struct mutex pipe_lock; struct ipa_sys_connect_params odl_sys_param; u32 odl_client_hdl; struct odl_state_bit_mask odl_state; Loading