mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
19790951f0
Currently, enabling wakeup for the IPA device doesn't occur until the setup phase of initialization (in ipa_power_setup()). There is no need to delay doing that, however. We can conveniently do it during the config phase, in ipa_interrupt_config(), where we enable power management wakeup mode for the IPA interrupt. Moving the device_init_wakeup() out of ipa_power_setup() leaves that function empty, so it can just be eliminated. Similarly, rearrange all of the matching inverse calls, disabling device wakeup in ipa_interrupt_deconfig() and removing that function as well. Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
|
|
* Copyright (C) 2018-2024 Linaro Ltd.
|
|
*/
|
|
#ifndef _IPA_POWER_H_
|
|
#define _IPA_POWER_H_
|
|
|
|
#include <linux/types.h>
|
|
|
|
struct device;
|
|
|
|
struct ipa;
|
|
struct ipa_power_data;
|
|
|
|
/* IPA device power management function block */
|
|
extern const struct dev_pm_ops ipa_pm_ops;
|
|
|
|
/**
|
|
* ipa_core_clock_rate() - Return the current IPA core clock rate
|
|
* @ipa: IPA structure
|
|
*
|
|
* Return: The current clock rate (in Hz), or 0.
|
|
*/
|
|
u32 ipa_core_clock_rate(struct ipa *ipa);
|
|
|
|
/**
|
|
* ipa_power_retention() - Control register retention on power collapse
|
|
* @ipa: IPA pointer
|
|
* @enable: Whether retention should be enabled or disabled
|
|
*/
|
|
void ipa_power_retention(struct ipa *ipa, bool enable);
|
|
|
|
/**
|
|
* ipa_power_init() - Initialize IPA power management
|
|
* @dev: IPA device
|
|
* @data: Clock configuration data
|
|
*
|
|
* Return: A pointer to an ipa_power structure, or a pointer-coded error
|
|
*/
|
|
struct ipa_power *ipa_power_init(struct device *dev,
|
|
const struct ipa_power_data *data);
|
|
|
|
/**
|
|
* ipa_power_exit() - Inverse of ipa_power_init()
|
|
* @power: IPA power pointer
|
|
*/
|
|
void ipa_power_exit(struct ipa_power *power);
|
|
|
|
#endif /* _IPA_POWER_H_ */
|