Vishwanatha Subbanna | 307d80b | 2017-06-28 15:56:09 +0530 | [diff] [blame] | 1 | #include "occ_status.hpp" |
| 2 | namespace open_power |
| 3 | { |
| 4 | namespace occ |
| 5 | { |
| 6 | |
| 7 | // Handles updates to occActive property |
| 8 | bool Status::occActive(bool value) |
| 9 | { |
Vishwanatha Subbanna | 32e84e9 | 2017-06-28 19:17:28 +0530 | [diff] [blame] | 10 | if (value != this->occActive()) |
| 11 | { |
| 12 | if (value) |
| 13 | { |
| 14 | // Bind the device |
| 15 | device.bind(); |
| 16 | } |
| 17 | else |
| 18 | { |
| 19 | // Do the unbind |
| 20 | device.unBind(); |
| 21 | } |
| 22 | } |
Vishwanatha Subbanna | 307d80b | 2017-06-28 15:56:09 +0530 | [diff] [blame] | 23 | return Base::Status::occActive(value); |
| 24 | } |
| 25 | |
| 26 | } // namespace occ |
| 27 | } // namespace open_power |