mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 11:26:12 +08:00
drivers: video: isx012: Fix system clock to HV mode
ISX012 doesn't work if CONFIG_CPUFREQ_RELEASE_LOCK is enabled without this changes.
This commit is contained in:
committed by
Petro Karashchenko
parent
d0d787c1b0
commit
6611bf99c4
@@ -37,6 +37,7 @@
|
|||||||
#include "cxd56_i2c.h"
|
#include "cxd56_i2c.h"
|
||||||
|
|
||||||
#include <arch/board/board.h>
|
#include <arch/board/board.h>
|
||||||
|
#include <arch/chip/pm.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
@@ -59,6 +60,14 @@
|
|||||||
|
|
||||||
#define POWER_CHECK_RETRY (10)
|
#define POWER_CHECK_RETRY (10)
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Private Data
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
static struct pm_cpu_freqlock_s g_hv_lock =
|
||||||
|
PM_CPUFREQLOCK_INIT(PM_CPUFREQLOCK_TAG('I', 'S', 0),
|
||||||
|
PM_CPUFREQLOCK_FLAG_HV);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -163,6 +172,10 @@ struct i2c_master_s *board_isx012_initialize(void)
|
|||||||
{
|
{
|
||||||
_info("Initializing ISX012...\n");
|
_info("Initializing ISX012...\n");
|
||||||
|
|
||||||
|
/* Fix system clock to HV mode */
|
||||||
|
|
||||||
|
up_pm_acquire_freqlock(&g_hv_lock);
|
||||||
|
|
||||||
#ifdef IMAGER_ALERT
|
#ifdef IMAGER_ALERT
|
||||||
cxd56_gpio_config(IMAGER_ALERT, true);
|
cxd56_gpio_config(IMAGER_ALERT, true);
|
||||||
#endif
|
#endif
|
||||||
@@ -184,6 +197,10 @@ int board_isx012_uninitialize(struct i2c_master_s *i2c)
|
|||||||
|
|
||||||
_info("Uninitializing ISX012...\n");
|
_info("Uninitializing ISX012...\n");
|
||||||
|
|
||||||
|
/* Release system clock */
|
||||||
|
|
||||||
|
up_pm_release_freqlock(&g_hv_lock);
|
||||||
|
|
||||||
/* Initialize i2c device */
|
/* Initialize i2c device */
|
||||||
|
|
||||||
ret = isx012_uninitialize();
|
ret = isx012_uninitialize();
|
||||||
|
|||||||
Reference in New Issue
Block a user