// Copyright (c) Qualcomm Technologies, Inc.
// All Rights Reserved.
// Confidential and Proprietary - Qualcomm Technologies, Inc.

/**
 * @addtogroup CSecureGPIO
 * @{
 *
 * The class IDs `SecureGPIO' are not included in the default privilege set.
 * The IDs need to be added to the privileges section in the metadata to allow
 * the client (e.g. a TA) to use the CSecureGPIO class.
 *
 * This class is used to enforce an Access Control (AC) policy on GPIOs. This
 * class needs to be used in conjunction with TLMM (see \link ITLMM \endlink).
 * Therefore, the client should have the CTLMM (\link CTLMM \endlink) privilege
 * in conjunction with at least one of the IDs defined by this class.
 *
 * How it works: Each time a GPIO is requested through TLMM, QTEE will check if
 * the GPIO is subject to the AC policy. If AC needs to be verified and the
 * client has the required UID in its metadata, then this client can open and
 * use the GPIO.
 *
 * How to protect a GPIO: the AC policy is defined through a mapping between
 * GPIOs and UIDs at compilation-time. The mapping should be declared through
 * devcfg (e.g. `oem_config.xml'). Inside the devcfg file, the device
 * `secure_gpio' needs to be added and each protected GPIO has to be declared
 * as a `props' field, where the `name' is the string identifying the GPIO, the
 * type is `DALPROP_ATTR_TYPE_UINT32' and the content of this field is one of
 * the SecureGPIOIds defined by this class.
 *
 * For example, the following snippet showcases how the GPIO
 * `tlmm_gpio_test_pin' would be protected by `CSecureGPIOId_0_UID'.
 *
 * @code
 * <device id="secure_gpio_dev">
 *  <props name="tlmm_gpio_test_pin" type=DALPROP_ATTR_TYPE_UINT32>
 *    650 <!-- CSecureGPIOId_0_UID -->
 *  </props>
 * </device>
 * @endcode
 */

const uint32 CSecureGPIOId_0_UID = 650;
const uint32 CSecureGPIOId_1_UID = 651;
const uint32 CSecureGPIOId_2_UID = 652;
const uint32 CSecureGPIOId_3_UID = 653;
const uint32 CSecureGPIOId_4_UID = 654;
const uint32 CSecureGPIOId_5_UID = 655;
const uint32 CSecureGPIOId_6_UID = 656;
const uint32 CSecureGPIOId_7_UID = 657;
const uint32 CSecureGPIOId_8_UID = 658;
const uint32 CSecureGPIOId_9_UID = 659;

/** @} */

