Do not force the DC reference clock to OP; if it is not configured it may refuse and flood the logs.

This commit is contained in:
Gavin Lambert 2014-05-31 15:37:33 +12:00
parent 45f66e9565
commit 0aaf68055e
2 changed files with 31 additions and 0 deletions

View File

@ -819,6 +819,35 @@ else
AC_MSG_RESULT([no])
fi
#------------------------------------------------------------------------------
# Force the reference clock to OP even if unconfigured
#------------------------------------------------------------------------------
AC_MSG_CHECKING([whether to force the reference clock to OP])
AC_ARG_ENABLE([refclkop],
AS_HELP_STRING([--enable-refclkop],
[Force reference clock to OP (default: no)]),
[
case "${enableval}" in
yes) refclkop=1
;;
no) refclkop=0
;;
*) AC_MSG_ERROR([Invalid value for --enable-refclkop])
;;
esac
],
[refclkop=0]
)
if test "x${refclkop}" = "x1"; then
AC_DEFINE([EC_REFCLKOP], [1], [Force refclk to OP])
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
#------------------------------------------------------------------------------
# Command-line tool
#-----------------------------------------------------------------------------

View File

@ -2224,10 +2224,12 @@ void ec_master_request_op(
}
}
#ifdef EC_REFCLKOP
// always set DC reference clock to OP
if (master->dc_ref_clock) {
ec_slave_request_state(master->dc_ref_clock, EC_SLAVE_STATE_OP);
}
#endif
}
/******************************************************************************