Name

cec_phys_addr_validate — validate a physical address from an EDID

Synopsis

int cec_phys_addr_validate (u16 phys_addr,
 u16 * parent,
 u16 * port);
 

Arguments

phys_addr

the physical address to validate

parent

if not NULL, then this is filled with the parents PA.

port

if not NULL, then this is filled with the input port.

Description

This validates a physical address as read from an EDID. If the PA is invalid (such as 1.0.1.0 since '0' is only allowed at the end), then it will return -EINVAL.

The parent PA is passed into parent and the input port is passed into port. For example:

PA = 0.0.0.0: has parent 0.0.0.0 and input port 0.

PA = 1.0.0.0: has parent 0.0.0.0 and input port 1.

PA = 3.2.0.0: has parent 3.0.0.0 and input port 2.

PA = f.f.f.f: has parent f.f.f.f and input port 0.

Return

0 if the PA is valid, -EINVAL if not.