OSDN Git Service

clarify set failure due to power down
authorKeun-young Park <keunyoung@google.com>
Tue, 26 Apr 2016 01:10:45 +0000 (18:10 -0700)
committerKeun-young Park <keunyoung@google.com>
Tue, 26 Apr 2016 01:10:45 +0000 (18:10 -0700)
- some properties can have separate propety control power state
  and setting such property when it is powered off should
  lead into returning error from hal. Define -ESHUTDOWN as
  error code to use in such case.

bug: 28385609
Change-Id: I41c1519ad00b43a83f3aa4e5f0627d75d87a960b

include/hardware/vehicle.h

index 314daff..a590fbd 100644 (file)
@@ -1700,6 +1700,8 @@ typedef struct vehicle_hw_device {
      * Setting some properties require having initial state available. Depending on the vehicle hal,
      * such initial data may not be available for short time after init. In such case, set call
      * can return -EAGAIN like get call.
+     * For a property with separate power control, set can fail if the property is not powered on.
+     * In such case, hal should return -ESHUTDOWN error.
      */
     int (*set)(struct vehicle_hw_device* device, const vehicle_prop_value_t *data);