Commit graph

1028 commits

Author SHA1 Message Date
Tobias Mueller
2cec4b7878 Do not overwrite aclocal flags in autogen, fixes b.fd.o #35261
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-31 19:45:24 +01:00
Richard Hughes
b458ef8250 trivial: fix whitespace issue with the last patch 2011-03-30 19:23:35 +01:00
Benson Leung
95ecdb25b2 Support batteries that report both energy and charge.
More cleanly support batteries that report both energy and charge,
but do not report power_now. One battery driver in drivers/power
(bq20z75) supports reporting energy and charge natively from the
fuel gauge, but does not report power_now. The previous legacy behavior
would ignore the existence of charge and treat current_now as
being in units of power.

Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-30 14:16:21 +01:00
Richard Hughes
c98ca6f8f5 Add a config option 'IgnoreLid' so users with broken / inverted lid switches don't suspend at session start 2011-03-28 16:41:02 +01:00
Landry Breuil
3787531096 openbsd: fix warning, and set lid-present to no
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:25 +00:00
Landry Breuil
883da76819 openbsd: Add licence headers..
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:23 +00:00
Landry Breuil
08227a6416 openbsd: handle case when power is reported directly as Wh
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:21 +00:00
Landry Breuil
83e1e56938 openbsd: Add up_apm_device_refresh callback to device class
- move apm_fd to a global var atm, needs to be passed to a private native class
- propagate more error codes through some booleans
- history now works!

Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:19 +00:00
Landry Breuil
53ba669490 openbsd: wip on acpibat_state, need to sort wh/ah units
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:16 +00:00
Landry Breuil
6dd2e35d6f openbsd: add up_backend_update_acpibat_state() and call it if acpibat0 device is found
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:15 +00:00
Landry Breuil
a65fdfc156 trivial: move #includes
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:13 +00:00
Landry Breuil
20a3759ab9 openbsd: rename get_sensor() to get_sensordev() for the sake of clarity
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:12 +00:00
Landry Breuil
1017f7399b openbsd: rename has_sensor() to get_sensor() and use it to grab the sensordev struct
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:09 +00:00
Landry Breuil
5e69186399 openbsd: add up_native_has_sensor() and use it in is_laptop()
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:07 +00:00
Landry Breuil
0580fed09a trivial: ignore libupshared too
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:05 +00:00
Landry Breuil
7dda4cd660 -Wuninitialized needs -O
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:40:00 +00:00
Landry Breuil
d51953c305 openbsd: assign callbacks to ac/batt device class
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:57 +00:00
Landry Breuil
8e84a6dbb4 openbsd: rip of get_on_battery/get_low_battery/get_online from freebsd backend
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:55 +00:00
Landry Breuil
08d46e4b90 trivial: fix indent
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:51 +00:00
Landry Breuil
164ac63f8d openbsd: time-to-empty is in seconds
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:49 +00:00
Landry Breuil
0d7b9fe1d5 trivial: silence warnings
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:48 +00:00
Landry Breuil
55408490d0 trivial: return NULL, shouldnt be reached anyway
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:26 +00:00
Landry Breuil
b03290f11d openbsd: Declare prototypes for get_power_info/get_battery_state_value
Pass struct apm_power_info ptr as argument instead of returning it

Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:24 +00:00
Landry Breuil
564d1c47ad openbsd: cast NULL to void* to silence missing sentinel gcc warnings
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:23 +00:00
Landry Breuil
2533e75e77 openbsd: dont initialize props we wont likely set atm
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:22 +00:00
Landry Breuil
631869fdd5 openbsd: Update battery properties only if they really changed
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:20 +00:00
Landry Breuil
89c929d442 openbsd: update ac state only if state really changed
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:19 +00:00
Landry Breuil
c11e803058 openbsd: use g_debug instead of g_message, also log minutes_left
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:17 +00:00
Landry Breuil
d5b1d6d49f openbsd: move batt/ac properties update to their own separate functions
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:15 +00:00
Landry Breuil
8d2844c51c openbsd: No need for a delayed callback coldplugging devices
Coldplug them directly in up_backend_coldplug (only if is_laptop is true)

Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:14 +00:00
Landry Breuil
afdef9d298 openbsd: add is_laptop boolean and only add ac/batt devices if true
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:12 +00:00
Landry Breuil
7b4c52bfb9 openbsd: set has-history & has-statistics to TRUE
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:11 +00:00
Landry Breuil
f001a92ec5 openbsd: add up_native_is_laptop()
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:09 +00:00
Landry Breuil
07100772ab openbsd: Move os-specific headers inclusion to up-apm-native.h
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:08 +00:00
Landry Breuil
527019ea82 openbsd: update ac online status too
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:07 +00:00
Landry Breuil
4ba9516b6a openbsd: cast battery_life to gdouble
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:05 +00:00
Landry Breuil
543159173a openbsd: Don't update percentage, probably missing a cast
Fix some return codes, and give sane defaults to ac/batt devices

Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:04 +00:00
Landry Breuil
c9296f51ba openbsd: Use separate 'static' devices for ac and battery
Move UpApmNative object to its own header for use by UpBackend

Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:02 +00:00
Landry Breuil
a5e0d246e0 openbsd: add dumb ApmNative gobject
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:39:01 +00:00
Landry Breuil
ba3ffa0052 openbsd: fetch batt info from APM_IOC_GETPOWER ioctl()
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:57 +00:00
Landry Breuil
6b32cea9c3 openbsd: do a delayed add for device coldplugging, and emit device-added signal
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:56 +00:00
Landry Breuil
5e36534edf trivial: actually return a string
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:54 +00:00
Landry Breuil
23948aed38 trivial: return FALSE in callback
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:53 +00:00
Landry Breuil
41e678a8f4 openbsd: Add GObject stuff + wip on apm_thread/apm_event_cb
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:51 +00:00
Landry Breuil
4746c7df50 openbsd: add skeleton code
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:50 +00:00
Landry Breuil
ad04d9fd44 Add openbsd backend switches
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:49 +00:00
Landry Breuil
2527d0170d upower needs -pthread
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:48 +00:00
Landry Breuil
d81b7ebee4 openbsd: add openbsd backend SUBDIR
Signed-off-by: Richard Hughes <richard@hughsie.com>
2011-03-21 18:38:46 +00:00
Richard Hughes
befdb09c54 trivial: post release version bump 2011-03-21 10:14:59 +00:00
Richard Hughes
36e97ab4cc Released UPower 0.9.9 2011-03-21 10:11:17 +00:00