Add entity instance as an input parameter to pldm_pdr_tree_add()

- The intent behind this commit is to allow other projects that are
  consuming the libpldm(like openpower/hostboot) to create the
  entities with custom entity instance numbers while creating
  the entity association PDR's.

- If the entity instance number value is 0xFFFF or its parent is
  NULL, then use the existing logic.

- If the entity instance number value is not 0xFFFF and the parent is
  not NULL, should be verify whether the entity exists, if it exists,
  return the entity, otherwise add the entity to the tree.

Tested: Built pldm successfully and Unit Test passes.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: If9b0ac9c1dac3147ed6f95a3e027d155fe2a38c6
diff --git a/libpldm/pdr.h b/libpldm/pdr.h
index 8d827dc..021a6d1 100644
--- a/libpldm/pdr.h
+++ b/libpldm/pdr.h
@@ -223,16 +223,19 @@
  *  @param[in/out] entity - pointer to the entity to be added. Input has the
  *                          entity type. On output, instance number and the
  *                          container id are populated.
+ *  @param[in] entity_instance_number - entity instance number, we can use the
+ *                                      entity instance number of the entity by
+ *                                      default if its value is equal 0xFFFF.
  *  @param[in] parent - pointer to the node that should be the parent of input
  *                      entity. If this is NULL, then the entity is the root
  *  @param[in] association_type - relation with the parent : logical or physical
  *
  *  @return pldm_entity_node* - opaque pointer to added entity
  */
-pldm_entity_node *
-pldm_entity_association_tree_add(pldm_entity_association_tree *tree,
-				 pldm_entity *entity, pldm_entity_node *parent,
-				 uint8_t association_type);
+pldm_entity_node *pldm_entity_association_tree_add(
+    pldm_entity_association_tree *tree, pldm_entity *entity,
+    uint16_t entity_instance_number, pldm_entity_node *parent,
+    uint8_t association_type);
 
 /** @brief Visit and note each entity in the entity association tree
  *